We need a simple utility module to support common string and math operations across the codebase.
Please create a new file called utils.py and implement the following functions:
Reverse a string
Count the number of words in a sentence
Convert Celsius to Fahrenheit
Calculate the average of a list of numbers
This is intended to be a lightweight utility module that can be reused across different parts of the application.
Acceptance Criteria:
All functions are implemented in utils.py
Code is clean, readable, and follows standard Python conventions
Basic edge cases are considered (e.g., empty inputs where applicable)
Functions include simple docstrings explaining their purpose
Notes:
Keep the implementation simple and easy to understand
This will serve as a foundational utility file that may be expanded over time
We need a simple utility module to support common string and math operations across the codebase.
Please create a new file called utils.py and implement the following functions:
Reverse a string
Count the number of words in a sentence
Convert Celsius to Fahrenheit
Calculate the average of a list of numbers
This is intended to be a lightweight utility module that can be reused across different parts of the application.
Acceptance Criteria:
All functions are implemented in utils.py
Code is clean, readable, and follows standard Python conventions
Basic edge cases are considered (e.g., empty inputs where applicable)
Functions include simple docstrings explaining their purpose
Notes:
Keep the implementation simple and easy to understand
This will serve as a foundational utility file that may be expanded over time