File tree Expand file tree Collapse file tree 3 files changed +23
-12
lines changed
Expand file tree Collapse file tree 3 files changed +23
-12
lines changed Original file line number Diff line number Diff line change 1- class Arithmatic :
1+ class Arithmatic :
22
3- def Addition (self , x , y ):
3+ #This function does adding to integer
4+ def Add (self , x , y ):
45 return x + y
56
6-
7+ #This fnction does su
8+ def Subtraction (self , x , y ):
9+ return x - y
10+
11+
12+
13+
14+
Original file line number Diff line number Diff line change 11class Geometric :
22
3- def Multiplication (self , x , y ):
4- return x * y
5-
3+ def Multiplication (self , abc , xyz ):
4+ return abc * xyz
5+
6+ def Division (self , x , y ):
7+ return x / y
8+
Original file line number Diff line number Diff line change 33
44class Mathematic :
55
6- def __init__ (self , arithmatic = Arithmatic (), geometric = Geometric ()):
7- self ._arithmatic = arithmatic
8- self ._geometrics = geometric
6+ def __init__ (self , a = Arithmatic (), pqr = Geometric ()):
7+ self ._arithmatic = a
8+ self ._geometrics = pqr
99
1010 @property
1111 def arithmatic (self ):
@@ -16,11 +16,11 @@ def geometric(self):
1616 return self ._geometrics
1717
1818 def Add (self , x , y ):
19- result = self .arithmatic .Addition (x , y )
19+ result = self .arithmatic .Add (x , y )
2020 print ('Sum of two numbers: ' + str (result ))
21-
21+
2222 def Multiply (self , x , y ):
2323 result = self .geometric .Multiplication (x , y )
2424 print ('Multiplication of two numbers: ' + str (result ))
2525
26-
26+
You can’t perform that action at this time.
0 commit comments