Python 21 Mr. Husch
Aim Practice conditional thinking Create conditional statements in Python Aim
An if statement is a statement where an action will occur if certain conditions are met. For example, if my stomach growls, get me food! Or, if I am a body cast, I probably angered a pro wrestler. If Statements
Save this as python21
The program should run in the shell. Run the program
You will answer these questions as comments at the bottom of the code. 1) What are the variables in this expression? 2) What does the if statement do to the code that follows it? 3) Try it if the code under if isn’t indented. What happens? 4) What happens if you change the variables Add to the code
Python21.5 Create a new program. This program will need 14 if statements in it. This program will need to let the user input a number to have the statements print. Python21.5