Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question no. 6: Complete the function, so that if you don't have a key return 999. [10 points) # Code goes here def get from(dictionary,

image text in transcribed
image text in transcribed
Question no. 6: Complete the function, so that if you don't have a key return 999. [10 points) # Code goes here def get from(dictionary, keys): values = ? #complete your code here return values #should return 999 if key doesn't exist print(getfrom(dictionary=d, keys='z')) Question no. 6: Complete the function, so that if you don't have a key return 999. (10 points) # Code goes here def getfrom(dictionary, keys): values = ? #complete your code here return values #should return 999 if key doesn't exist print(getfrom(dictionary=d, keys='z')) Question no. 7: Complete the function, so that if you don't have a key return 999 and add 999 to dictionary? (10 points) # Code goes here def get from(dictionary, keys): values = ? #complete your code here return values #should return 999 if key doesn't exist and should add to dictionary as well print(getfrom(dictionaryd, keysu'z')) # Now this shouldn't throw error as 'z' is now set to dictionary print(d['z'l)

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

Introduction To Database And Knowledge Base Systems

Authors: S Krishna

1st Edition

9810206208, 978-9810206208

More Books

Students also viewed these Databases questions

Question

The Nature of Nonverbal Communication

Answered: 1 week ago

Question

Functions of Nonverbal Communication

Answered: 1 week ago

Question

Nonverbal Communication Codes

Answered: 1 week ago