The output of calling n2.calculate() is:
Addition of two numbers = 4000
What is the output of calling n2.calculate ()?
class Addition:
def _init_(self, f, s):
self.first = f
self.second = s
def calculate(self):
self.answer = self.first + self.second
print("Addition of two numbers = " + str(self.answer))
n1 = Addition(1000, 2000)
n2 = Addition(3000,1000)
n3 = Addition(2000, 4000)
n4 = Addition(3000,4000)
1.Addition of two numbers = 6000
2.Addition of two numbers = 4000
3.Addition of two numbers = 3000
4.Addition of two numbers = 7000
1 answer