Skip to content

Commit 191549c

Browse files
author
DirDraggo
committed
added 6.4.9
1 parent 45e6799 commit 191549c

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)