We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cfeac76 commit d0e42d4Copy full SHA for d0e42d4
temp.py
@@ -0,0 +1,10 @@
1
+# TempConvert.py
2
+val =input("Please input the temp with temprature symbol: ")
3
+if val[-1] in ['C','c']:
4
+ f = 1.8 * float(val[0:-1])+32
5
+ print("The converted temorature is: %.2fF"%f)
6
+elif val[-1] in ['F','f']:
7
+ c = (float(val[0:-1])-32)/1.8
8
+ print("The converted temprature is: %.2fC"%c)
9
+else:
10
+ print("wrong input")
0 commit comments