What is x? x = 12 % 5 5 12 1 2 3 4.

Slides:



Advertisements
Similar presentations
ECS 15 if and random. Topic  Testing user input using if statements  Truth and falsehood in Python  Getting random numbers.
Advertisements

ITEC 109 Lecture 19 For loops. Review While loops –Sentinels –Counter variable –Break –Continue.
Find [G : H] if G = Z 18 and H =. (a) 1.5(b) 3 (c) 6(d) 9 (e) 12(f) 18 (g) None of the above.
Kids Can Save the PLANET Year 6. Lets watch a short video!!!
Course A201: Introduction to Programming 09/09/2010.
The if statement and files. The if statement Do a code block only when something is True if test: print "The expression is true"
PYTHON. Python is a high-level, interpreted, interactive and object- oriented scripting language. Python was designed to be highly readable which uses.
Instructor: Chris Trenkov Hands-on Course Python for Absolute Beginners (Spring 2015) Class #005 (April somthin, 2015)
Python Programming Using Variables and input. Objectives We’re learning to build functions and to use inputs and outputs. Outcomes Build a function Use.
Functions. Built-in functions You’ve used several functions already >>> len("ATGGTCA")‏ 7 >>> abs(-6)‏ 6 >>> float("3.1415")‏ >>>
Variables When programming it is often necessary to store a value for use later on in the program. A variable is a label given to a location in memory.
1 Computer Science of Graphics and Games MONT 105S, Spring 2009 Session 1 Simple Python Programs Using Print, Variables, Input.
Type your question here. Type Answer Type your question here. Type Answer.
Instructor: Chris Trenkov Hands-on Course Python for Absolute Beginners (Spring 2015) Class #001 (January 17, 2015)
My Python Programmes NAME:.
Dusty He likes explaining all these new and strange things to Dusty. Pod has been to Earth many times before and knows lots of.
INPUT & VARIABLES.
1. What does the text say? After actively reading the article and talking to the text, you are ready to tackle the 4 square. The first box is asking for.
GCSE Computing: Programming GCSE Programming Remembering Python.
Kindergarten Sight Words. Yes I can! Come here Look at me.
Very Hard Problems I am so not kidding about this. Please grab a handout.
Repetition In today’s lesson we will look at: why you would want to repeat things in a program different ways of repeating things creating loops in Just.
Instructor: Chris Trenkov Hands-on Course Python for Absolute Beginners (Spring 2015) Class #003 (February 14, 2015)
Hello Educational presentation.
Python 14 Mr. Husch.
Lesson 1 An Introduction
ECS10 10/10
Click here for the answer. Click here for the answer.
G7 programing language Teacher / Shamsa Hassan Alhassouni.
Click here for the answer. Click here for the answer.
Click here for the answer. Click here for the answer.
Twenty Questions Subject:.
While Loops (Iteration 2)
Type Topic in here! Created by Educational Technology Network
Adapted from slides by Marty Stepp and Stuart Reges
Python Lesson 6 Mr. Kalmes.
סדר דין פלילי – חקיקה ומהות ההליך הפלילי
Python Lessons 13 & 14 Mr. Kalmes.
Python 21 Mr. Husch.
مديريت موثر جلسات Running a Meeting that Works
Repetition In today’s lesson we will look at:

Inputs and Variables Programming Guides.
Twenty Questions Subject:.
ECS15 while.
Basic Lessons 5 & 6 Mr. Kalmes.
Twenty Questions Subject:.
You must show all steps of your working out.
Question 1.
Introduction to Python
Python Inputs Mr. Husch.
Python Lessons 13 & 14 Mr. Husch.
Basic Mr. Husch.
Twenty Questions Subject:.
Twenty Questions Subject:.
Errors.
Twenty Questions Subject:.
Twenty Questions Subject:.
More Strings.
Python 13 Mr. Husch.
Twenty Questions Subject:.
Nate Brunelle Today: Functions again, Scope
The Python interpreter
Starter Which of these inventions is: Used most by people in Britain
EE 194/Bio 196: Modeling biological systems
Welcome to Who Wants to be a Winner?.
Twenty Questions Subject:.
I do belive something happens.
Twenty Questions Subject:.
(Type Answer Here) (Type Answer Here) (Type Answer Here)
Presentation transcript:

What is x? x = 12 % 5 5 12 1 2 3 4

What does Python print if you type in when you run the program? 12 Here’s a program: hello = 12 response = input(‘Type something in: ‘) print response What does Python print if you type in 8 when you run the program? 12 response hello

What does Python print if you type in when you run the program? ‘6+5’ Here’s a program: hello = 12 response = input(‘Type something in: ‘) print response What does Python print if you type in 6+5 when you run the program? ‘6+5’ 11 hello response

What does Python print if you type in when you run the program? 12 Here’s a program: hello = 12 response = input(‘Type something in: ‘) print response What does Python print if you type in hello when you run the program? 12 ‘hello’ response

When should you use input instead of raw_input? When raw_input doesn’t get me the answer I want Never When Dave’s not looking When I want strange bugs to happen A and C B, or possibly D None of the above