-
Notifications
You must be signed in to change notification settings - Fork 1
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
Check_Number_Type #42
Conversation
Hi |
Returns: | ||
results will be a text whether "The number is even", "The number is odd" | ||
or "Enter a valid number " | ||
Examples : |
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 docstring includes only two doctests passing , Includes 3 or more passing doctests
|
||
Parameters: | ||
user_input (str): str | ||
Raises: |
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.
Each assertion checks for only one assumption about the argument, each argument have one like,
ValueError: .....
ValueError: .....
Thank you for your insightful commits @AzzaOmer1 |
solutions/check_number_type.py
Outdated
|
||
|
||
Parameters: | ||
user_input (str): str |
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.
explain more for input parameter
"The number is odd" | ||
>>> check_number_type("-11") | ||
"The number is odd" | ||
>>> check_number_type("") |
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.
Detail input assumptions and expand the Raises section to document defensive assertions thoroughly.
"The number is odd" | ||
>>> check_number_type("") | ||
"Input cannot be empty. Enter a valid number." | ||
>>> check_number_type("Eman") |
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.
Detail input assumptions and expand the Raises section to document defensive assertions thoroughly.
done all reviews |
name: solution review
about: A template PR for code review with a checklist
Behavior
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