In this we are going to see a basic example of python addition using inner class in Python Programming Language.
class Calculation:
def __init__(self):
self.add = self.Add()
class Add:
def add(self, number1, number2):
result = number1 + number2
return result
cobj = Calculation()
print(cobj.add.add(10, 30))
print(cobj.add.add(20, 40))
# Coded By Dhiraj Shelke
#ENJOY CODING
Post a Comment
FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP