| Start => not num1 or not num2 ? True => print("inputs can not be null") => raise ValueError => End |
num1 = None, num2 = None, choice = 1 |
ValueError |
Visible |
| Start => not num1 or not num2 ? False => num1= check_user_input(num1) => num2 = check_user_input(num2) => result = "" => choice in (1,2,3,4) False => raise exception => End |
num1 = 1, num2 = 1, choice = 5 |
Exception |
Visible |
| Start => not num1 or not num2 ? False => num1= check_user_input(num1) => num2 = check_user_input(num2) => result = "" => choice in (1,2,3,4) True => choice =="1" ? True => result = add(num1,num2) => return result => End |
num1 = 1, num2 = 2, choice = 1 |
result = 3 |
Visible |
| Start => not num1 or not num2 ? False => num1= check_user_input(num1) => num2 = check_user_input(num2) => result = "" => choice in (1,2,3,4) True => choice =="1" ? False => choice =="2" ? True => result = subtract(num1,num2) => return result => End |
num1 = 3, num2 = 2, choice = 2 |
result = 1 |
Visible |
| Start => not num1 or not num2 ? False => num1= check_user_input(num1) => num2 = check_user_input(num2) => result = "" => choice in (1,2,3,4) True => choice =="1" ? False => choice =="2" ? False => choice =="3" ? True => result = muliply(num1,num2) => return result => End |
num1 = 2, num2 = 3, choice = 3 |
result = 6 |
Visible |
| Start => not num1 or not num2 ? False => num1= check_user_input(num1) => num2 = check_user_input(num2) => result = "" => choice in (1,2,3,4) True => choice =="1" ? False => choice =="2" ? False => choice =="3" ? False=> choice =="4" ? True => num2==0 ? False => result = divide(num1,num2) => return result => End |
num1 = 6, num2 = 2, choice = 4 |
result = 3 |
Visible |
| Start => not num1 or not num2 ? False => num1= check_user_input(num1) => num2 = check_user_input(num2) => result = "" => choice in (1,2,3,4) True => choice =="1" ? False => choice =="2" ? False => choice =="3" ? False=> choice =="4" ? True => num2==0 ? True => print ("You can't divide by zero!") => raise ZeroDivisionError => End |
num1 = 1, num2 = '0', choice = 4 |
ZeroDivisionError |
Visible |
| Start => not num1 or not num2 ? False => num1= check_user_input(num1) => num2 = check_user_input(num2) => result = "" => choice in (1,2,3,4) True => choice =="1" ? False => choice =="2" ? False => choice =="3" ? False=> choice =="4" ? True => num2==0 ? True => print ("You can't divide by zero!") => raise ZeroDivisionError => End |
num1 = 1, num2 = 0, choice = 4 |
ZeroDivisionError |
Invisible |