Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Python coding Question 1 (3 points): Define a function called quiz 1 that takes as input a dictionary. Your function should store the dictionary in
Python coding
Question 1 (3 points): Define a function called quiz 1 that takes as input a dictionary. Your function should store the dictionary in a file called dict.txt. The dictionary should be stored in the following format: the top row should say Dictionary file and the second row should be empty. Every three rows thereafter should show a key, then a value, then an empty space, with the key and value labelled as below. Your function does NOT need to print or return anything. You can assume everything in the dictionary is a string. For instance, after running your code the grader should be able to type quiz_1({'A': 'Apple', 'B': 'Banana'}) and the file dict.txt should look like: Dictionary file key: A value: Apple key: B value: BananaStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started