This commit is contained in:
RafayAhmad7548 2024-09-09 16:59:28 +05:00
parent 2992f4f408
commit 4f46de8d00
3330 changed files with 394553 additions and 76939 deletions

View file

@ -0,0 +1,28 @@
# Write your code here
shopping_cart = []
items = ['AI response Simulator', 'Investment decison', 'random thing']
print('welcome to the store')
loop = True
while loop:
i = 1
for item in items:
print(i,'. ',item)
i+=1
index = input('enter a number to add to shopping cart or q to exit')
if index == 'q':
loop = False
break
index = int(index)
if index < 1 or index > 3:
print('invalid index, try again')
continue
shopping_cart.append(items[index-1])
print('your shopping cart')
for item in shopping_cart:
print(item)
print('goodbye')

View file

@ -0,0 +1,28 @@
# Write your code here
shopping_cart = []
items = ['AI response Simulator', 'Investment decison', 'random thing']
print('welcome to the store')
loop = True
while loop:
i = 1
for item in items:
print(i,'. ',item)
i+=1
index = input('enter a number to add to shopping cart')
if index == 'q':
loop = False
break
index = int(index)
if index < 1 or index > 3:
print('invalid index, try again')
continue
shopping_cart.append(items[index-1])
print('your shopping cart')
for item in shopping_cart:
print(item)
print('goodbye')

View file

@ -0,0 +1 @@
{"version":1,"resource":"file:///home/rafayahmad/Stuff/Coding/Python/IDS/lab2/test.py","entries":[{"id":"RXWf.py","timestamp":1724819204439},{"id":"I4N4.py","timestamp":1724821956522}]}