---
type: post
authors:
- ShyArmadillo8
- gao14g
title: "Ga Kay and Jasmine's Dictionary Exercises"
---

Here are the dictionary exercises that Ga Kay and I completed:
<iframe src="https://trinket.io/embed/python3/1d1d85fb1d" width="100%" height="356" frameborder="0" marginwidth="0" marginheight="0" allowfullscreen></iframe>

Reflecting back on our experiences working through these exercises, we were able to get the first two parts of the exercise pretty easily, but it was tricky to get parts 3 and 5 to work the way that we wanted them to.  The biggest learning curve for us with the 3rd exercise was figuring out how to put a dictionary within a dictionary and the appropriate formatting for it.  Creating the dictionary itself was not so difficult as was figuring out how to get the values for a state that had already been entered to count. We discovered that in order to make this happen, we needed to make it an integer.  Thus, after a good deal of trial and error, we got it.  The 5th exercise was tricky for us in that we had to think about what we actually wanted the program to evaluate for try and except.  The lightbulb went on when we realized that we needed to put the portion of code that asked for user input outside the try and except, and if the user entered a file name that wasn't an option, we just had them exit the program rather than loop through.  It'll be good to get some more dictionary practice in the future.

Create Ga Kay and Jasmine's Dictionary Exercises
Create Ga Kay and Jasmine's Dictionary Exercises