Presentation is loading. Please wait.

Presentation is loading. Please wait.

Python 21 Mr. Husch.

Similar presentations


Presentation on theme: "Python 21 Mr. Husch."— Presentation transcript:

1 Python 21 Mr. Husch

2 Aim Practice conditional thinking
Create conditional statements in Python Aim

3 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

4 Save this as python21

5 The program should run in the shell.
Run the program

6 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

7 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


Download ppt "Python 21 Mr. Husch."

Similar presentations


Ads by Google