Quick actions

cmd+k|ctrl+k

Navigation

Languages

Lecture 8 try,raise,except

Snippet info

Language

Python

Visibility

public

Author

tonyngswell

Created

2026-05-07T14:02:25.761719Z

Updated

2026-05-07T14:02:25.761719Z

#Raise is for debugging
try:
    print('hello')
    x=100
    while x>-1:
        if x==50:
            raise
        x=x-1
        print(x)
except:
    print("i stop the program")
INFO