# var1 = 6 # var2 = 56 # var3 = int(input()) # if var3>var2: # print("Greater") # elif var3==var2: # print("Equal") # else: # print("Lesser") list1 = [5, 7, 3] print(15 not in list1) # if 15 not in list1: # print("No its not in the list") # Quiz print("What is your age?") age = int(input()) if age<18 and age>=10: print("You cannot drive") elif age==18: print("We will think about you") elif age>18 and age<=80 : print("You can drive") else: print("Invalid age") # Exercise 2 - Faulty Calculator. # Design a calculator which will correctly solve all the problems except # the following ones:- 45 * 3 = 555, 56+9 = 77, 56/6 = 4 # Your program should take operator and the two numbers as input from the userand then return the result. num1 = int(input("Enter First No.:\n")) Operator = input("Enter operator :\n") num2 = int(input("Enter Second No.:\n")) if num1==15 and Operator=='*' and num2 ==3 : print("555") elif num1 == 56 and Operator == '+' and num2 == 9 : print("77") elif num1 == 56 and Operator == '/' and num2 ==6 : print("4") elif Operator=='*': print(num1 * num2) elif Operator=='-': print(num1 - num2) elif Operator == '+': print(num1 + num2) elif Operator=='/': print(num1 / num2) else : print("Invalid Number!")