Question: hi i need help with this the problem is when i choose A the program ends please fix the code IllQl'llSMQHI 1. Write a program

hi i need help with this the problem is when ihi i need help with this the problem is when ihi i need help with this the problem is when ihi i need help with this the problem is when ihi i need help with this the problem is when i
hi i need help with this the problem is when i choose A the program ends please fix the code IllQl'llSMQHI 1. Write a program that can do the ff: a. Take input from user i. Student Name ii. Scores in 3 Quizzes b. Store the input in a dictionary c. Sort the dictionary according to names (key) d. Compute the average of the 3 quizzes e. Display the data in a tabular form sorted according to names. Table as follows: Name Q1 Q2 Q3 Ave 2. (continuation on #1) Add a sort function option based on average 3. Add an edit function optiona a I II V /Users/gyslaine/Desktop /Users/gyslaine/Desktop/Pacal_Gyslaine Meg_TASK 1.py Source Console Object = X Pacal_Gyslaine Meg_TASK 1.py * untitled1.py* X untitled5.py* class_list = {} Usage while True: Here you can get help of any object by pressing Cmd +I in front of DO YOUAWNH stud_list = list( ) it, either on the Editor or the Console. Help Variable Explorer Plots Files print ( ' In-- name = str(input(' [nEnter Name: ') ) X Console 5/A X Console 6/A q1 = int(input('Enter Quiz 1 Score: ')) q2 = int (input( 'Enter Quiz 2 Score: q3 = int (input ( 'Enter Quiz 3 Score: Python 3.9. 13 (main, Aug 25 2022, 18:29:29) ave = float( (q1 + q2 + q3)/3) Type "copyright", "credits" or "license" for more information. stud_list. append (q1) IPython 7.31.1 -- An enhanced Interactive Python. stud_list . append(q2) stud_list. append (q3) In [1]: runfile( '/Users/gyslaine/Desktop/Pacal_Gyslaine Meg_TASK 1.py', wdir='/Users/gyslaine/Desktop' ) stud_list. append (ave) class_list [name] = stud_list class_list = dict (sorted(class_list. items( )) ) Enter Name: Meg Enter Quiz 1 Score: 23 #TABLE Enter Quiz 2 Score: Enter Quiz 3 Score: 7 print ( ' InNAME' . ljust (20), 'Q1'. ljust(4), 'Q2' . ljust(4), '03' . ljust(4), 'AVE' . ljust(4)) NAME for stud_name in class_list. keys () : Meg 23 45 Q3 AVE print (stud_name. ljust(20), end = "") 25.0 29 for quiz in class_list [stud_name] : string = str (quiz) print (string. ljust (5) , end="") A. Add more data B. Exit print("") Enter choice: A # MENU while True: In [2]: choice = input(' IninitA. Add more data In\\ tB. Exit In\ \\ tEnter choice: ') if choice == 'A': #HOW TO RETURN TO "ENTER NAME" ? break elif choice == 'B': 44 print ( ' In---- ---END-- 45 break 46 47 else: 48 49 print( ' In\\tINVALID INPUT! Only A or B is accepted. ') 50 continue break IPython Console History conda: base (Python 3.9.13) Completions: conda(base) LSP: Python Line 30, Col 31 UTF-8 LF RW Mem 92%main.py Run Shell ZU cIntel Quiz s score. y 21 #TABLE NAME 01 Q2 Q3 AVE 22 print( '\ NAME ' . Ijust(20), 'Q1' . 1just(4), 'Q2' . 1just(4), 'Q3' . 1just(4), JOAN 7 8 9 8.0 'AVE ' . 1just(4) ) A. Add more data 23 B. Exit 24 - for stud_name in class_list . keys( ) : 25 print(stud_name . Ijust(20), end="") Enter choice: A 26 27- for quiz in class_list [stud_name] : 28 string = str(quiz) Enter Name: Sheila 29 print(string . Ijust(5), end="") Enter Quiz 1 Score: 4 30 print("") Enter Quiz 2 Score: 8 31 Enter Quiz 3 Score: 9 32 # MENU NAME Q1 Q2 Q3 AVE 33 - while True: JOAN 7 8 9 8.0 34 choice = input(' \ \ \\tA. Add more data \ \\tB. Exit \ \ \\tEnter choice: SHEILA 4 8 9 7.0 35 36 - if choice == "A" : A. Add more data 37 break B. Exit 38 - elif choice == 'B': 39 print ( ' \ - - - END Enter choice: B - END- 40 raise SystemExit( ) Traceback (most recent call last) : 41 - else : File "", line 40, in Get Started! 42 print( ' \ \\tINVALID INPUT! Only A or B is accepted. ' ) SystemExit 43 continue'1. Write a program that can do the ff: a. Take input from g i. Student Name ii. Scores in 3 Quizzes b. Store the input in a dictionag c. Sort the dictionary according to names (key) d. Compute the average of the 3 Quizzes e. Display the data in a tabular form sorted according to names. Table as follows: Name Q1 02 03 Ave 2. (continuation on #1) Add a sort function option based on average 3. Add an edit function option

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!