-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAboutMe.py
56 lines (44 loc) · 1.43 KB
/
AboutMe.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
AboutMe = dict()
AboutMe = {"height": "182 cm",
"name": "Abdullah Karagøz",
"weight": "70 Kg",
"birth year": "1988",
"education": "vocational college",
"current occupation": "student",
"area of study": "economics",
"age": "30",
"status": "single"
}
print("Answer \"q\" to quit")
Ask = str()
while Ask != "q":
Ask = input("What do you want to know about me? ")
if Ask in AboutMe:
print("My",Ask,"is",AboutMe[Ask])
else:
print("No information about",Ask,"here.")
Words = {"letters": ["A", "B", "C", "D", "E", "F"],
"numbers": [1,2,3,4,5,6,7,8,9],
"colors": ["red", "green", "blue", "yellow", "orange"],
"adjectives": ["big","small","nice","beautiful","smart"],
"cities": ["Istanbul","Oslo","Drammen","Konya","Beysehir"],
"subjects": ["economics","psychology","math","physics","history",
"computer science","programming"]
}
print("Answer \"q\" to quit")
Ask = str()
while Ask != "q":
Ask = input("Type something: ")
if Ask == "q":
break
try:
n = input("Type a number: ")
n = int(n)
if Ask in Words:
Lists = Words[Ask][n]
print(Lists)
else:
print("Not found!")
except: ValueError
print("Please type in number: ")
continue