Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please read the following code and answer the next five questions about it. booki = {Alice: arts, Bob: botany, Clara: chemistry, Dasha: digital media} book2

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
Please read the following code and answer the next five questions about it. booki = {"Alice": "arts", "Bob": "botany", "Clara": "chemistry", "Dasha": "digital media"} book2 {"Eve": "electronics", "Forest" : "finances". V "George": "geology", "Harry": "history". "Ivan": "Italian", "Joanna": "Japanese Arts"} mybook = [] conditioni - True condition2 - False conditions - True for key in book1.keys: mybook[key] - book1.get(key) mybook.update(book) #first print statement print (mybook) if conditioni: mybook["Bob") "biochemistry" mybook["Eve"] = "economics" for key in book1.keys: if mybook.get(key) booki[key]: if condition : del mybook[key] for key in book2.keys: if mybook.get(key) book2[key]: if condition: del mybook[key] #second print statement print (mybook) Problem 3 Q1. How many items of the dictionary mybook are printed by the first print statement? 10 06 00 O 12 O 4 Problem 3 Q5. Does the output of the second print statement include the dictionary item 'Bob': 'botany' among other items? O True O False Problem 3 Q4. Does the output of the second print statement include the dictionary item 'Joanna': 'Japanese Arts' among other items? O True O False Problem 3 Q3. How many items of the dictionary mybook are printed by the second print statement? O 1 4 o 00 O 10 O 2 O 5 Problem 3 Q2. Does the output of the first print statement include the dictionary item Joanna': Japanese Arts' among other items? O True O False

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

Sams Teach Yourself Beginning Databases In 24 Hours

Authors: Ryan Stephens, Ron Plew

1st Edition

067232492X, 978-0672324925

More Books

Students also viewed these Databases questions

Question

Define the terms paid-in-capital and retained earnings.

Answered: 1 week ago

Question

What are the Five Phases of SDLC? Explain each briefly.

Answered: 1 week ago

Question

How can Change Control Procedures manage Project Creep?

Answered: 1 week ago