Computer Science, asked by shreyagarwal3112, 10 months ago

please answer this question correctly by python programming.
the person who answers this correctly will be marked as the brainliest​

Attachments:

Answers

Answered by jessicashegin
1

Answer:

L=[10,20,30,40,50]

a=int(input("Enter your Choice number :",\n,"1. Add elements into list",\n,"2. Delete elements from list",\n,"3. Show list elements",\n"4. Quit"))

if a==1:

   x=input("Enter element to be added")

   L.append(x)

elif a==2:

   b=input("Enter your choice",\n,"A - Delete at beginning",\n,"B - Delete at

   end",\n,"C - Delete at position",\n,"D - Delete by value",\n,"E - Exit")

   if b=="A":

       del L[0]

   elif b=="B":

       del L[-1]

   elif b=="C":

       j=int(input("Enter the position of element to be deleted:"))

       del L[j]

   elif b=="D":

       n=input("Enter the element to be deleted")

       L.remove(n)

   else:

       break

elif a==3:

   print(L)

else:

   break

print("The list is",L)

Explanation:

Hope this will help you :)

Sorry if there's something wrong

Similar questions