Skip to content

Update sum.py#4

Open
DariaGorbach wants to merge 1 commit intoagbragin:masterfrom
DariaGorbach:patch-1
Open

Update sum.py#4
DariaGorbach wants to merge 1 commit intoagbragin:masterfrom
DariaGorbach:patch-1

Conversation

@DariaGorbach
Copy link
Copy Markdown

No description provided.

Copy link
Copy Markdown
Author

@DariaGorbach DariaGorbach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Comment thread sum.py
@DariaGorbach
Copy link
Copy Markdown
Author

Fixed

Copy link
Copy Markdown
Owner

@agbragin agbragin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is very close to the correct solution, but, unfortunately, the resulting code is not valid due to the duplicated print statement, so the overall score is 1 point.

Comment thread sum.py
"""
assert (is_number(a) and is_number(b)), 'Both addends should be numbers'
return a - b
return a + b
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This adds one extra line but leaves the original one intact. So the resulting code is not valid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants