Python Lessons 9 & 10 Mr. Kalmes.

Slides:



Advertisements
Similar presentations
Workshop Lesson 3: Terminating & Repeating Decimals 7 th Grade.
Advertisements

Fractions and Decimals
Percent to Decimal 1. Remove the % sign.
Slide 7- 1 Copyright © 2012 Pearson Education, Inc.
Rational numbers. Whole numbers Whole numbers Rational numbers Whole numbers Natural numbers Integers / ¾ 18% A rational number.
Instructor: Chris Trenkov Hands-on Course Python for Absolute Beginners (Spring 2015) Class #005 (April somthin, 2015)
Number System. Number Systems Important Number systems – Decimal – Binary – Hexadecimal.
Fractions, Decimals, and Percents
Type Conversions Implicit Conversion Explicit Conversion.
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.
Positional Number Systems Decimal, Binary, Octal and Hexadecimal Numbers Wakerly Section
Mathletes Fab Five Divide ) 122 2) ) 0.5.
The Real Numbers 4-7 Learn to determine if a number is rational or irrational.
Deer A deer has an antler spread of inches. Write this as a decimal Writing a Mixed Number as a Decimal EXAMPLE 2 5.
Aim: How to write in Scientific Notation DO NOW: 1. WHAT DOES 10 5 MEAN? 2. WHAT IS THE VALUE OF USING YOUR CALCULATOR, CALCULATE 4.5 X 10 6.
Converting Fractions and Decimals Objective: Learn to convert fractions and decimals.
Vocabulary: Rational number: ANY number that can be written as a FRACTION Every rational number can be written as either a terminating decimal or repeating.
Converting Decimals to Fractions Goal: use place values to make fractions.
Fractions and Decimal Fractions Fractions Decimal Fractions
3-8 to 3-10 Mixed Numbers and Improper Fractions What You’ll Learn To write a mixed number as an improper fraction To write a mixed number as an improper.
The Real Numbers 3-7 Warm Up Warm Up Lesson Presentation Lesson Presentation Problem of the Day Problem of the Day Lesson Quizzes Lesson Quizzes.
Input, Output and Variables GCSE Computer Science – Python.
Nat 4/5 Computing Science Lesson 1: Binary
Positional Number Systems Decimal, Binary, Octal and Hexadecimal Numbers Wakerly Section
Core Focus on Linear Equations
IGCSE 4 Cambridge Data types and arrays Computer Science Section 2
Variables and Expressions
Fractions and Decimals
Rational Numbers SWBAT define the set of rational numbers; identify subsets of rational numbers; write rational numbers in equivalent forms.
Python Lesson 6 Mr. Kalmes.
Unit 3: Rational Number Conversions
All numbers that can be represented on a number line are called real numbers and can be classified according to their characteristics.
Python Lesson 3 Mr. Kalmes.
Fractions and Decimals
Lesson How do you add and subtract fractions?
Learning Outcomes –Lesson 4
Python Lessons 13 & 14 Mr. Kalmes.
Lesson 9.1 How do you find and approximate the square root of a number? You need to find a number b such that
Java Lesson 36 Mr. Kalmes.
Python Lesson 21 Mr. Kalmes.
Ratios, Rates and Percents
Just Basic Lessons Mr. Kalmes.
Python Lessons 9 & 10 Mr. Husch.
Java Lessons 5 – 8 Mr. Kalmes.
Just Basic Lesson 17 Part 1 Mr. Kalmes.
Just Basic Lessons 14 Mr. Kalmes.
Unit 2. Day 14..
Rational Numbers: terminate or repeat a ratio of two integers,
Python Lesson’S 1 & 2 Mr. Kalmes.
Terminating and Repeating Decimals
Basic Lessons 5 & 6 Mr. Kalmes.
Just Basic Lessons 9 Mr. Kalmes.
Just Basic Lesson 19 Mr. Kalmes.
Conversions Decimals to Fractions and Fractions to Decimals.
Python Lessons 7 & 8 Mr. Kalmes.
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.
Java Lessons Mr. Kalmes.
Converting between Percentages, Decimals and Fractions
Bell Work Name which level(s) of the Real Number System each number falls into REAL NUMBERS RATIONAL NUMBERS IRRATIONAL NUMBERS INTEGERS WHOLE.
Conversions Decimals to Fractions and Fractions to Decimals.
Unit 2 Chapter 3 Real Numbers
Python 10 Mr. Husch.
Python 4 and 5 Mr. Husch.
Conversions Decimals to Fractions and Fractions to Decimals.
Say the decimal properly. Write the fraction, then simplify.
Slope intercept form is:
Python Creating a calculator.
Presentation transcript:

Python Lessons 9 & 10 Mr. Kalmes

Aims Recreate a program using raw input Understand functions in Python Create a program that combines python functions

Python Lesson 9

Lesson 9 Activity You must recreate lesson 4 activity 1 using nothing but raw inputs. You should have 7 raw inputs. After your inputs you need to print out the seven variables in a single line of code using %r instead of %s or %d.

Python Lesson 10

What’s new

New Stuff Function: a block of organized, reusable code that is used to perform a single, related action Float(): Also called floats, they represent real numbers and are written with a decimal point dividing the integer and fractional parts.  Round(x,n): Rounds the number x, to the n digits from the decimal

New Stuff Function: a block of organized, reusable code that is used to perform a single, related action Float(): Also called floats, they represent real numbers and are written with a decimal point dividing the integer and fractional parts.  Round(x,n): Rounds the number x, to the n digits from the decimal

Lesson 10 Activity You are to recreate slide 6 but add 4 more conversions. You should have all your inputs first , conversions second, and print out each conversion on a separate line

Exit Slip Questions What is a function? Write a line of code that converts the variable marvel to 3 decimal places