Question: Python) Write a function print_student_grader_pairs(pairs) that takes a single parameter: a list of student-grader pairs, like the output from the previous part. This function should

Python) Write a function print_student_grader_pairs(pairs) that takes a single parameter: a list of student-grader pairs, like the output from the previous part. This function should print a line for each pair in the list. For example, the previous output might display

s1 will be graded by g2 s2 will be graded by g2 s3 will be graded by g1 I wrote the following function that allows me to take in user input in the form of a list and pair students randomly with graders. I am having difficulty in referencing the output of the below function into a new print_student_grader_pairs(pairs) function.  #Function that prepares a list of assigned graders. Need to refer to the ouput of this function. def assign_graders(students, graders): import random pairs = [] for student in students: pairs.append((student, graders[random.randint(0,len(graders)-1)])) print(f"Pairs: {pairs}") #Obtain user input to input into function argument student_input = input("Please enter list of student's names separated by a comma: ") grader_input = input("Please enter a list of grader's names separated by a comma: ") #Create the lists for students and grader students = student_input.split(", ") graders = grader_input.split(", ") #test print statements print("Students: ", students) print("Graders: ", graders) #function call assign_graders(students, graders)

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 Databases Questions!