Loading [MathJax]/jax/output/HTML-CSS/jax.js

CPSC120A
Fundamentals of Computer Science I

Post-lab 27

Dictionaries

Post Lab 27

Write a function called default_get(a_dictionary, key). If key exists in a_dictionary, you should return the values stored for key. If key does not exist in a_dictionary, a 1 should be returned. The function should not use the dictionary get method.