From f6d6a7ef3c961867bc6c2b86623cc3b6aff9847e Mon Sep 17 00:00:00 2001 From: Liron-Mizrahi <91504420+lironmiz@users.noreply.github.com> Date: Sun, 8 Jan 2023 12:42:51 +0200 Subject: [PATCH] Create unit3_ex3.3.1.py --- unit3_ex3.3.1.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 unit3_ex3.3.1.py diff --git a/unit3_ex3.3.1.py b/unit3_ex3.3.1.py new file mode 100644 index 0000000..d622353 --- /dev/null +++ b/unit3_ex3.3.1.py @@ -0,0 +1,12 @@ +# exercise 3.3.1 from unit 3 +''' +try: + if '1' != 1: + raise "SomeError" + otherwise: + print("SomeError has not occurred") +except "someError": + print("SomeError has occurred") +What will happen after the program runs? +''' +# Answer: The program will crash due to incorrect code.