Answered step by step
Verified Expert Solution
Question
1 Approved Answer
# Do not use python lambdas # Do not use maps/filters #Do not import any other libraries - not even built-in ones, such as math
# Do not use python lambdas # Do not use maps/filters #Do not import any other libraries - not even built-in ones, such as math
# Change this to your specific 7 letter unique word MY_WORD = 'ORCHIDS'
# Change this to your specific 5 digit unique number MY_NUM = 12345
# Question 2: | |
# Modify the function such that it works according to the description below: | |
# | |
# This function assumes listX is a list and it contains tuples where each tuple | |
# is a pair of integers (ints). For e.g. listX could be: [(1,2), (9,9), (5,1)]. | |
# The function returns the count of tuples that has at least one number | |
# in common with one of the digits of your 5 digit number | |
# | |
# Jane's example: her digits are: 1,2,3,4, and 5 | |
# | |
# So, for Jane: | |
# question2([(17,12),(23,2),(15,1)]) | |
# returns 2 | |
# (because 2 pairs have at least one number in common with the digits) | |
# | |
# question2([(15,2),(14,3),(5,5)]) | |
# returns 3 | |
# (because all 3 pairs have numbers in common with the digits) | |
def question2(listX): | |
return 0 |
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started