Bug Report for https://neetcode.io/problems/python-multiple-parameters
Please describe the bug below and include any steps to reproduce the bug or screenshots if possible.
Code Challenge
In the code editor, define two functions, two_sum, and three_sum. The two_sum function should take two parameters and print their sum. The three_sum function should take three parameters and print their sum.
Finally, call two_sum with the arguments 7, 10 and after that call three_sum with the arguments 3, 5, 8.
My code
def two_sum(num1, num2):
op1 = num1 + num2
print(op1)
def three_sum(num1, num2, num3):
op2 = num1 + num2 + num3
print(op2)
do not modify below this line
two_sum(7, 10)
three_sum(3, 5, 8)
My output
17
16
System output
17
16
19
25
Suggesed Fix under Debug
What was fixed:
The issue was with the function call arguments at the bottom of the script. The challenge instructions specifically asked for two_sum to be called with 7, 10 and three_sum to be called with 3, 5, 8 to produce the expected output.
Changed the arguments in the two_sum call from (10, 9) to (7, 10).
Changed the arguments in the three_sum call from (5, 14, 6) to (3, 5, 8).
Changes:
Updated the arguments in the function calls to match the challenge requirements: two_sum(7, 10) and three_sum(3, 5, 8).
Bug Report for https://neetcode.io/problems/python-multiple-parameters
Please describe the bug below and include any steps to reproduce the bug or screenshots if possible.
Code Challenge
In the code editor, define two functions, two_sum, and three_sum. The two_sum function should take two parameters and print their sum. The three_sum function should take three parameters and print their sum.
Finally, call two_sum with the arguments 7, 10 and after that call three_sum with the arguments 3, 5, 8.
My code
def two_sum(num1, num2):
op1 = num1 + num2
print(op1)
def three_sum(num1, num2, num3):
op2 = num1 + num2 + num3
print(op2)
do not modify below this line
two_sum(7, 10)
three_sum(3, 5, 8)
My output
17
16
System output
17
16
19
25
Suggesed Fix under Debug
What was fixed:
The issue was with the function call arguments at the bottom of the script. The challenge instructions specifically asked for two_sum to be called with 7, 10 and three_sum to be called with 3, 5, 8 to produce the expected output.
Changed the arguments in the two_sum call from (10, 9) to (7, 10).
Changed the arguments in the three_sum call from (5, 14, 6) to (3, 5, 8).
Changes:
Updated the arguments in the function calls to match the challenge requirements: two_sum(7, 10) and three_sum(3, 5, 8).