Question: Python Programing thislist = list ( ( ) ) def addElement ( ) : num = int ( input ( What number do you

Python Programing
thislist = list(())
def addElement():
num = int(input("What number do you want to add? "))
thislist.append(num)
def printList():
print(thislist)
def changeElement():
print("Current list =", thislist)
print("Remember indexing starts at zero")
index = int(input("Which one do you want to change: "))
num = int(input("What number do you want to change it to?"))
thislist[index]= num
def deleteElement():
print("Current list =", thislist)
print("Remember indexing starts at zero")
index = int(input("Which one do you want to delete: "))
thislist.pop(index)
def clearList():
thislist.clear()
def sumNumbers():
sumOfNumbers =0
for x in range(0, len(thislist)):
sumOfNumbers = sumOfNumbers + thislist[x]
print("Sum is", sumOfNumbers)
opt ="A"
while opt !="E":
print ("List Program")
print ("------------------------")
print ("A: Add number")
print ("C: Change a number")
print ("D: Delete a number")
print ("S: Sum numbers")
print ("L: Clear List")
print ("P: Print List")
print ("E: Exit")
opt = input("Choose an Option: ")
if opt =="A":
addElement()
elif opt =="P":
printList()
elif opt =="C":
changeElement()
elif opt =="D":
deleteElement()
elif opt =="L":
clearList()
elif opt =="S":
sumNumbers()
Modify this code to add in the option of M and N, where M would calculate the maximum number currently in the list and N would do the same for the minimim.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!