Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Python Solution, please A Company is running a promotion. Customers purchased a secret list of fruit will receive prizes. Notice the order of the fruits

image text in transcribedimage text in transcribedPython Solution, please

A Company is running a promotion. Customers purchased a secret list of fruit will receive prizes. Notice the order of the fruits matters. Also, there can be a keyword anything in the secretFruitList which can be used for any type of fruit. Examples Example 1: Input: customerPurchased List = [orange, mongo, strawberry, watermelon, mongo] secretFruitLists = "[[orange, mongo], [watermelon, mongo]] Output: true Example 2: h Input: customerPurchased List = [watermelon, orange, mongo] secretFruitLists = [[watermelon, anything, mongo]] secretFruitLists = [[orange, mongo], [watermelon, mongo]] Output: true Example 2: Input: customerPurchased List [watermelon, orange, mongo] secretFruitLists [[watermelon, anything, mongo]] Output: true Example 3: Input: customerPurchased List = [watermelon, apple, orange, mongol secretFruitLists = [[watermelon, anything, mongo]] Output: false 11:01 PM A Company is running a promotion. Customers purchased a secret list of fruit will receive prizes. Notice the order of the fruits matters. Also, there can be a keyword anything in the secretFruitList which can be used for any type of fruit. Examples Example 1: Input: customerPurchased List = [orange, mongo, strawberry, watermelon, mongo] secretFruitLists = "[[orange, mongo], [watermelon, mongo]] Output: true Example 2: h Input: customerPurchased List = [watermelon, orange, mongo] secretFruitLists = [[watermelon, anything, mongo]] secretFruitLists = [[orange, mongo], [watermelon, mongo]] Output: true Example 2: Input: customerPurchased List [watermelon, orange, mongo] secretFruitLists [[watermelon, anything, mongo]] Output: true Example 3: Input: customerPurchased List = [watermelon, apple, orange, mongol secretFruitLists = [[watermelon, anything, mongo]] Output: false 11:01 PM

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

XML Data Management Native XML And XML Enabled Database Systems

Authors: Akmal Chaudhri, Awais Rashid, Roberto Zicari, John Fuller

1st Edition

ISBN: 0201844524, 978-0201844528

More Books

Students also viewed these Databases questions

Question

Identify the variables in expectancy theory.

Answered: 1 week ago

Question

6. Identify characteristics of whiteness.

Answered: 1 week ago

Question

e. What are notable achievements of the group?

Answered: 1 week ago