← Back to Exercises
📖

Dictionaries • Exercise 78 of 112

Safe Snack Check

Medium⭐ 25 XP🏆 Your XP: 0

🎯 Your Mission

Create snacks = {"chips": 3, "cookies": 5}. Use get() to print how many cookies there are, then use get() with a backup value of 0 to print how many cakes there are.

🐍 main.pyTab = 4 spaces • Ctrl+Enter = Run
▶ Output
Press ▶ Run to see what your code does!