@m314n13/

4.04 lab

Python

No description

fork
loading
Files
  • main.py
main.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
import colorama # learn more: https://python.org/pypi/colorama
shopping_cart = [
  ['tooth paste', 'q-tips', 'milk'],
  ['milk', 'candy', 'apples'],
  ['planner', 'pencils', 'q-tips']
]

# You will need the following functions.
# Feel free to add more functions as you see fit.

# name: updated_list
# Takes in an integer representing the index of the shopping list,
# an integer representing the index of the item to update,
# and a string representing the new value for that item.
def updated_list(shopping_list_index, item_index, new_value):
  global shopping_cart
  # your code here

# name: print_item
# Takes an int representing the index of the shopping list followed by an int representing the index of the item to print.
def print_item(list_index, item_index):
  global shopping_cart
  # your code here

# name: print_list
# Takes an int representing the index of the shopping list to print.
def print_list(list_index):
  global shopping_cart
  # your code here
  
def main():
  # Your code here
  
main()