Python 21 Mr. Husch.

Slides:



Advertisements
Similar presentations
C++ Basics March 10th. A C++ program //if necessary include headers //#include void main() { //variable declaration //read values input from user //computation.
Advertisements

From Scratch to Python Learn to program like the big boys / girls!
Python Programming Using Variables and input. Objectives We’re learning to make use of if statements to enable code to ask questions. Outcomes Build an.
Python Programming Using Variables and input. Objectives We’re learning to build functions and to use inputs and outputs. Outcomes Build a function Use.
Hey, Ferb, I know what we’re gonna do today! Aims: Use formatted printing. Use the “while” loop. Understand functions. Objectives: All: Understand and.
By Chad Blankenbeker.  The for-loop is best used when you know how many times it is going to be looped  So if you know you want it to only loop 10 times,
My Python Programmes NAME:.
Decision Structures and Boolean Variables. Sequence Structures Thus far, we’ve been programming “sequence structures” Thus far, we’ve been programming.
PROGRAMMING IN PYTHON LETS LEARN SOME CODE TOGETHER!
Python Lesson 2.
Debugging and Printing George Mason University. Today’s topics Review of Chapter 3: Printing and Debugging Go over examples and questions debugging in.
For Loop GCSE Computer Science – Python. For Loop The for loop iterates over the items in a sequence, which can be a string or a list (we will discuss.
Controlling Program Structures. Big Picture We are learning how to use structures to control the flow of our programs Last week we looked at If statements.
Introduction to Scratch We will be using the Scratch Environment today, so please log in to the Scratch website (scratch.mit.edu)
Few More Math Operators
Whatcha doin'? Aims: To start using Python. To understand loops.
Python 23 Mr. Husch.
Python Lesson 12 Mr. Kalmes.
Introduction to Programming
Python 14 Mr. Husch.
Lesson 05: Iterations Class Chat: Attendance: Participation
Think What will be the output?
My Final Project: Calorie Counter
While Loops in Python.
Python 18 Mr. Husch.
Python Lesson 6 Mr. Kalmes.
Computer Science and an introduction to Pascal
Python 17 Mr. Husch.
Python Mr. Husch.
Learning to Program in Python
Python Lessons 9 & 10 Mr. Kalmes.
Programming In Lesson 3.
Escape sequences: Practice using the escape sequences on the code below to see what happens. Try this next code to help you understand the last two sequences.
Python Lessons 13 & 14 Mr. Kalmes.
COMPUTER PROGRAMMING PYTHON
IST256 : Applications Programming for Information Systems
Repetition Structures
Python Lesson 21 Mr. Kalmes.
Python 9 Mr. Husch.
Python 17 Mr. Husch.
Python Lessons 9 & 10 Mr. Husch.
A look at Python Programming Language 2018.
Python programming exercise
Python 19 Mr. Husch.
Python Lesson’S 1 & 2 Mr. Kalmes.
Python Basics with Jupyter Notebook
Programming In Lesson 4.
What is x? x = 12 %
Python 16 Mr. Husch.
Basic Lessons 5 & 6 Mr. Kalmes.
Python While Loops.
Input and Output Python3 Beginner #3.
Introduction to Python
Python 3 Mr. Husch.
Python Inputs Mr. Husch.
Python Lessons 13 & 14 Mr. Husch.
Basic Mr. Husch.
Python 16 Mr. Husch.
Python 19 Mr. Husch.
Python Lessons 7 & 8 Mr. Husch.
Python 10 Mr. Husch.
Python 18 Mr. Husch.
Python 12 Mr. Husch.
Python 4 and 5 Mr. Husch.
Python 8 Mr. Husch.
Python 13 Mr. Husch.
Basic 9 Mr. Husch.
While Loops in Python.
Iteration – While Loops
Presentation transcript:

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