ALGORITHM A DAY- SPICY
Below are a list of excerices to help you create an algorithm for a problem. There are two types of algorithms:
Algorithm A Day 1 (OCR 9)
Design a program in Pseudocode that:
● Stores a random first name as a variable.
● Asks the user to input their first name.
● If it is the same as the stored name, outputs 'You’re cool.'
● Otherwise outputs 'Nice to meet you.'
HELP: USE...... BEGIN END INPUT OUTPUT IF ELSE ==
Please complete on paper or submit via Edmodo
Algorithm A Day 2 (OCR 10)
Design a program in Pseudocode that:
a) asks the user to input the number of letters in the alphabet.
b) The program must then output whether they got it correct or incorrect.
HELP: USE...... BEGIN END INPUT OUTPUT IF ELSE ==
Please complete on paper or submit via Edmodo
Algorithm A Day 2 (OCR 11)
Design a program in Pseudocode that:
> asks the user to input two numbers.
> It will then output the larger of these two numbers.
HELP: USE...... BEGIN / END INPUT OUTPUT IF ELSE > =
Please complete on paper or submit via Edmodo
Algorithm A Day 3 (OCR 12)
Design a program in Pseudocode that:
● Generates a random number between 1 and 10.
● It must then ask the user to guess this number.
● If they guess it correctly it should display ‘Correct’
● Otherwise, display ‘Not what I was thinking’
Suggested Pseudocode Statements Arithmetic Operations Decisions Repetition BEGIN / END INPUT OUTPUT
HELP: USE...... BEGIN END INPUT OUTPUT = RANDOM IF ELSE ==
Please complete on paper or submit via Edmodo
Algorithm A Day 4 (OCR 13)
Design a program in Pseudocode that meets the needs.
A company calculates holiday allowance for employees. The company gives each employees 28 days holiday each year.
Holidays are awarded based on the following rules:
1. Full time employees who work 5 days a week get 28 days holiday a year
2. Part time employees get a proportion of holiday allowance based on how many days they work, e.g. An employee who works 1 day a week would only get 1/5th of the holidays allowed.
HELP: USE...... / * = BEGIN END INPUT OUTPUT IF ELSE ==
Please complete on paper or submit via Edmodo
Algorithm A Day 5 (OCR 14)
Design a program in Pseudocode that:
● Asks the user to input the traffic light colour.
● If the traffic light colour is green, outputs ‘Go.’
● If the traffic light colour is amber, outputs ‘Get Ready.’
● Otherwise outputs ‘Stop.’
HELP: USE...... BEGIN END INPUT OUTPUT IF ELIF ELSE ==
Please complete on paper or submit via Edmodo
Algorithm A Day 6 (OCR 15)
Design a program in Pseudocode that:
● Asks the user to name one of the Olympic Values (Respect, Excellence and Friendship)
● If they correctly name one, output 'That’s correct‘
● Otherwise outputs ‘Incorrect’
HELP: USE...... BEGIN END INPUT OUTPUT IF ELIF ELSE ==
Please complete on paper or submit via Edmodo
Algorithm A Day 7 (OCR 16)
Design a program in Pseudocode that:
● Asks the user how long on average they spend watching TV each day.
● If it is less than 2 hours, outputs ‘That should be ok’
● If it is between 2 and 4 hours, outputs ‘That will rot your brain’
● Otherwise outputs “That is too much TV”
HELP: USE...... < > = < AND BEGIN END INPUT OUTPUT IF ELIF ELSE
Please complete on paper or submit via Edmodo
Algorithm A Day 8 (OCR 17)
Design a program in Pseudocode that
Outputs all numbers between 1 and 10 only.
HELP: USE...... < + = BEGIN END OUPUT WHILE or FOR
Please complete on paper or submit via Edmodo
Algorithm A Day 9 (OCR 18)
Design a program in Pseudocode that
● Outputs all odd numbers between 1 and 20 only.
HELP: USE...... < + = BEGIN / END OUTPUT - WHILE or FOR
Please complete on paper or submit via Edmodo
Algorithm A Day 10 (OCR 19)
Design a program in Pseudocode that
● Asks the user to input a number and repeat this until they guess the number 7.
● Congratulate the user with a ‘Well Done’ message when they guess correctly.
HELP: USE...... = BEGIN END INPUT OUPUT IF ELSE ==
Please complete on paper or submit via Edmodo