I am working on Python and am writing a program where the user inputs how many courses they would like to calculate. Then the program is supposed to take the appended items (the strings) and then divide them by how many courses they would like, in other words the total (integer). I cannot seem to figure out a way to implement this properly, any help? The issue is under If value = 1.
def List (): print("Please make your selection in accordance with the numbered list:\n") print("1. Add Grades") print("2. Print current GPA") print("3. Exit") return int(input()) print("Thank you for using the text-based UCF GPA calculator! How can we assist you today?\n") #Empty lists grades =  value = 0 while (value != 3): for i in range (0,1): value = List () if (value == 1): selection = int(input("How many classses would you like to include?\n")) for i in range (0,selection): print("What is the grade of the class?") item = (input()) grades.append(item) GPA_list = [sum(item)/selection for i in grades] print(GPA_list) elif(value == 2): print("BYM") elif(value == 3): print("Thank you for using the UCF GPA calculator, have a great day!") else: print("Sorry, that input is not recognized")