-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain4(tut).py
More file actions
36 lines (30 loc) · 930 Bytes
/
main4(tut).py
File metadata and controls
36 lines (30 loc) · 930 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# var1 = 54
# var2 = 34
# var3 = int(input())
# if var3 > var2:
# print("Greater")
# elif var3 == var2:
# print("Equal")
# else:
# print("Lesser")
# list1 = [1,2,3,4,5]
# print(52 in list1)
# if 4 in list1:
# print("Yes, num 4 is in the list")
# list2 = [2,1,4,5,6]
# print(1 not in list2)
# if 3 not in list2:
# print("No, 3 is not in the list2")
# age = int(input("Enter your age:"))
# if age in range(7,100):
# age = int(input("Enter your age:"))
# elif age < 18:
# print("We are sorry to inform you that you cannot drive sir/mam")
# elif age == 18:
# print("We will think about it")
# else:
# print("Yes, you can drive")
# 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 operator should take operator and the numbers as input from user and then return the result