Download presentation
Presentation is loading. Please wait.
Published byDelilah Stevenson Modified over 6 years ago
1
--- Price List --- A - Marshmallow: £0.20 B - Bubble gum: £0.30
Start --- Price List --- A - Marshmallow: £0.20 B - Bubble gum: £0.30 C - Jelly Bean: £0.15 D - Candy Stick: £0.35 E - Cola Whips: £0.22 X - Exit Display price list money = Input “How much can you spend?” While money > 0 sweet = Input “Which sweet do you want to buy?” if sweet == “X” Break / Exit while loop quantity = input “How many sweet do you want to purchase?” if sweet == “A” sweet == “B” else if else if …. “C” …. “D” …. “E” cost = 0.20 * quantity cost = 0.30 * quantity if money > cost else Display “You do not have enough money” money = money - cost Display “Money left:” + money End
2
Player’s total Score 23 or less 0 Points Between 24 to 33
Limit 33 “Limit 33” is a simple game of adding a series of random numbers to a running total. The player’s aim it to reach a total as close as possible to 33 without taking this total over 33. Rules of the game: A player starts with a total of zero. On each turn a random number, between 1 and 10 is generated and added to the player’s total. If the player’s total exceeds 33, the player has lost and the games end: Game Over. At the end of each turn the player is asked whether they want to complete another turn or quit. If they quit, the player is given a score as follows: Zero points if their total is below 24 or above 33. 10 x (total – 23) points if their total is between 24 to 33. For instance with a total of 29, the player would score 10 x (29-23) = 60 Points. The maximum score they can reach is 10 x (33-23) = 100 when they reach a total of 33! Player’s total Score 23 or less 0 Points Between 24 to 33 total – 23 points Above 33 0 Points – Game Over
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.