Q. Write a program that print a table on two column : on the left the integer temperatures between 0 and 100 (Fahrenheit) and in the right column the corresponding Celsius values.


Answer :-

print ("Celcius   |       Fahrenheit  ")

for i in range (1, 101):

    print ( i , end= "\t" )
    print ("|",end = "\t")
    print (9/5*i+32)

Output :-

Celcius   |       Fahrenheit  
1 | 33.8
2 | 35.6
3 | 37.4
4 | 39.2
5 | 41.0
6 | 42.8
7 | 44.6
8 | 46.4
9 | 48.2
10 | 50.0
11 | 51.8
12 | 53.6
13 | 55.400000000000006
14 | 57.2
15 | 59.0
16 | 60.8
17 | 62.6
18 | 64.4
19 | 66.2
20 | 68.0
21 | 69.80000000000001
22 | 71.6
23 | 73.4
24 | 75.2
25 | 77.0
26 | 78.80000000000001
27 | 80.6
28 | 82.4
29 | 84.2
30 | 86.0
31 | 87.80000000000001
32 | 89.6
33 | 91.4
34 | 93.2
35 | 95.0
36 | 96.8
37 | 98.60000000000001
38 | 100.4
39 | 102.2
40 | 104.0
41 | 105.8
42 | 107.60000000000001
43 | 109.4
44 | 111.2
45 | 113.0
46 | 114.8
47 | 116.60000000000001
48 | 118.4
49 | 120.2
50 | 122.0
51 | 123.8
52 | 125.60000000000001
53 | 127.4
54 | 129.2
55 | 131.0
56 | 132.8
57 | 134.60000000000002
58 | 136.4
59 | 138.2
60 | 140.0
61 | 141.8
62 | 143.60000000000002
63 | 145.4
64 | 147.2
65 | 149.0
66 | 150.8
67 | 152.60000000000002
68 | 154.4
69 | 156.2
70 | 158.0
71 | 159.8
72 | 161.6
73 | 163.4
74 | 165.20000000000002
75 | 167.0
76 | 168.8
77 | 170.6
78 | 172.4
79 | 174.20000000000002
80 | 176.0
81 | 177.8
82 | 179.6
83 | 181.4
84 | 183.20000000000002
85 | 185.0
86 | 186.8
87 | 188.6
88 | 190.4
89 | 192.20000000000002
90 | 194.0
91 | 195.8
92 | 197.6
93 | 199.4
94 | 201.20000000000002
95 | 203.0
96 | 204.8
97 | 206.6
98 | 208.4
99 | 210.20000000000002
100 | 212.0
>>>


1 Comments

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post