CBSE Class 12 Computer Science Question 103 of 105

Python Revision Tour — Question 9

Back to all questions
9
Question

Question 9

Write a program that prints a table on two columns — table that helps converting miles into kilometers.

Solution
print('Miles | Kilometres')
print(1, "\t", 1.60934)
for i in range(10, 101, 10):
    print(i, "\t", i * 1.60934)
Output
Miles | Kilometres
1        1.60934
10       16.0934
20       32.1868
30       48.2802
40       64.3736
50       80.467
60       96.5604
70       112.6538
80       128.7472
90       144.8406
100      160.934
Answer