sum_two sample solution parameter
Author: MarkMorettoCreated Jun 26, 2021Updated Oct 5, 2023
Labelsneeds-review
For the sum_two_challenge notebook (link), the Solution class template only takes one parameter:
class Solution(object):
def sum_two(self, val):
# TODO: Implement me
passThat should change to two parameters:
class Solution(object):
def sum_two(self, a, b):
# TODO: Implement me
passOtherwise a TypeError is raised with the message:
TypeError: sum_two() takes 2 positional arguments but 3 were given
Source: donnemartin/interactive-coding-challenges