LearnPy Hub
← Dictionaries problems
Easy

Safe Lookup

Prices: {'tea': 20, 'coffee': 50, 'cake': 80}. Read an item and print its price with get(), or 0 if it isn't on the menu.

Input

One word.

Output

One integer.

Sample 1

Input
tea
Output
20

Sample 2

Input
cake
Output
80
solution.py
Output appears here
Safe Lookup · Python practice problem · LearnPy Hub