Presentation is loading. Please wait.

Presentation is loading. Please wait.

Standard Algorithms Input validation Finding the minimum

Similar presentations


Presentation on theme: "Standard Algorithms Input validation Finding the minimum"— Presentation transcript:

1 Standard Algorithms Input validation Finding the minimum
Finding the maximum Counting occurances Linear search

2 Input validation (numbers)
DO (Start loop) Display message to ask for a number Get number from keyboard If number < 0 OR number > 100 then Error message End if Loop Until number = > 0 AND number<= 100

3 Input validation (strings)
Set password to STOP DO (Start loop) Get guess from user If guess is not equal to password then error message End if Loop Until guess = password

4 Input validation Task task on page 130 of booklet 2

5 Standard Algorithms Input validation is the only Standard Algorithm that you need to be able to code. However you need to know about : Finding the minimum Finding the maximum Counting occurances Linear search

6 Finding Minimum Finding the lowest mark in a list of exam marks
Finding the winner in a list of golf scores Finding the youngest member of a club

7 Finding Maximum Finding the highest score in an exam
Finding the tallest person in a class Finding the most expensive item

8 Counting Occurences Find out how many times a certain name appears in a list Find out how many times a certain exam mark appears in a list

9 Linear Search Searching for a name in a list
Searching for a number in a list


Download ppt "Standard Algorithms Input validation Finding the minimum"

Similar presentations


Ads by Google