Question: IN PYTHON: MY_WORD = 'ORCHIDS' MY_NUM = 12345 # # Question 1: # Modify the function such that it works according to the description below:

IN PYTHON:

IN PYTHON: MY_WORD = 'ORCHIDS' MY_NUM = 12345 # # Question 1:# Modify the function such that it works according to the description

MY_WORD = 'ORCHIDS' MY_NUM = 12345 # # Question 1: # Modify the function such that it works according to the description below: # # This function returns True if the parameter word, assumed to be a string, # contains at least 4 unique (distinct) letters from your unique 7 letter # word. If the condition is not met, the function returns False. Please note: # your function should work for either upper or lower case letters ### # Here are some examples specific to Jane's word (ORCHIDS) but 3) # question1('Choral') # question1('Strike') # question1('CHORAL') # question1( 'RRRRrr') def question1(word): # should return True (c, h, o, r are common) # should return False (s, r, i are common # should return True (c, h, o, r are common) # should return False (r is common but 1) return # MY_WORD = 'ORCHIDS' MY_NUM = 12345 # Question 3: # Modify the function such that it works according to the description below: # # This function assumes dictX is a dictionary with the following structure: # the key is always a string and the value is always an int. Here is a # sample dictionary: {'john': 93, 'jane':87, 'kramer': 53} and it has 3 entries. # # Each key-value pair in a dictionary is considered to be an entry. # # This function returns the number of entries where the key has one letter # in common with your 7 letter unique word AND the value has one digit # in common with your 5 digit number. The letters can be in either upper # or lower case. # # So, for Jane: # question3({'john': 93, 'jane':87, 'kramer': 53}) # should return 2 (the first and third entry matches) # # question3({'ann': 93, 'pat':87, 'kramer': 987}) # should return 0 (no entry matches conditions) def question3(dictx): return 0

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