PY
py
1
2
3
4
5
6
7
8
9
10
11
12
13
#This code builds a basic shopping list
shopping_list = []
items = input("How many items do you want on your list?\n")
i = 0
if int(items) == 0:
print("Wow, no shopping today")
while i < int(items):
item = input("Ok, tell me what to add in the list!\n")
shopping_list += [item]
i += 1
if i == int(items):
print (shopping_list)
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run