Exerpad
🔥0
0 XP
Lv.1 Beginner
Log In

Fix the Get

This program crashes when you look up a name that isn't in the dictionary. Fix it so it shows 0 for missing names instead of crashing.

Expected: if the name isn't found, print 0 as the score.

💡 Hints

?Hint 1
🔒Hint 2
🔒Hint 3
python
scores = {"Alice": 95, "Bob": 87}
name = input()
print(f"{name} scored {scores[name]}")