Margaret is making some special offers to customers - Edexcel - GCSE Computer Science - Question 8 - 2019 - Paper 1
Question 8
Margaret is making some special offers to customers.
(a) Customers can get a money off voucher for their favourite item.
- Customers whose favourite item is ice cr... show full transcript
Worked Solution & Example Answer:Margaret is making some special offers to customers - Edexcel - GCSE Computer Science - Question 8 - 2019 - Paper 1
Step 1
Choose ice cream or cookies?
96%
114 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
Output a message asking the user to choose between ice cream and cookies.
Step 2
Choice == ice cream?
99%
104 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
If the choice is ice cream, print 'ice cream voucher'.
Step 3
Choice == cookies?
96%
101 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
If the choice is cookies, print 'cookie voucher'.
Step 4
If neither choice?
98%
120 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
If the customer does not choose either, print 'drink voucher'.
Step 5
Stop
97%
117 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!