-
Notifications
You must be signed in to change notification settings - Fork 0
/
hw7Dictionaries.py
34 lines (31 loc) · 923 Bytes
/
hw7Dictionaries.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
#hw 7 dict and sets pirple
favSong = {
"Artist":"Marshmello",
"Song":"Blocks",
"DurationInMinutes":"3.483",
"Producer":"Wild Bill",
"Label":"House label",
"NumOfSpotifyListens":"1400000",
"YearRecorded":"2016",
"AlbumName":"Joytime",
"AlbumArtwork":"Some Lady",
"SalesinUSDollars":"4350000.27"
}
while(True):
key = input("What item do you want to guess?")
value = input("what is your guess?")
if key in favSong:
match = favSong[key]
if match == value:
again = input("Nice, you got it! The answer was " + match + ". Want to try again? Answer Yes or No only.")
if again == "Yes":
continue
else:
print("see ya")
break
else:
print("Nope. Better luck next time.")
break
else:
print("Nope. You blew it.")
break