September 2013
Intermediate to advanced
350 pages
9h 38m
English
With what you’ve learned so far, to print the items from a list of velocities of falling objects in metric and Imperial units, you would need to write a call on function print for each velocity in the list:
| | >>> velocities = [0.0, 9.81, 19.62, 29.43] |
| | >>> print('Metric:', velocities[0], 'm/sec;', |
| | ... 'Imperial:', velocities[0] * 3.28, 'ft/sec') |
| | Metric: 0.0 m/sec; Imperial: 0.0 ft/sec |
| | >>> print('Metric:', velocities[1], 'm/sec;', |
| | ... 'Imperial:', velocities[1] * 3.28, 'ft/sec') |
| | Metric: 9.81 m/sec; Imperial: 32.1768 ft/sec |
| | >>> print('Metric:', velocities[2], 'm/sec; ', |
| | ... ... |
Read now
Unlock full access