We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 45e6799 commit 191549cCopy full SHA for 191549c
CodeHS/6/4/9/Temperature-Converter-Travis.py
@@ -0,0 +1,25 @@
1
+# Write your function for converting Celsius to Fahrenheit here.
2
+# Make sure to include a comment at the top that says what
3
+# each function does!
4
+def convert_celsius_to_fahrenheit(num):
5
+ return float((num - 32) / 1.8)
6
+
7
8
9
+# Now write your function for converting Fahrenheit to Celsius.
10
+def convert_fahrenheit_to_celsius(num):
11
+ return float((1.8 * num) + 32)
12
13
14
15
+# Now change 0C to F:
16
+print convert_celsius_to_fahrenheit(0)
17
18
+# Change 100C to F:
19
+print convert_celsius_to_fahrenheit(100)
20
21
+# Change 40F to C:
22
+print convert_fahrenheit_to_celsius(40)
23
24
+# Change 80F to C:
25
+print convert_fahrenheit_to_celsius(80)
0 commit comments