Adventure 1

There are at least two locations:

  • Sidewalk: On the sidewalk you have a 30% chance of finding $5.

  • Store: In the store you can buy a sandwich ($10) or a key ($5).

You win the game when you end up on the sidewalk with a sandwich and a key.

Using random numbers

import random
a = random.randint(1,100)
if a <= 25:
    print("25% chance - you won")
else:
    print("75% chance - you lost")