Lesson06

Run Settings
LanguagePython
Language Version
Run Command
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']())
Editor Settings
Theme
Key bindings
Full width
Lines