Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Chapter 9 Part 1 - Create a Dictionary Write a program that creates a dictionary called emails that will contain names and email addresses, where

Chapter 9 Part 1- Create a Dictionary
Write a program that creates a dictionary called emails that will contain
names and email addresses, where name is the key and email address is
the value.
In main, call a function called create dictionary to create and add
entries to the dictionary. This function should return the dictionary to
main where it should be stored in the emails variable.
In the create dictionary function, create a new dictionary called
emails and in a while loop, ask the user to enter names and email
addresses until they choose to stop. Return the emails dictionary to
main.
In main, upon receiving the emails dictionary, print how many entries are
in the dictionary, using the len function.
In main, print the keys and values in the dictionary using a for loop.
image text in transcribed

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

Icdt 88 2nd International Conference On Database Theory Bruges Belgium August 31 September 2 1988 Proceedings Lncs 326

Authors: Marc Gyssens ,Jan Paredaens ,Dirk Van Gucht

1st Edition

3540501711, 978-3540501718

More Books

Students also viewed these Databases questions

Question

6. Explain the power of labels.

Answered: 1 week ago

Question

5. Give examples of variations in contextual rules.

Answered: 1 week ago

Question

f. What stereotypes were reinforced in the commercials?

Answered: 1 week ago