Write a menu driven program to add or delete
stationary items. You should use dictionary to
store items and the brand.
I shall mark you brainliest if you give correct answer
Answers
Answer:
u can ask this either from ur computer teacher or google
Explanation:
mark as brainanist
The program is as follows :
stat = { }
while (( a == 1) or (a == 2))
print(" 1. Add Item") // to add item
print("2. Delete Item") // to delete item
a = int(input("Enter whatever you want to choose"))
if (a ==1):
p = int(input("Enter the number of items you want to add into the shop")
for x in range (p):
q = input("Enter the name of the item") // item name to add
r = input("Enter the brand name") // brand name to add
stat[p] = r
elif (a =2):
del_q = input("Enter the name of the item you want to delete.")
dict.pop(del_q)
print(stat)
else:
print("You entered wrong/invalid options. Enter 1 to add or 2 to remove items.")
a = int(input("Enter whatever you want to choose"))