-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
challenge_23 : about temperature_conversion #48
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Error Handling: You raise ValueError with clear messages, which is great for users and debugging.
Code Simplicity: The code is easy to follow and doesn’t contain unnecessary complexity. Great job keeping things clean!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Error Handling: You raise ValueError with clear messages, which is great for users and debugging.
Code Simplicity: The code is easy to follow and doesn’t contain unnecessary complexity. Great job keeping things clean!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docstring Clarity and Examples
Your docstring is very well-written, and the examples are useful. However, it can be made slightly more concise.
You should specify that the function works with a list of numerical values (either integers or floats), and mention that it rounds the results to 2 decimal places.
The phrase "invalid elements" in the Raises section could be clarified as "non-numeric elements".
Error Handling: You raise ValueError with clear messages, which is great for users and debugging.
Code Simplicity: The code is easy to follow and doesn’t contain unnecessary complexity. Great job keeping things clean!
Thanks for your suggested change Clifford. But for the invalid input i specify kind of it is. Because there's different type of invalid input. |
name: solution review temperature_conversion
about: A template PR for code review with a checklist
Behavior
The program should accept a list of temperatures in Celsius as input.
It should output a list of corresponding temperatures converted to Fahrenheit.
The conversion should follow the formula: 𝐹 = (9 / 5 ) C + 32
The program should handle positive, negative, and zero temperatures correctly.
It should also correctly process an empty list by returning an empty list.
The program should handle floating point numbers accurately.
Any invalid input (such as None, strings, or dictionaries) should raise an appropriate error.
Files
/tests/test_file_name.py
Unit Tests
Function Docstring
Raises:
The Function
Strategy
Do's
Don'ts
Implementation
when it's too restricting.
print
statements anywhere