Skip to content

Commit f7b2380

Browse files
committed
8/13
1 parent 3f71e37 commit f7b2380

File tree

3 files changed

+19
-4
lines changed

3 files changed

+19
-4
lines changed

__pycache__/ex8.cpython-310.pyc

533 Bytes
Binary file not shown.

ex8.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
def f_to_c(temp):
2+
Cel = (temp - 32) * 0.5556
3+
4+
return f"{temp} degrees Farenheit is {round(Cel)} degrees Celsius."
5+
6+
def c_to_f(temp):
7+
FarenH = (temp * 1.8) + 32
8+
9+
return f"{temp} degrees Celsius is {round(FarenH)} degrees Farenheit."

main.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,15 @@
4040
# ex7
4141
from ex7 import calc_total
4242

43-
array = [2.00, 4.00, 4.00]
44-
tax = "10%"
45-
result = calc_total(array, tax)
46-
print(result)
43+
# array = [2.00, 4.00, 4.00]
44+
# tax = "10%"
45+
# result = calc_total(array, tax)
46+
# print(result)
47+
48+
# ex8
49+
from ex8 import f_to_c, c_to_f
50+
51+
print(f_to_c(22))
52+
print(c_to_f(-6))
4753

4854

0 commit comments

Comments
 (0)