1 Comment

grade={}

while True:

print("Menu")

choice= input("""1. Add a student and their grade .

2. View all students and their grade.

3.Exit

Enter your choice """)

if choice=='1':

name=input("Please enter the name of the student")

grade1=input("Please enter the grade of the student")

grade.update({name:grade1})

print("{}'s grade has been added".format(name))

elif choice =='2':

print(grade)

else:

break

Expand full comment