-
-
Notifications
You must be signed in to change notification settings - Fork 46.8k
add Rankine scale #2232
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
add Rankine scale #2232
Conversation
black formatting
Cool! Python's builtin round() function takes an optional parameter |
@@ -1,9 +1,11 @@ | |||
""" Convert between different units of temperature """ | |||
|
|||
|
|||
def celsius_to_fahrenheit(celsius: float) -> float: | |||
def celsius_to_fahrenheit(celsius: float, digits: int = 2) -> float: |
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.
The round()
parameter is ndigits
.
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.
Please also add a test or two to prove that ndigits
is respected.
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.
fixed
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.
tests coming in a new PR
Hey @lance-pyles, TravisCI finished with status TravisBuddy Request Identifier: 6a6ee590-cdec-11ea-98fb-f5dcae6af814 |
* add Rankine scale black formatting * add Wikipedia links * add optional rounding, default to 2 digits * fix variable name * fixed variable name; helps to stage before commiting
black formatting
Describe your change:
Checklist:
Fixes: #{$ISSUE_NO}
.