-
Notifications
You must be signed in to change notification settings - Fork 1
/
101.py
66 lines (57 loc) · 1.63 KB
/
101.py
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Faulty Calculator
operator = input("Enter Operator: ")
val1 = int(input("Enter First Operand: "))
val2 = int(input("Enter Second Operand: "))
if operator =="+":
if val1 == 56 and val2 == 9:
print("77")
else:
print("Sum is: ", val1 + val2)
if operator =="-":
print("Substract is: ", val1 - val2)
if operator =="*":
if val1 == 45 and val2 == 3:
print("555")
else:
print("Multiply is: ", val1*val2)
if operator =="/":
if val1 == 56 and val2 == 6:
print("4")
else:
print("Divide is: ",float(val1/val2))
#int = 3
#print(int)
#print(type(int))
#
#int = float(1.0)
#print(type(int))
#print(int)
# D = {'sagar': '12.12.2000',
# 'mohit': '14.52.3000',
# 'prakash': '45.15.6000',
# }
# print("Enter Your Key: ")
# type = input()
# print(D[type])
# name = input("Enter the Name: ")
# print(D[name])
# Dict = {}
# key = input("type key for dict: ")
# value = int(input("Type the value: "))
# Dict [key] = value
# print (Dict)
# a = input("Enter a Single Word(S,M,V,S,P,K): ")
# d = {"S" : "Hello" , 'M' : 'Sagar' , "V" : "Chutiya " , 'S' : "Kese" , 'P' : 'Ho' , 'K' : 'Sab Badiya'}
# if a in d['S']:
# print(d["S"])
# dict1 = {"sagar" : "Sagar is a Python Programmer", "mohit" : "mohit is a good boy"}
# while(1):
# d=input("Enter Your Key: ")
# for key,value in dict1.items():
# if key==d:
# print(dict1[d])
# break
# d1 = {"Sagar" : "My Name is Sagar" , "Mohit" : "My Second Name is Mohit"}
# a = input("Enter Your Key: ")
# b=a.capitalize()
# print(b," = ",d1[b])