Software Development Pseudocode

Similar documents
Performance Assessment Spring 2001

Mathematics Stage 4 Diagnostic Tasks Answers with Common Errors

2009 Fall Startup Event Thursday, September 24th, 2009

Integers and the Coordinate Plane

AREA Judo Math Inc.

MOVING A VERTEX. How must Kirsten move vertex A to be sure that the area of her new triangle is

Grade 7 Mensuration - Perimeter, Area, Volume

THIS IS AN EXAMPLE. READ IT CLOSELY TO LEARN HOW TO GRAPH POLYGONS (closed sided figures) ON THE COORDINATE PLANE AND THEN FIND THE AREA.

INSTRUCTIONS TO CANDIDATES INFORMATION FOR CANDIDATES. Computer Science (A Level)

Mental Math. Grade 9 Mathematics (10F) General Questions. test, what percentage of students obtained at least 50% on the test?

More about Loops and Decisions

The Geometry Template

7 th Pre-AP REVIEW for TEST1 1 st Six Weeks

LEVEL 6. Level 6. Page (iv)

Key Learning for Grade 3

1. Alicia tosses 3 fair coins. What is the probability that she gets at 1. least 1 head? Express your answer as a common fraction.

3. Area and perimeter.notebook November 13, All rectangles with area 12cm 2 have the same perimeter. True or false?

For use only in Whitgift School. IGCSE Higher Sheets 8. IGCSE Higher

II. Functions. 61. Find a way to graph the line from the problem 59 on your calculator. Sketch the calculator graph here, including the window values:

2. You are required to enter a password of up to 100 characters. The characters must be lower ASCII, printing characters.

Vocabulary: Bits and Pieces III

1LIVE CHESS BOOK User Manual

MATH 211 FINAL EXAM REVIEW PROBLEMS. c. Illustrating 12-7 for the take away concept of subtraction

Lab 2: Booleans, Strings, Random Numbers, Recursion, Variables, Input function

OCR H446 A-Level Computer Science

Algorithms and protocols

York University AK/ITEC OBJECT-BASED PROGRAMMING. Midterm Test Sample. Examiner: S.Y. Chen Duration: One Hour and Fifteen Minutes

CSE 3101 Design and Analysis of Algorithms Practice Test for Unit 1 Loop Invariants and Iterative Algorithms

Page 1 CCM6+ Unit 10 Graphing UNIT 10 COORDINATE PLANE. CCM Name: Math Teacher: Projected Test Date:

Lab 2: Booleans, Strings, Random Numbers, Recursion, Variables, Input function

Chapter 6: Quadratic Functions

Basic Computer Programming (Processing)

[ the academy_of_code] Senior Beginners

Poe Middle School Rising 8 th Grade Geometry Students Summer Mathematics Packet

Grade 9 Assessment of Mathematics, Academic Booklet 1

Grade 8 Common Mathematics Assessment Multiple Choice Answer Sheet Name: Mathematics Teacher: Homeroom: Section A No Calculator Permitted

Math 8 SOL Review

4. Use a loop to print the first 25 Fibonacci numbers. Do you need to store these values in a data structure such as an array or list?

Modeling with Quadratic Functions Problem 1 - Penny Activity Date: Block:

Introduction to Computer Science Unit 3. Programs

x when Algebra: Midterm Review Sheet Unit 1- Operations with Real Numbers, Properties & Expressions

Java Outline (Upto Exam 2)

CONDITION CONTROLLED LOOPS. Introduction to Programming - Python

Unit 6 Quadratic Functions

UNIT 4 PRACTICE PROBLEMS

Multiplying and Dividing by Powers of 10

SAINT JOHN PAUL II CATHOLIC ACADEMY. Entering Grade 5 Summer Math

Coordinate Graphing Quadrants and Reading Ordered Pairs. TeacherTwins 2015

1-2 Order of Operations. Evaluate each expression SOLUTION: ANSWER: SOLUTION: ANSWER: SOLUTION: ANSWER: 243

Making a maze with Scratch

Scheme of work Elementary 1, the maths pathway

Objectives/Outcomes. Introduction: If we have a set "collection" of fruits : Banana, Apple and Grapes.

Kansas City Area Teachers of Mathematics 2015 KCATM Math Competition. Numbers and Operations GRADE 5 NO CALCULATOR

Course: Grade 9 Applied Mathematics (MFM1P) Unit 1: Measurement (2D & 3D)

Page 1 CCM6 Unit 10 Graphing UNIT 10 COORDINATE PLANE. CCM Name: Math Teacher: Projected Test Date:

Dartmouth College Computer Science 10, Winter 2012 Final Exam

GAP CLOSING. Grade 9. Facilitator s Guide

GAP CLOSING. Integers. Intermediate / Senior Facilitator s Guide

Thursday 19 June 2014 Morning

Here is a sample IDLE window illustrating the use of these two functions:

CS 051 Homework Laboratory #2

CSCI 102 Fall 2010 Exam #1

STRUCTURES OF STORY PROBLEMS SEPARATE

Cambridge International Examinations Cambridge International Advanced Subsidiary and Advanced Level

if / if else statements

NOTES TO CONSIDER BEFORE ATTEMPTING EX 1A TYPES OF DATA

Altersgruppe: Grade 4 Virginia - Mathematics Standards of Learning (2009): 3.10a, 3.9d,

Practices (1) 6.MP.2. Reason abstractly and quantitatively.

Answer Key Lesson 11: Workshop: Shapes and Properties

Diagnostic Math Assessment

UNIVERSITY OF CAMBRIDGE INTERNATIONAL EXAMINATIONS General Certificate of Education Advanced Subsidiary Level and Advanced Level

BASIC MATH CONTENTS. Section 1... Whole Number Review. Section 2... Decimal Review. Section 3... Fraction Review. Section 4...

Numeracy Practice Test

Family Literacy. readers. Easy Algebra Reading Practice

1-2 Order of Operations. Evaluate each expression SOLUTION: SOLUTION: SOLUTION: SOLUTION: 5.

1. One-third of 105 is the same as seven-sixths of what number? 1.

iv) iv) b) What pattern do you see in your answers to part a? c) Use your pattern to predict the decimal form of each fraction. i)

Graphing Linear Functions

For full credit, show all work.

Grade 8 Final Exam Review APPLICATIONS AND PROBLEM SOLVING

2-2 Adding Integers. Warm Up Problem of the Day Lesson Presentation Lesson Quizzes

Assignment 4: Dodo gets smarter

Advanced Algebra I Simplifying Expressions

ASSIGNMENT 2. COMP-202A, Fall 2011, All Sections. Due: Monday, October 17th, 2011 (23:30)


4 th Grade Summer Mathematics Review #1. Name: 1. How many sides does each polygon have? 2. What is the rule for this function machine?

Test Booklet. Subject: MA, Grade: 10 TAKS Grade 10 Math Student name:

Chapter 2 Operations and Expressions

SRPSD Math Common Assessment

3.2 Pseudocode. Introduction. Definition. 1 Common pseudo code terms

UNIT 1 PLACE VALUE AND WHOLE NUMBERS

Linear Programming. You can model sales with the following objective function. Sales 100x 50y. x 0 and y 0. x y 40

Lesson 13: Exploring Factored Form

Geometry. Set 1. Daily Practice And Answer Keys

MATH 099 HOMEWORK TWO

Decimals should be spoken digit by digit eg 0.34 is Zero (or nought) point three four (NOT thirty four).

REVIEW FOR BASIC MATH SKILLS FINAL EXAM (December 2008) (Basic 4-Function, 10-Key Calculator Allowed No Scientific or Graphing Calculators)

Title: Perimeter Playground

Unit 3: Rational Numbers ANSWER KEY

Accelerated Math. Class work 1. Algebra. 1. Can you compare Compute by the most convenient way:

Transcription:

Software Development Pseudocode

Software Development: Pseudocode Task 1 Task 1 Students are graded out of 10 for assignments. A+ 10 A 9 B+ 8 B 7 C+ 6 C 5 D+ 4 D 3 E+ 2 E 1 Fail 0 This is the current pseudocode being used: IF student s grade is equal to 10 PRINT passed ELSE PRINT failed 1. What are the main problems with the pseudocode? 2. Re-write the pseudocode to show the marking structure above: (Hint: If you run out of space, you can use the back of the sheet.)

Software Development: Pseudocode Task 2 Task 2 READ length, width area length * width PRINT area 1. What data type is length? 2. What data type is width? 3. What does the mean? 4. What data does the variable area store? 5. What does the last line of pseudocode do? 6. Re-write the pseudocode to find the dimensions of the perimeter of the rectangle.

Software Development: Pseudocode Task 3 Task 3 Martin wants to be able to type in the length of a square s side, but if he types in a negative number, he must receive an error message. Write the pseudocode below: Martin now wants the program to print the square s area and perimeter. What pseudocode will you include into your program? Re-write the pseudocode below.

Software Development: Pseudocode Task 4 Task 4 Gareth wants to input three numbers using these variables: n1, n2 and n3. He wants the program to check if the three numbers are equal or not, it will display either of these messages: All 3 are equal, or not all equal. Write the pseudocode below: Gareth now wants the code to be extended and include a print out of which of the largest number of the three that have been typed in.

Software Development: Pseudocode Task 5 Task 5 SET total to zero SET grade to one WHILE grade counter is less than or equal to ten INPUT the next grade ADD the grade into the total PRINT total 1. Explain what the pseudocode does: 2. Mark in red the variables in the pseudocode 3. What are the words in CAPITALS called? 4. What happens if the grade counter is greater than 10? Explain. 5. What can be done to solve this problem?

Software Development: Pseudocode Task 6 Task 6 Write the pseudocode for displaying the numbers 1 to 10 inclusive, try to use a while loop: Write the pseudocode to display the numbers 2 to 20 inclusive, using a for loop:

Software Development: Pseudocode Task 7 Task 7 INPUT start, finish FOR n start to finish PRINT n END FOR Explain what this pseudocode does. Using the code above, re-write the pseudocode to include printing the integers from start to finish inclusive. But if start is bigger than finish, don t print the numbers, print an error message instead.

Software Development: Pseudocode Task 8 Task 8 count 1 WHILE count is less than or equal to 30 IF count is less than or equal to 10 PRINT less than 10. ELSE IF count is less than or equal to 20 PRINT less than 20. ELSE IF count is less than or equal to 30 PRINT less than 30. ELSE PRINT count Add one to count 1. What data type is count? 2. What does the mean? 3. Why do you think count is set to 1? What difference does this make in the code? 4. What is the purpose of a while loop?

Software Development: Pseudocode Task 9 Task 9 Using a for loop, input 10 numbers and print their total. Write the pseudocode below: Using the pseudocode you wrote above, re-write it to include that if any numbers above 100 are entered, they are ignored and should not be totalled. Using the pseudocode above, re-write it and add an error message if any numbers are input above 100.

Software Development: Pseudocode Task 10 Task 10 PRINT Starting Loop FOR number in 1, 2, 3, 4, 5 IF number == 2 PRINT the number is 2 PRINT numbers printed PRINT End of loop 1. What does the for loop do? 2. What are the numbers in the second line used for? 3. What does the IF statement do? 4. Explain what the PRINT statements do. Statement 1: Statement 2: Statement 3: Statement 4:

Software Development: Pseudocode Task 11 Task 11 This is pseudocode for playing a game of Monopoly, also showing one person s move while playing the game. MAIN Monopoly_Game Hand out each player's initial money. Decide which player goes first. REPEAT Call Funciton Monopoly_Move for next player. Decide if this player must drop out. UNTIL all players except one have dropped out. Declare the surviving player to be the winner. FUNCTION Monopoly_Move Begin one's move. Throw the dice. Move the number of spaces on the board shown on the dice. IF the token landed on "Go to Jail," THEN go there immediately. ELSE IF the token landed on "Chance" or "Community Chest," THEN draw a card and follow its instructions. ELSE follow the usual rules for the square (buying property, paying rent, collecting $200 for passing "Go", etc.). END one's move. Write the pseudocode for Simon Says: (if you run out of room, use another piece of paper)

Software Development: Pseudocode Task 12 Task 12 Turn this story into pseudocode: Mum needs to go grocery shopping. She checks whether she has the list of items she wants to buy, she also checks if she has enough money. She dives the car to the shops. She goes over the trolley collection bay and selects an empty trolley. She then walks up and down the aisles putting the items into the trolley, marking the items off her list as she goes. When she has all the items she goes to the checkout. She pays for the items. Puts them in the car, returns the empty trolley and drives home.

Software Development: Pseudocode Task 13 Task 13 James wants a program show the price of an item including 10% GST, display the ex-tax price and the tax component. To find the correct GST component divide by 11, not 10. Write the pseudocode below: With the above pseudocode, re-write it so James can type in 5 different items and see the total price (with and without GST). Hint: use a while loop. Write the pseudocode below:

Software Development: Pseudocode Task 14 Task 14 START STOP word noodles PRINT Enter the password INPUT password WHILE Password is not equal to Word PRINT Wrong password - try again INPUT password END WHILE 1. There are errors in the pseudocode above, keep in mind, they are not obvious. Circle them in red. Explain what would happen in this program if the errors weren t found. 2. Explain what the while loop does. 3. What is the symbol you could write instead of the words not equal to? 4. Re-write the pseudocode to stop allowing the incorrect password to be entered more than three times.

Software Development: Pseudocode Task 15 Task 15 START STOP frogs green horses brown cows black chooks white word = IF word = frogs PRINT END IF IF word = horses PRINT brown END IF IF word is equal to cows PRINT black END IF IF word is equal to chooks PRINT white END IF 1. Mark all errors in red, show how you would fix them. 2. Re-write the pseudocode so that it is more concise and accurate.

Software Development: Pseudocode Task 16 Task 16 Write pseudocode to print an input temperature. The program should check the input data and print a message to say whether it is freezing or boiling. If an inappropriate number or character is input it displays an error message. The pseudocode must use all appropriate techniques, symbols and structures.

Software Development: Pseudocode Task 17 Task 17 Farmer Jo has just purchased a Skwerter 2000, a machine that sprays pesticide on the backs of sheep. Farmer Jo has loaded his 200 sheep into the Skwerter 2000. He is uncertain how many white or black sheep he has in his flock. Farmer Jo also needs to spray each sheep once, white sheep with pink spray, black sheep with blue spray. The blue spray squirts 13 sheep, the pink sprays 18. The Skwerter 2000 will automatically count each sheep as it is squirted. How many sheep of each colour are there in the flock? How many sheep were squirted with pink or blue spray? Hint: use random.