Class 03 – Friday February 5

March on even though it’s February

Together we learn — To say what we mean to say — Most valuable skill

What makes me happy — Students asking their questions — So please keep it up.

That Black Lives Matter — Should be so easy to grasp — People are people


Look both ways


Extra download


Quote of the day


Last class – any questions?


What is happening today


Examples of the day – please download now

a = 25

b = 12

c = -3

d = 2.71

a + b = 37

a - b = 13

a * b = 300

a / b = 2.0833333333333335

a // b = 2

a % b = 1

a ** b = 59604644775390625

abs( c ) = 3

float( c ) = -3.0

int( d ) = 2

x = 11.12

y = 3.14

x + y = 14.26

x - y = 7.979999999999999

x * y = 34.9168

x / y = 3.54140127388535

x // y = 3.0

x % y = 1.6999999999999988

x ** y = 1926.500082524014

int( x ) = 11

a = 10

x = 2.75

a + x = 12.75

a - x = 7.25

a * x = 27.5

a / x = 3.6363636363636362

a // x = 3.0

a % x = 1.75

a ** x = 562.341325190349

### operator + performs concatenation

a = fire

b = fighter

a + b = firefighter

### * operator produces repeated concatenation

m = Wahoo-Wah!

n = 3

m * n = Wahoo-Wah!Wahoo-Wah!Wahoo-Wah!

n * m = Wahoo-Wah!Wahoo-Wah!Wahoo-Wah!



Terminology to which you should become accustomed

•   Variable            

•   Value        

•   Operator            

•   Concatenation            

•   Decimal division            

•   Integer division            

•   Remainder            

•   Mod

•   Type

•   Type int            

•   Type float

•   Type str

•   Keyword


Does piaget.py (de)bug you

Purpose: correct errant code

Author: Jim Cohoon

Id: jpc

  print( We learn best, when we must invent. -- Jean Piaget



Python arithmetic


Keywords


To do list


Take aways

  • Takes two strings s and t and produces a new string by first copying s and immediately following it with a copy of t
  • Takes its integer n operand and its string operand s and produces a new string that is n copies of s

We are star dust

viawWikipedia:fFull-sky image derived from 2009 NASA  WMAP data

Do you play

open clipart derived crwth

 


  🦆 © 2022 Jim Cohoon   Resources from previous semesters are available.