Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #/usr/bin/env python3
- d = {
- "Tom": 50,
- "Jerry": 70,
- "Sally": 90,
- }
- check = []
- while True:
- name = input("Enter name: ")
- if name == "OK":
- break
- elif name in d and name not in check:
- print('Grade: ' + str(d[name]))
- check.append(name)
- else:
- print('Already in database')
Advertisement
Add Comment
Please, Sign In to add comment