A Day at the Supermarket

Objective:

  • Is to understand the fundamentals of list and Dictionaries combined in Python,  with the use of Code Academy. In Code Academy, we were assigned to complete “A Day at the Supermarket” in which you basically call out dictionaries into a form of a list and calculate the prices for each different type of food and to figure out the overall total of the cost.

Here are some images of this activity “A Day at the Supermarket” in Code Academy:

capture

#1

capture2

#2

capture3

#3

capture4

#4

capture5

#5

capture6

#6

capture7

#7

capture8

#8

capture9

#9

capture10

#10

capture11

#11

capture12

#12

capture13

#13

 

Information:

  • Dictionaries – are another data type built into Python, a mapping type.
  • A map is an unordered, associative collection. The association, or mapping, is from a key, which can beany immutable type, to a value, which can be any Python data object.

Overall Experience:

  • When doing this activity, it wasn’t as bad. I got the hang of things as Code Academy gives you some examples and it felt like it was a pattern in a way. What I mean by pattern, is that you basically either build off the previous code or you redo it but in the same format.