forked from aiti-ghana-2012/Lab_Python_04
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Lab04_2.py
42 lines (25 loc) · 924 Bytes
/
Lab04_2.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
print'Lab04_32'
print
print'----------------------------Lab04_2a--------------------------'
print
print'To create the catalog, i will use the dictionary data structure.',
print'This is because the dictionary data structure affords us a faster way',
print'to search for values based on key indeces.'
print
print'----------------------------Lab04_2b--------------------------'
print
catalog = {'Apples':'SPIC_APPLES','Bananas':'SPIC_BANANAS',\
'Bread':'SPIC_BREAD','Carrots':'SPIC_CARROTS',\
'Champagne':'SPIC_CHAMPAIGNE','Strawberries':'SPIC_STRAWBERRIES'}
print catalog,
print
print'----------------------------Lab04_2c--------------------------'
print
#modifying the price of strawberries
catalog['Strawberries'] = 'WPIC_STRAWBERRIES'
print catalog,
print
print'----------------------------Lab04_2d--------------------------'
print
catalog['Chicken'] = 'SPIC_CHICKEN'
print catalog,