The answer for Exception - Excercise 2 is

#paste the final function exercise code below and do the following
#Do you code below
flag = True
def addition(a,b):
print('The addition of %s and %s is %s' %(a,b,a+b))
def subtraction(a,b):
print('The subtraction of %s and %s is %s'%(a,b,a-b))
def multiplication(a,b):
print('The multiplication of %s and %s is %s'%(a,b,a*b))
def division(a,b):
print('The division of %s and %s is %s'%(a,b,a/b))

try:
while (flag == True):
print('1.Addition')
print('2.subtraction')

print('3.multiplication')
print('4.division')
print('5.Quit')
print('Enter the operation you need to perform')
var = int(input())
if var not in [1,2,3,4,5]:
print('Enter the correct option')
continue
if var == 5:
flag = False
continue
print('Enter the first number')
var2 = int(input())
print('Enter the second number')

var3 = int(input())
if var == 1:
addition(var2,var3)
elif var == 2:
subtraction(var2,var3)
elif var == 3:
multiplication(var2,var3)
elif var == 4:
division(var2,var3)
except ValueError:
print('value error occured')
except ZeroDivisionError:
print('Zero division error occured')
finally:
print('Thank you for using calculator')