23
23
24
24
25
25
#3. logical operations
26
- a = float (input ("Enter a: " ))
27
- b = float (input ("Enter b: " ))
28
- c = float (input ("Enter c: " ))
29
- print ("a and b: " ,(a and b ))
30
- print ("a or b: " ,(a or b ))
31
- print ("a and b or c: " ,(a and b or c ))
26
+ # a = float(input("Enter a: "))
27
+ # b = float(input("Enter b: "))
28
+ # c = float(input("Enter c: "))
29
+ # print("a and b: ",(a and b))
30
+ # print("a or b: ",(a or b))
31
+ # print("a and b or c: ",(a and b or c))
32
+
33
+
34
+ # 4. Bitwise operations
35
+ # a = int(input("Enter a: "))
36
+ # b = int(input("Enter b: "))
37
+ # print("a and b: ",(a & b))
38
+ # print("a or b: ",(a | ~b))
39
+
40
+
41
+ # 5. Shifting operations
42
+ # a = int(input("Enter a: "))
43
+ # b = int(input("Enter b: "))
44
+ # print("b>>1: ",(b>>1))
45
+ # print("b<<1: ",(b<<1))
46
+ # print("b<<2: ",(b<<2))
47
+
48
+
49
+ # 6. Identity operations
50
+ a = int (input ("Enter a: " ))
51
+ b = int (input ("Enter b: " ))
52
+ c = a
53
+ print ("a is b: " ,(a is b ))
54
+ print ("a is c: " ,(a is c ))
55
+ print ("a == b: " ,(a == b ))
56
+ print ("a == c: " ,(a == c ))
0 commit comments