
from random import random

try:
    if random() > 0.5:
        print("oops!")
        raise ArithmeticError("number was bigger than I hoped")
    if random() > 0.5:
        print("double-oops!")
        raise EOFError("Bad file!")
# except ArithmeticError as ar:
#     print("Arithmetic!!!", ar, sep="xxxxx")
except EOFError as eof:
    print("File broke", eof)
else:
    print("Everything worked fine!")
finally:
    print("Got to the end")

print("Continuing")
