Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a function make_dictionary(number) that takes input from the user such as name and major separated by a comma and creates a dictionary with keys
Write a function make_dictionary(number) that takes input from the user such as name and major separated by a comma and creates a dictionary with keys corresponding to names and values corresponding to majors. The parameter number is an integer that controls how many entries should be added to the dictionary. Your function should work with the following code: Save the main code and your function in a file named majors.py. You can test your code with input files such as ex1: python 3 dictionary.py
Step 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