Question: Python coding Question 2 (3 points): Define a function called quiz_2 that takes as input a file name. Assume the file exists and contains a

Python coding

Python coding Question 2 (3 points): Define a function called quiz_2 that

Question 2 (3 points): Define a function called quiz_2 that takes as input a file name. Assume the file exists and contains a dictionary in the same format as question 1. Your function should return the dictionary contained in the file (in other words, it should do the opposite of the previous problem). For instance, if the file q2.txt contains Dictionary file key: MCS 260 value: Easy key: MCS 275 value: Hard then the grader should be able to run your code and type print (quiz 2('q2.txt')) and python should print {'MCS 260': 'Easy', 'MCS 275': 'Hard'}

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!