Skip to content

Commit 9ee4bf5

Browse files
Nested Methods.
1 parent 216d6e9 commit 9ee4bf5

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

Test11.py

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#Nested methods:
2+
3+
class Test11:
4+
def m1(self):
5+
print("Outer method:")
6+
7+
def calci(a,b):
8+
print("The Sum of two numbers:",a+b)
9+
print("The Product of two numbers:",a*b)
10+
print("The Division of two numbers:",a/b)
11+
print("The Difference of two numbers:",a-b)
12+
13+
calci(10,5)
14+
calci(158,54)
15+
calci(245,65)
16+
17+
t=Test11()
18+
t.m1()

0 commit comments

Comments
 (0)