Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- exam_marks = {'Sci fi': 12, 'Mystery': 15, 'Horror': 8, 'Mythology': 10, 'Young_adult': 4, 'adventure': 14}
- max_key = 0
- max_val = 0
- for key, value in exam_marks.items():
- if max_val < value:
- max_key = key
- max_val = value
- print("The highest selling book genre is '" + max_key + "' and the number of books sold are " + str(max_val))
Advertisement
Add Comment
Please, Sign In to add comment