Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Part 1: Are you rich?
- money = 2000
- if money > 1000:
- print("I'm rich!") # This is the segment that runs.
- else:
- print("I'm not rich!!")
- print("But I might be later...")
- # Part 2: Twinkies!
- twinkies = 300
- if twinkies < 100 or twinkies > 500:
- print("Too few or too many")
- # Part 3: Just the right number
- money = 4200
- if (100 <= money and money <= 500) or (1000 <= money and money <= 500):
- print("nice")
- # Part 4: I can fight those ninjas
- ninjas = 5
- if ninjas < 10:
- print("I can fight those ninjas")
- elif ninjas < 30:
- print("It’ll be a struggle, but I can take ’em.")
- elif ninjas < 50:
- print("That’s too many!")
Add Comment
Please, Sign In to add comment