Answered step by step
Verified Expert Solution
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
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 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 PMStep 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