-
Notifications
You must be signed in to change notification settings - Fork 8
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
fixed div function #4
base: master
Are you sure you want to change the base?
Conversation
@@ -8,7 +8,8 @@ def subtract(a, b): | |||
return 0 | |||
|
|||
def div(a, b): | |||
return a | |||
"""This function divides two numbers""" | |||
return a/b |
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.
This fails if b is 0
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.
This is not necessarily a bad thing though.
@@ -3,3 +3,6 @@ | |||
def test_add(): | |||
assert add(1, 2) == 3 | |||
|
|||
def test_div(): | |||
assert div(4, 2) == 2 | |||
|
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.
Add in a test for checking divide by 0
Please rebase on master |
No description provided.