Level 2: Intermediate
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
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