-
Notifications
You must be signed in to change notification settings - Fork 0
/
Homework7setsAndDict.py
57 lines (48 loc) · 1.3 KB
/
Homework7setsAndDict.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
'''
Homework #7 copied from Homework #1 pirple
Sets and dictionaries
'''
#Artist and Genre info
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
}
key = input("What item do you want to guess?")
value = input("what is your guess?")
for song in favSong:
if key in favSong:
match = favSong[key]
print(match)
else:
# for x in favSong:
# if key in favSong:
# if value in favSong:
# if favSong[key] == value:
# print(value)
# break
# else:
# print("Please pick another item. Your item was not found in the dictionary.")
# break
# def guessFunc(key,value):
# if key in favSong:
# if value in favSong.items():
# print(key, value)
# guessFunc(key,value)
# # print(Artist)
# # print(Song)
# # print(DurationInMinutes)
# # print(Producer)
# # print(Label)
# # print(NumOfSpotifyListens)
# # print(YearRecorded)
# # print(AlbumName)
# # print(AlbumArtwork)
# # print(SalesinUSDollars)