Class 6 – Monday, January 28

Fearlessly we march on — strings and input

A sign for knowing — what the future asks of us — demands we act now

Wah-wah — You've given me a wah-wah — And I'm thinking of you — And all the things that we used to do — Wah-wah, wah-wah
    — George Harrison


Look both ways


Agenda


Illumination


Examples

Python approximation of pi: 3.141592653589793

Python approximation of Euler's number: 2.718281828459045

 

sin( 30 degrees ): 0.49999999999999994

tan( 45 degrees ): 0.9999999999999999

 

Enter two numbers: 12 -15

n1 = 12

n2 = -15

 

max( n1, n2 ): 12

min( n1, n2 ): -15

 

abs( n1 ): 12

abs( n2 ): 15

Python approximation of pi: 3.141592653589793

Python approximation of Euler's number: 2.718281828459045

 

sin( 30 degrees ): 0.49999999999999994

tan( 45 degrees ): 0.9999999999999999

 

Enter two numbers: -11 19

n1 = -11

n2 = 19

 

max( n1, n2 ): 19

min( n1, n2 ): -11

 

abs( n1 ): 11

abs( n2 ): 19


Enquiring minds want to know


Homework requirements


In-class homework requirements



Program all_consuming.py — due Wednesday January 30

What is something you consume daily? slices of cheese

Enter slices of cheese consumed on a normal weekday: 4

Enter slices of cheese consumed on a normal weekend day: 12

You consume 2288 slices of cheese per year.

What is something you consume daily? paper napkins

Enter paper napkins consumed on a normal weekday: 6

Enter paper napkins consumed on a normal weekend day: 0

You consume 1560 paper napkins per year.



To do list



image from wikimedia.org, George Harrison Wah-Wah Single Cover