-
-
Notifications
You must be signed in to change notification settings - Fork 84
Expand file tree
/
Copy pathprogram.py
More file actions
17 lines (13 loc) · 591 Bytes
/
program.py
File metadata and controls
17 lines (13 loc) · 591 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
celsius_1 = float(input("Temperature value in degree Celsius: " ))
# For Converting the temperature to degree Fahrenheit by using the above
# given formula
Fahrenheit_1 = (celsius_1 * 1.8) + 32
# print the result
print('The %.2f degree Celsius is equal to: %.2f Fahrenheit'
%(celsius_1, Fahrenheit_1))
print("----OR----")
celsius_2 = float (input("Temperature value in degree Celsius: " ))
Fahrenheit_2 = (celsius_2 * 9/5) + 32
# print the result
print ('The %.2f degree Celsius is equal to: %.2f Fahrenheit'
%(celsius_2, Fahrenheit_2))