A Day at a supermarket

In this assignment we were supposed to finish “A Day at the Supermarket” using Code Academy. To complete this assignment we had to be familiar with lists and dictionaries. the main goal of this assignment was to calculate the prices for each different type of food and to figure out the overall total of the cost.

1capture1

2
capture2

3
capture3

4
capture5

5
capture6

6
capture7

7
capture8

8
capture9

9
capture10

10
capture11

11
capture12

12
capture13

  • Lists are what they seem – a list of values. Each one of them is numbered, starting from zero – the first one is numbered zero, the second 1, the third 2, etc. You can remove values from the list, and add new values to the end. Example: Your many cats’ names.
    • Dictionaries are similar to what their name suggests – a dictionary. In a dictionary, you have an ‘index’ of words, and for each of them a definition. In python, the word is called a ‘key’, and the definition a ‘value’. The values in a dictionary aren’t numbered – tare similar to what their name suggests – a dictionary. In a dictionary, you have an ‘index’ of words, and for each of them a definition. In python, the word is called a ‘key’, and the definition a ‘value’. The values in a dictionary aren’t numbered – they aren’t in any specific order, either – the key does the same thing. You can add, remove, and modify the values in dictionaries. Example: telephone book.

OVER ALL EXPERIENCE:
this assignment at first seemed to be pretty easy since we were just using lists and dictionaries, but actually was a bit time consuming because of the lengthy coding we had to do. in some portions we had to redo the coding but the end was pretty dun to do it