Question: Hello! In Python, can you please help me write the code as described in the two pictures? Lab 7 Part 1 7 . 1 :

Hello! In Python, can you please help me write the code as described in the two pictures?
Lab 7 Part 1
7.1: Use a dictionary to store information about a favorite
fictional character. Store their first name, last name, age, and
the city in which they live
You should have keys such as first_name, last_name, age, and city
Print each piece of information stored in your dictionary
7.2: Use a dictionary to store people's favorite numbers
Think of five names, and use them as keys in your dictionary
Think of a favorite number for each person, and store each as a value
in your dictionary
Print each person's name and their favorite number
For even more fun, poll a few friends and get some actual data for your
program
Lab 7 Part 2
7.3: Make a dictionary containing three states and its capital
One key-value pair might be 'washington': 'olympia'
Use a loop to print a sentence about each state, such as The capital of
Washington is Olympia
7.4: Use the dictionary you just created in 7.3
Add two more states with their capitals to the dictionary
Make a list of six states, three of which are in your dictionary and three that
are not
Loop through the list you just created and check if each state in the list has its
capital in the dictionary
If it does, print a message stating the state and capital like in 7.3
If not, print a message stating the state's capital cannot be found
Hint: This problem can be solved using a combination of list looping, checking if a
value is in the keys within a dictionary, and using an if/else statement
Hello! In Python, can you please help me write

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 Programming Questions!