Sep-06-2019, 05:58 PM
def sum_integers():
should be indented into the class and should have self as a first parameter.
sum = x + y
x &y needself.
in front of them
class SumTheIntegers: def __init__(self): self.x = 10 self.y = 13 def sum_integers(self): sum = self.x + self.y return sum def main(): sum_integers = SumTheIntegers() print("The value of x is", sum_integers.x) print("The value of y is", sum_integers.y) print() print("The sum is", sum_integers.sum_integers()) main()