Python Lesson 6 Mr. Kalmes.

Slides:



Advertisements
Similar presentations
Computing Science Software Design and Development SOFTWARE DESIGN AND DEVELOPMENT USING PYTHON.
Advertisements

ECS15 for and sequence. Comments  Another way to repeat.
Python November 18, Unit 7. So Far We can get user input We can create variables We can convert values from one type to another using functions We can.
Python programs How can I run a program? Input and output.
Logic and Systems A beginner’s guide.
Lesson 4 Using Variables in Python – Creating a Simple ChatBot Program.
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.
Maths in Python [ slide 5 ] 1.Copy the table 2.Race a friend with a calculator to see whether Python is faster than a calculator: a) 5 * 6.5 = b)7 / 3.
End of unit assessment Challenge 1 & 2. Course summary So far in this course you have learnt about and used: Syntax Output to screen (PRINT) Variables.
Sequencing The most simple type of program uses sequencing, a set of instructions carried out one after another. Start End Display “Computer” Display “Science”
A First Program CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington Credits: a significant part of.
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.
Python Programming Lecture II. Getting Started with Python When you start idle Python prompt should appear looking something like this: Python 2.3 (#46,
GCSE COMPUTER SCIENCE Practical Programming using Python
JUST BASIC Lessons 6 – 9 Mr. Kalmes.
Introduction to Computing Science and Programming I
Introduction to Programming
Fundamentals of Python: First Programs
Lesson 1 - Sequencing.
Introduction to Python
Lesson 1 An Introduction
Section 64 – Manipulating Data Using Methods – Java Swing
Python 6 Mr. Husch.
Variables, Expressions, and IO
Formatting Output.
Python Lesson 3 Mr. Kalmes.
Python I/O.
And now for something completely different . . .
Use proper case (ie Caps for the beginnings of words)
Python Lessons 9 & 10 Mr. Kalmes.
For -G7 programing language Teacher / Shamsa Hassan Alhassouni.
Programming In Lesson 3.
Python Lessons 13 & 14 Mr. Kalmes.
Just Basic lesson 16 Mr. Kalmes.
Coding Concepts (Basics)
Java Lesson 36 Mr. Kalmes.
Python Lesson 21 Mr. Kalmes.
Python 9 Mr. Husch.
Python 21 Mr. Husch.
Just Basic Lessons Mr. Kalmes.
Python Lessons 9 & 10 Mr. Husch.
Python 19 Mr. Husch.
Just Basic Lesson 17 Part 1 Mr. Kalmes.
Just Basic Lessons 14 Mr. Kalmes.
Python Lesson’S 1 & 2 Mr. Kalmes.
What is x? x = 12 %
Just Basic Lessons 7&8 Mr. Kalmes.
Just Basic Lesson 15 Mr. Kalmes.
PYTHON LESSON 5 Mr. Kalmes.
Basic Lessons 5 & 6 Mr. Kalmes.
Just Basic Lesson 12 Mr. Kalmes.
Just Basic Lessons 9 Mr. Kalmes.
Just Basic Lesson 20 Mr. Kalmes.
Just Basic Lesson 19 Mr. Kalmes.
Python Lessons 7 & 8 Mr. Kalmes.
Python 3 Mr. Husch.
Python Inputs Mr. Husch.
Python Lessons 13 & 14 Mr. Husch.
Java Lessons Mr. Kalmes.
Basic Mr. Husch.
Python 19 Mr. Husch.
Python 10 Mr. Husch.
Just Basic Lesson 13 Mr. Kalmes.
Python 4 and 5 Mr. Husch.
Python 8 Mr. Husch.
Python 13 Mr. Husch.
Just Basic Lessons 8 Mr. Kalmes.
Python Creating a calculator.
Getting Started in Python
PYTHON - VARIABLES AND OPERATORS
Presentation transcript:

Python Lesson 6 Mr. Kalmes

Objective Understand the difference between %r, %s, & %d Understand how to use inputs in python

%R, %S, %D What’s the difference %R = Raw Data. It will print in the format it is written in %S = String Data. Mainly used for alpha characters %D = Integer Data. Mainly used for numeric characters

Enter the following code: Save as Lastname_python6

We now have a little baseline, for the rest of class work on the following website. https://www.codecademy.com/learn/python

How to use input in Python. INPUT is a function in Python 2, the one that we are using, but it does not work the way you would expect it to. It is looking for you to run code inside the input, something that you will not really be doing right now. Raw_input will allow users to input something into the program and have the program use the information like a string, which is what you will want most of the time.

Practice using inputs Create a program for me that has 15 raw_inputs and displays them. Combine a few of the inputs into a single print

Exit Slip 1) What changes from the code to the display in the one, two, three, four sequence? 2) What are parentheses used for in this code? 3) What changes to the code if you switch %r to %s? Log any errors and do not repeat them next time