PYTHON - Using the for loop make a table that shows the distance in miles and kilometers.
Fantastic news! We've Found the answer you've been seeking!
Question:
PYTHON - Using thefor loopmake a table that shows the distance in miles and kilometers. The table will begin with a value of 5 for miles and continue up to 100 miles in increments of five miles. To compute Km multiply miles by 1.609. Round the Km value to 2 decimal places. The results should be as follows:
Miles | Km |
5 | 8.05 |
10 | 16.09 |
15 | 24.14 |
20 | 32.18 |
25 | 40.23 |
30 | 48.27 |
35 | 56.32 |
40 | 64.36 |
45 | 72.41 |
50 | 80.45 |
55 | 88.50 |
60 | 96.54 |
65 | 104.59 |
70 | 112.63 |
75 | 120.68 |
80 | 128.72 |
85 | 136.77 |
90 | 144.81 |
95 | 152.86 |
100 | 160.90 |
Posted Date: