Higher+Pseudocode+Tasks

Write the pseudocode for the following programs:


 * Easy**

A program should ask the user to enter their rating for a film between 0 and 10. The program should then print out a word to describe the film depending on the rating, and based on the table below: 0-2: Rubbish 3-5: OK 6-8: Good 9-10: Excellent
 * Q1 **

A program should Ask the user to enter their name. It should then use input validation to ensure that the name is no more than 10 characters in length. Make sure you use a predefined function
 * Q2 **


 * Q3 **

A program is required accept a credit card as input and ensure that the entry is valid. Valid card numbers must:


 * Start 5410 or 2608
 * Be 16 digits in length

Write the pseudocode for this program


 * Medium**

A program should:
 * Q1 **
 * Pick a random number 1-10
 * Calculate that number squared
 * Ask the user what the square root of that random number is
 * Input validate the user answer until they get it correct
 * Display the number of attempts required to get it correct

Sample output: What is the square root of 25? >4

Wrong, try again. What is the square root of 25? >5

Correct – well done. You took 2 attempts

A program should: Ask the user for their name, and then reverse their name Sample output:
 * Q2 **

What is your name? >Andy

Your name backwards is ydnA

HINT: LEFT function and concatenation


 * Hard**

A program is required to survey users on their choice of favourite colours: Green, Red, Blue, Yellow or Orange. The results are stored in an array eg: Green, Green, Red, Green, Orange, Red, Blue, Green, Red, Yellow, Blue etc
 * Q1**

Write the algorithm required to display how many times the colour green has been voted.

The PE department are running a "longest drive” golf competition. Students go to the driving range and hit one golf ball with a driver. The distance is then recorded along with their name. These details are stored in two lists as shown below:
 * Q2**
 * J Smith - 176m
 * A Jones - 182m
 * R Admaczak - 201m
 * T Grant - 181m
 * L Brown - 87m

Using pseudocode, design an algorithm to find and display the name of the student who hit the longest drive.

TechWorld sell computers. They are running a sale where they are offer a discount based on the price as follows:
 * Q3**
 * Computer price <=£500, discount 5%
 * Computer price >£500 and <£1000, discount 8%
 * Computer price >=£1000, discount 10%

A program is to be created to calculate the discount rate due. The price of a computer is held in the variable //**price**//. The discount to be applied is stored in the variable //**discountRate**//. Use pseudocode to design an algorithm, which uses a CASE statement (or equivalent) to assign the correct discount rate.

A 2D array is used to store data about the Next Great British Pointless Reality Show. Each row in the array stores: Contestant name, contestant town, contestant votes.
 * Q4**

There are 6 contestants in total

1. Write an algorithm to initialise the array by asking for each of the contestant names and then setting their votes to 0

2. Write an algorithm to get the contestant name from the user and then search for their name and then update their votes by 1

3. Update the algorithm in 2 above by continually adding votes until the contestant name given is "XYZ"