Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Larry Ellison Database Genius Of Oracle

Authors: Craig Peters

1st Edition

0766019748, 978-0766019744

More Books

Students also viewed these Databases questions

Question

8. Explain the relationship between communication and context.

Answered: 1 week ago