Question 7
AQA Computer Science June 2018 Paper 1GCSE8 marks
On the specification
- 3.1 Fundamentals of algorithms3.2 Programming
Question text
7 Develop an algorithm using either pseudo-code or a flowchart that allows a taxi company to calculate how much a taxi fare should be. The algorithm should: • prompt the user to enter the journey distance in kilometres o the distance entered must be greater than zero o the user should be made to re-enter the distance until the distance entered is valid • prompt the user to enter the number of passengers (no validation is required) • calculate the taxi fare by o charging £2 for every passenger regardless of the distance o charging a further £1.50 for every kilometre regardless of how many passengers there are • output the final taxi fare. [8 marks]