Skip to content

Commit f6a119c

Browse files
committed
added changes to pass the travis-ci test
1 parent d966cd3 commit f6a119c

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

conversions/celsius_to_fahrenheit.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
""" Convert temperature from Celsius to Fahrenheit """
22

3+
34
def celsius_to_fahrenheit(celsius):
45
"""
56
Convert a given value from Celsius to Fahrenheit
@@ -26,9 +27,10 @@ def celsius_to_fahrenheit(celsius):
2627
"""
2728
raise TypeError("'str' object cannot be interpreted as integer")
2829

29-
fahrenheit = (celsius * 9/5) + 32 # value converted from celsius to fahrenheit
30+
fahrenheit = (celsius * 9 / 5) + 32 # value converted from celsius to fahrenheit
3031
print(fahrenheit)
3132

33+
3234
if __name__ == "__main__":
3335
import doctest
34-
doctest.testmod()
36+
doctest.testmod()

conversions/fahrenheit_to_celsius.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
""" Convert temperature from Fahrenheit to Celsius """
22

3+
34
def fahrenheit_to_celsius(fahrenheit):
45
"""
56
Convert a given value from Fahrenheit to Celsius and round it to 2 d.p.
@@ -27,13 +28,12 @@ def fahrenheit_to_celsius(fahrenheit):
2728
"""
2829
raise TypeError("'str' object cannot be interpreted as integer")
2930

30-
31-
celsius = (fahrenheit - 32)*5/9 # value converted from fahrenheit to celsius
32-
celsius = round(celsius, 2)
31+
celsius = (fahrenheit - 32) * 5 / 9 # value converted from fahrenheit to celsius
32+
celsius = round(celsius, 2)
3333
# converted (celsius) value is rounded to two decimal places
3434
print(celsius)
3535

36+
3637
if __name__ == "__main__":
3738
import doctest
38-
doctest.testmod()
39-
39+
doctest.testmod()

0 commit comments

Comments
 (0)