Question 11
AQA Computer Science June 2020 Paper 1GCSE9 marks
On the specification
- 3.1 Fundamentals of algorithms3.2 Programming
Question text
11 Develop an algorithm, using either pseudo-code or a flowchart, that helps an ice cream seller in a hot country calculate how many ice creams they are likely to sell on a particular day. Your algorithm should: • get the user to enter whether it is the weekend or a weekday • get the user to enter the temperature forecast in degrees Celsius (they should enter a number between 20 and 45 inclusive; if the number falls outside of this range then they should be made to re-enter another number until they enter a valid temperature) • calculate the number of ice creams that are likely to be sold using the following information: o 100 ice creams are likely to be sold if the temperature is between 20 and 30 degrees inclusive, o 150 ice creams are likely to be sold if the temperature is between 31 and 38 degrees inclusive, o and 120 ice creams are likely to be sold if the temperature is higher than 38 degrees • double the estimate if it is a weekend • output the estimated number of ice creams that are likely to be sold. [9 marks]