Answered step by step
Verified Expert Solution
Link Copied!

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

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

Neo4j Data Modeling

Authors: Steve Hoberman ,David Fauth

1st Edition

1634621913, 978-1634621915

More Books

Students also viewed these Databases questions

Question

Consider this article:...

Answered: 1 week ago

Question

Consistently develop management talent.

Answered: 1 week ago

Question

Create a refreshed and common vision and values across Europe.

Answered: 1 week ago

Question

Provide the best employee relations environment.

Answered: 1 week ago