Python Boolean Exercises
From WLCS
Contents
Objectives
- You will learn to use if-statements to control program flow
- You will learn to write Boolean logic expressions
- You will learn to combine multiple logic expressions using:
- and
- or
- not
Directions
- Open Wing IDE 101
- Complete the following Python exercises
References
Exercises
- Slurpee Exercise
- Prompt the user to see if they are near a 7-11 (yes/no)
- Prompt the user to see how much money they have
- Using a single if-else statement, print out whether or not they can purchase a slurpee
- To buy a slurpee, the user needs to be near a 7-11 AND have at least $3