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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 18:10, o10922025
Assume that to_the_power_of is a function that expects two int parameters and returns the value of the first parameter raised to the power of the second parameter. write a statement that calls to_the_power_of to compute the value of cube_side raised to the power of 3 and that associates this value with cube_volume.
Answers: 1
image
Computers and Technology, 23.06.2019 01:00, Ltik11900
Write the command that can be used to answer the following questions. (hint: try each out on the system to check your results.) a. find all files on the system that have the word test" as part of their filename. b. search the path variable for the pathname to the awk command. c. find all files in the /usr directory and subdirectories that are larger than 50 kilobytes in size. d. find all files in the /usr directory and subdirectories that are less than 70 kilobytes in size. e. find all files in the / directory and subdirectories that are symbolic links. f. find all files in the /var directory and subdirectories that were accessed less than 60 minutes ago. g. find all files in the /var directory and subdirectories that were accessed less than six days ago. h. find all files in the /home directory and subdirectories that are empty. i. find all files in the /etc directory and subdirectories that are owned by the group bin."
Answers: 1
image
Computers and Technology, 23.06.2019 08:30, mai1261
Helen's credit card has an apr of 15.32% and a grace period of 17 days and helen pays her balance in the full every month. if her last billing cycle ended on september 26, 2009, and she made her payment on october 11, 2009, did she owe any interest on her last statement's balance?
Answers: 3
image
Computers and Technology, 23.06.2019 18:20, Blossom824
What is wi-fi infrastructure? a metropolitan area network that uses radio signals to transmit and receive data a communications technology aimed at providing high-speed wireless data over metropolitan area networks a means by which portable devices can connect wirelessly to a local area network, using access points that send and receive data via radio waves includes the inner workings of a wi-fi service or utility, including the signal transmitters, towers, or poles and additional equipment required to send out a wi-fi signal
Answers: 2
You know the right answer?
Address the fixme comments. move the respective code from the while-loop to the created function. th...

Questions in other subjects:

Konu
History, 20.05.2020 05:57