Think Python C1: Difference between revisions
(New page: = Chapter 1: The way of the program = == Exercise 1.1 == Good structure / bad tokens ->Ever3b0dy has w0n, and ell mast heve priz3s. Bad structure / good tokens ->Everybody won has, must...) |
|||
Line 11: | Line 11: | ||
== Exercise 1.4 == | == Exercise 1.4 == | ||
a. Average time per mile | a. Average time per mile | ||
Line 41: | Line 41: | ||
answer: 8.57 miles / hour | answer: 8.57 miles / hour | ||
Latest revision as of 11:04, 15 October 2008
Chapter 1: The way of the program
Exercise 1.1
Good structure / bad tokens ->Ever3b0dy has w0n, and ell mast heve priz3s.
Bad structure / good tokens ->Everybody won has, must have prizes all and.
Exercise 1.4
a. Average time per mile
43 min 30 secs = 43.5 minutes
10km * 1 mile = 10 / 1.61 = 6.21 miles ---- 1.61 km
43.5 minutes = (43.5 / 6.21) ---- 6.21 miles
all together:
>>> 43.5 / (10 / 1.61) 7.0035000000000007
answer: 7.00 minutes per mile
b. Average miles per hour
6.21 miles * 60 minutes ---- ---- 43.5 minutes 1 hour
>>> (6.21 / 43.5) * 60 8.565517241379311
answer: 8.57 miles / hour