Skip to content

Commit fc51376

Browse files
Merge pull request seeditsolution#290 from vedang6575/patch-2
update Python Program to Convert Celsius To Fahrenheit and Vice…
2 parents a18286b + 8aee6be commit fc51376

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed
Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
celsius = float(input('Enter temperature in Celsius: '))
2-
3-
4-
5-
6-
7-
fahrenheit = (celsius * 1.8) + 32
8-
9-
print('%0.1f Celsius is equal to %0.1f degree Fahrenheit'%(celsius,fahrenheit))
1+
fahrenheit = float(input("Enter temperature in fahrenheit: "))
2+
celsius = (fahrenheit - 32) * 5/9
3+
print('%.2f Fahrenheit is: %0.2f Celsius' %(fahrenheit, celsius))

0 commit comments

Comments
 (0)