Python 4 and 5 Mr. Husch.

Slides:



Advertisements
Similar presentations
Python Programming Chapter 2: Variables, expressions, and statements Saad Bani Mohammad Department of Computer Science Al al-Bayt University 1 st 2011/2012.
Advertisements

Testing a program Remove syntax and link errors: Look at compiler comments where errors occurred and check program around these lines Run time errors:
General Programming Introduction to Computing Science and Programming I.
STRINGS CMSC 201 – Lab 3. Overview Objectives for today's lab:  Obtain experience using strings in Python, including looping over characters in strings.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley STARTING OUT WITH Python Python First Edition by Tony Gaddis Chapter 2 Input,
Input, Output, and Processing
Introducing Python CS 4320, SPRING Format: Field widths and Alignment The string representation of a value can be padded out to a specific width.
Rational Numbers. Numbers that can be written as a ratio (a fraction) All Integers are Rational Numbers because they can be written as a fraction: 7 =
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley C H A P T E R 2 Input, Processing, and Output.
COMP 171: Data Types John Barr. Review - What is Computer Science? Problem Solving  Recognizing Patterns  If you can find a pattern in the way you solve.
Python Programming Using Variables and input. Objectives We’re learning to use basic knowledge of variables combined with user input. Outcomes Continue.
PHP - 1h. How it works Client requests document Server loads document in memory Server processes document with relevant module (PHP) Server sends XHTML.
What am I? while b != 0 if a > b a := a − b else b := b − a return a AST == Abstract Syntax Tree.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley STARTING OUT WITH Python Python First Edition by Tony Gaddis Chapter 2 Input,
PROGRAMMING IN PYTHON LETS LEARN SOME CODE TOGETHER!
NAME Python Programming Workbook Select a Lesson:
Introduction to Text Based Coding. We’re learning to explore how text based programming works You will display and enter text into a window You will use.
COMPUTER PROGRAMMING Year 9 – lesson 1. Objective and Outcome Teaching Objective We are going to look at how to construct a computer program. We will.
JUST BASIC Lessons 6 – 9 Mr. Kalmes.
Lesson 03: Variables and Types
Introduction to Computing Science and Programming I
Topics Designing a Program Input, Processing, and Output
CS170 – Week 1 Lecture 3: Foundation Ismail abumuhfouz.
Python 6 Mr. Husch.
Variables, Expressions, and IO
Programming, Data & Testing
String Manipulation.
Learning to Program in Python
Python 18 Mr. Husch.
Learning to Program in Python
Python Lesson 6 Mr. Kalmes.
Python 17 Mr. Husch.
Python Mr. Husch.
Use proper case (ie Caps for the beginnings of words)
Python Lessons 9 & 10 Mr. Kalmes.
Learning Outcomes –Lesson 4
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.
COMPUTER PROGRAMMING PYTHON
Mini Python Project Lesson 3.
For -G7 programing language Teacher / Shamsa Hassan Alhassouni.
Python 21 Mr. Husch.
Lesson 03: Variables and Types
Basic Lessons 7&8 Mr. Husch.
Python 17 Mr. Husch.
Python Lessons 9 & 10 Mr. Husch.
Python 19 Mr. Husch.
Topics Designing a Program Input, Processing, and Output
Python Lesson’S 1 & 2 Mr. Kalmes.
Topics Designing a Program Input, Processing, and Output
Just Basic Lessons 7&8 Mr. Kalmes.
Python 16 Mr. Husch.
PYTHON LESSON 5 Mr. Kalmes.
Just Basic Lessons 9 Mr. Kalmes.
Python Lessons 7 & 8 Mr. Kalmes.
Python 3 Mr. Husch.
Data Types Every variable has a given data type. The most common data types are: String - Text made up of numbers, letters and characters. Integer - Whole.
Python Inputs Mr. Husch.
Python Lessons 13 & 14 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.
Just Basic Lessons Mr. Kalmes.
Python 8 Mr. Husch.
Basic 9 Mr. Husch.
Starter Activities GCSE Python.
Hardware is… Software is…
Python Creating a calculator.
Presentation transcript:

Python 4 and 5 Mr. Husch

Objective Create code using strings Deduce how to code strings Create a syntax error log

%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.

Type in this program Lastname_4test

Questions about the code What are the variables in the code? What are the strings?

Start of lesson 5 Open a google drive document for you to keep track of your syntax errors. When you get a syntax error put in the drive what it said the error was and what you did to correct it.

Create this program, call it lastname5 DO NOT TURN IN YET

How to add comments To add a comment you use the # symbol.

Additions to the code, then turn it in. Place a comment line explaining what each section of code does. What does the “.” * 10 do? Answer with a comment in the code What does the comma after end6 do? Answer with a comment in the code. What happens when you remove the comma after end6? Answer with a comment in the code. Log any mistakes you made, review them, and do not repeat them in your next code. Use your google drive.