subject

Address the fixme comments. move the respective code from the while-loop to the created function. the add_grade function has already been created.# fixme: create add_grade functiondef add_grade(student_grades): print('entering grade. \n')name, grade = input(grade_prompt).split()student_ grades[name] = grade# fixme: create delete_name function# fixme: create print_grades functionstudent_grades = {} # create an empty dictgrade_prompt = "enter name and grade (ex. 'bob a+'): \n"delete_prompt = "enter name to delete: \n"menu_prompt = ("1. add/modify student grade\n""2. delete student grade\n""3. print student grades\n""4. quit\n\n")command = input(menu_prompt).()while command ! = '4': # exit when user enters '4'if command == '1': add_grade(student_grades)elif command == '2': # fixme: only call delete_name() hereprint('deleting grade.\n')name = input(delete_prompt)del student_grades[name]elif command == '3': # fixme: only call print_grades() hereprint('printing grades.\n') for name, grade in student_grades. items(): print(name, 'has a', grade) else: print('unrecognized command.\n') command = ()

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 08:00
Apex q: what does a low employment rate indicate? a. not many people are earning high salaries b. not many people are going to college c. not many people are renting their homes d. not many people have jobs
Answers: 2
question
Computers and Technology, 22.06.2019 21:00
Simon says is a memory game where "simon" outputs a sequence of 10 characters (r, g, b, y) and the user must repeat the sequence. create a for loop that compares the two strings starting from index 0. for each match, add one point to userscore. upon a mismatch, exit the loop using a break statement. assume simonpattern and userpattern are always the same length. ex: the following patterns yield a userscore of 4: simonpattern: rrgbryybgy userpattern: rrgbbrybgy
Answers: 2
question
Computers and Technology, 24.06.2019 09:30
What is the definition of digital literacy?
Answers: 1
question
Computers and Technology, 26.06.2019 06:00
What is an accurate perception based on
Answers: 1
You know the right answer?
Address the fixme comments. move the respective code from the while-loop to the created function. th...
Questions
question
Mathematics, 13.05.2021 01:20
question
Spanish, 13.05.2021 01:20
question
Mathematics, 13.05.2021 01:20
Questions on the website: 13722367