[Solved]Information Python Package Select Randomly Ordered Student List Class Final Project Presen Q37221697
######################## Information #### This Python package will select a randomly ordered student list for the class final project presentation.# The output should print out a random ordered list of students to present for Day 1, Day 2, and Day 3.# To note that a modified script will be run during the actual final project presentation.#####################import randomimport lib.Student as stuFILE_PATH = “./data/students.csv”COL_FIRST_NAME = 0COL_LAST_NAME = 1COL_ID = 2COL_FLAG = 3NUM_STUDENT_PRESENT = 9NUM_DAYS = 3def main(): for presentation_day in range(NUM_DAYS): print(“Presentation Day %s” % (presentation_day + 1)) # Q1 # Call a function to create a dictionary containing Student Class instances. # The dictionary should contain students who have not presented yet. # YOUR ANSWER HERE! impoer dict # an empty dictionary to store Student instances with a presented flag presented = {} counter = 0 while bool(students) and counter < NUM_STUDENT_PRESENT: # randomly pick one key from the list of dictionary keys key = random.choice(list(students.keys())) # get a Student instance based on the randomly picked key s = students[key] print(“%s %s” % (counter+1, s.print_status())) #Q2 # Call a method to update the student’s presented status to True # YOUR ANSWER HERE! presented[key] = s del students[key] counter+=1 # Q3 # Call a function to update student presented status on the CSV file # by feeding a dictionary object containing students with a presented flag # YOUR ANSWER HERE! # Reset all “presented flags” on the input CSV file stu.reset_flag_file(FILE_PATH, COL_FLAG)if __name__ == ‘__main__’: main()
Expert Answer
Answer to ##################### ### Information ### # This Python package will select a randomly ordered student list for the cla… . . .
OR

