Chapter folders renamed

This commit is contained in:
Karan Solanki
2021-08-13 11:44:51 +05:30
parent d9f3f5b159
commit 1eb709f83a
211 changed files with 0 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
#inner1.py
def outer_hello():
print ("Hello from outer function")
def inner_hello():
print("Hello from inner function")
inner_hello()
outer_hello()
+14
View File
@@ -0,0 +1,14 @@
#inner2.py
def power_gen_factory(base):
def power_calc(exponent):
return base**exponent
return power_calc
power_calc_2 = power_gen_factory(2)
power_calc_3 = power_gen_factory(3)
print(power_calc_2(2))
print(power_calc_2(3))
print(power_calc_3(2))
print(power_calc_3(4))