Skip to content

Commit

Permalink
Fix import and test issues
Browse files Browse the repository at this point in the history
  • Loading branch information
danielluyi committed Jan 11, 2025
1 parent 1aa2b9d commit 6f2d35c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions solutions/temperature_converter.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Function that converts celsius to Fahrenheit
# Function that converts Celsius to Fahrenheit
def celsius_to_fahrenheit(celsius):
"""
Converts the inputted temperature from Celsius to Fahrenheit.
Expand All @@ -9,13 +9,13 @@ def celsius_to_fahrenheit(celsius):
return (celsius * 9 / 5) + 32


# Ensure this code block only executes when the script is run directly
if __name__ == "__main__":
# Get user input
celsius = float(input("Enter temperature in Celsius: "))

# Call the function and get the Fahrenheit value
fahrenheit = celsius_to_fahrenheit(celsius)

# Display the result
print(f"{celsius}°C is equal to {fahrenheit}°F.")
# Program that converts Celsius to Fahrenheit
# Display the result
print(f"{celsius}°C is equal to {fahrenheit}°F.")
2 changes: 1 addition & 1 deletion solutions/tests/test_temperature_converter.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import unittest

from ..temperature_converter import celsius_to_fahrenheit
from solutions.temperature_converter import celsius_to_fahrenheit


class TestConverter(unittest.TestCase):
Expand Down

0 comments on commit 6f2d35c

Please sign in to comment.