Lesson06
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
x = 1
'''while True:
x += 1
if x == 10:
continue
if x == 12:
break
print(x)
else:
print("while never run")
print("x is equal to 10")'''
#print(x)
'''x = 1
while x < 13:
for i in range(15):
x += 1
if x == 10:
continue
if x == 12:
break
print(i , x)
else:
print("while never run")'''
'''x = 1
while x < 13:
for i in range(15):
x += 1
if x == 10:
continue
#break
print(i , x)
else:
print("while never run")'''
'''
try:
x = 1/0
except ZeroDivisionError:
print("division by zero")
finally: #finally --> close data file
print("file closing")'''
'''
try:
x = 1/0
except ZeroDivisionError:
print("division by zero")
else: #finally --> close data file
print("file closing")'''
'''x = 1
while True:
x += 1
if x == 10:
raise'''
def y():
print('this is function y')
x = {"a" : 1, 'b' : 2, 'c' : y}
print(x['c']())
Python
INFO