Python 6 Mr. Husch.

Slides:



Advertisements
Similar presentations
Sample Test 1 Question. A pattern of binary digits can be interpreted in several different ways. Show how the pattern translates using each of.
Advertisements

Bit Representation Outline
An Introduction to Programming with C++ Fifth Edition Chapter 4 Chapter 4: Variables, Constants, and Arithmetic Operators.
An Introduction to Programming with C++ Fifth Edition Chapter 4 Chapter 4: Variables, Constants, and Arithmetic Operators.
Chapter 2 Data Types, Declarations, and Displays
Simple Data Type Representation and conversion of numbers
1 Digital Technology and Computer Fundamentals Chapter 1 Data Representation and Numbering Systems.
Writing Web Pages By Shyam Gurram. Agenda Writing Web Pages Delimiting PHP Program Units. Displaying Output to Web Pages Putting Comments in PHP Programs.
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley C H A P T E R 2 Input, Processing, and Output.
Number Systems Ron Christensen CIS 121.
1 Data Representation Characters, Integers and Real Numbers Binary Number System Octal Number System Hexadecimal Number System Powered by DeSiaMore.
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.
CDP ECE Spring 2000 ECE 291 Spring 2000 Lecture 2: Number Systems & x86 Instructions Constantine D. Polychronopoulos Professor, ECE Office: 463.
Chapter2 Constants, Variables, and Data Types. 2.1 Introduction In this chapter, we will discuss –constants (integer, real, character, string, enum),symbolic.
By Mr. Muhammad Pervez Akhtar
Sample Test 1 Question This one includes ASCII.. Sample Test 1 Question Show how the pattern translates using each of the following interpretations.
Characters and Strings
Chapter 2 Variables and Constants. Objectives Explain the different integer variable types used in C++. Declare, name, and initialize variables. Use character.
Chapter 3 Using Variables, Constants, Formatting Mrs. UlshaferSept
GCSE COMPUTER SCIENCE Practical Programming using Python Lesson 4 - Selection.
28 Formatted Output.
Computer Science 210 Computer Organization
GCSE COMPUTER SCIENCE Practical Programming using Python
Chapter 2 Variables.
Topics Designing a Program Input, Processing, and Output
Chapter 2: Introduction to C++
Number Representation
Number Systems and Binary Arithmetic
CMSC201 Computer Science I for Majors Lecture 22 – Binary (and More)
Formatted Input/Output
Formatting Output.
Integer Real Numbers Character Boolean Memory Address CPU Data Types
ECE Application Programming
Chapter 3 Data Storage.
TMF1414 Introduction to Programming
EPSII 59:006 Spring 2004.
Chapter 3 Data Representation
Variables, Expressions, and IO
Why use Binary? There are only four rules for addition in binary compared to 100 in decimal [0+0=0 ; 0+1=1 ; 1+0=1; 1+1=10]
Formatted Input/Output
Chapter 2: Introduction to C++
Formatting Output.
Python Lesson 6 Mr. Kalmes.
Data Representation Data Types Complements Fixed Point Representation
Python Lessons 9 & 10 Mr. Kalmes.
Let’s get some practice!
Chapter 2 Variables.
Computer Science 210 Computer Organization
CEV208 Computer Programming
Digital Logic Design (CSNB163)
Python Lessons 9 & 10 Mr. Husch.
Topics Designing a Program Input, Processing, and Output
B065: PROGRAMMING Variables 1.
Topics Designing a Program Input, Processing, and Output
An Introduction to Programming with C++ Fifth Edition
GCSE COMPUTER SCIENCE Topic 3 - Data 3.4 Hexadecimal Conversion.
Module 2 Variables, Data Types and Arithmetic
Chapter 2 Variables.
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.
Data Types and Maths Programming Guides.
Python Inputs Mr. Husch.
Python Lessons 7 & 8 Mr. Husch.
Python 10 Mr. Husch.
Python 4 and 5 Mr. Husch.
Python 8 Mr. Husch.
Just Basic Lessons 8 Mr. Kalmes.
Variables and Constants
C How to Program, 6/e © by Pearson Education, Inc. All Rights Reserved.
Section 6 Primitive Data Types
Presentation transcript:

Python 6 Mr. Husch

Objective Practice more lines of code KEEP DOING YOUR ERROR LOG

What does the % sign do in the code we are about to look at? Format Symbol Conversion %c character %s string conversion via str() prior to formatting %i signed decimal integer %d %u unsigned decimal integer %o octal integer %x hexadecimal integer (lowercase letters) %X hexadecimal integer (UPPERcase letters) %e exponential notation (with lowercase 'e') %E exponential notation (with UPPERcase 'E') %f floating point real number %g the shorter of %f and %e %G the shorter of %f and %E %r is not on that chart, why not? %r is an unambiguous string, something that may need to change formats as it is reading. Traditionally you would use %s for a string, but if %s is not defined it will allow you to use %r in place of it. I do not know why this lesson wants us to use %r instead of %s, both should work the same with one difference in the final run code.

Enter the following code: Save as Lastname_python6

Questions: Answer in your Journal For Question 3 you will need to edit the code. 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

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