IGCSE Computer Science Pseudocode
Questions and Answers
Q1. Winter 2007
(a) Fuel economy for a car is found using the formula: What would be the Fuel Economy of a
car travelling 40 km on 10 litres of fuel?
Answer:
(b) The Fuel Economy for 1000 cars is to be calculated using the formula in Question 16(a).
Write an algorithm, using pseudocode or otherwise, which inputs the Distance Travelled
(km) and the Fuel Used (litres) for 1000 cars. The Fuel Economy for each car is then
calculated and the following outputs produced:
• Fuel Economy for each car
• average (mean) Fuel Economy for all of the cars input
• the best Fuel Economy (i.e. highest value)
• the worst Fuel Economy (i.e. lowest value)
Answer:
Q2. Winter 2009
(a) A car’s speed is measured between points A and B, which are 200 km apart. What is the
final speed of a car if it takes 2 hours to get from A to B?
Answer:
(b) Write an algorithm, using pseudocode or otherwise, which inputs the times for 500 cars,
calculates the final speed of each car using the formula in part (a), and then outputs:
• the final speed for ALL 500 cars
• the slowest (lowest) final speed
• the fastest (highest) final speed
• the average final speed for all the cars.
Answer:
Q3. Summer 2011
Daniel lives in Italy and travels to Mexico, India and New Zealand. The times differences are:
Thus, if it is 10:15 in Italy it will be 14:45 in India.
Answer:
(a) Write an algorithm, using pseudocode or otherwise, which:
• Inputs the name of the country
• Inputs the time in Italy in hours (H) and minutes (M)
• Calculates the time in the country input using the data from the table
• Outputs the country and the time in hours and minutes
Answer: