Programming Questions
Programming Questions
Task1
A data logger is used to record car speeds outside a primary school.
Each morning the speed of 1 car is measured as it passes the school. At the end of the
school day, in the afternoon, the speed of 1 car is measured as it passes the school.
Both speeds are recorded in a program for analysis.
Your program will:
Prompt the user to enter the recorded speeds for AM and PM over a period of 30
days
Store the speeds in two one-dimensional arrays, one for the start of day and one for
the end of the day.
All speeds must be validated on entry and any invalid speeds rejected. You must
decide upon your own validation rules.
Task2
Calculate the average speed for the start of the day and the average speed for the end
of the day. Output these with averages with a suitable message for each one.
Task3
Select the day with the highest car speed for the beginning of the day and day with the
lowest car speeds at the end of the day. Output these days with the corresponding
days.
Your program must include:
appropriate prompts for the entry of data
error messages where necessary
clear and understandable output
suitable names for identifiers and comments
Example1 Pseudocode Student Exercise
Tickets are sold for a concert at $20 each. If 10 tickets are bought then the discount is
10%; if 20 tickets are bought the discount is 20%. No more than 25 tickets can be
bought in a single transaction.
a Use pseudocode to write an algorithm to calculate the cost of buying a given
number of tickets.
Pseudcode past paper questions
0420_w11_qp_12_ExamStyle_PseudoCodeQuestion.pdf
0420_s11_qp_11_ExamStyle_PseudoCode.pdf
Pseudo code exam style question 4.pdf