Answered step by step
Verified Expert Solution
Question
1 Approved Answer
python 3.6.1 this is my program and I failed the task no.8 what do I need to modify 5 def search_results(items, query): 9for item in
python 3.6.1 this is my program
and I failed the task no.8
what do I need to modify
5 def search_results(items, query): 9for item in items: 1e 11 if item. lower().find(query.1owerO)!--1: 12 13 14 15 16 1.append(item) return l 17 list of items ["apple, "orange", "The Lorax", "And Still I Rise", "Pride and Prejudice"] 19 query input("Enter search query (blank to exit): 18 20 21 while query: 23 results search results(list of items, query) 24 25 : for in results: 26 27 print(r) 28 29 38 31 32 | if(len(results)--) : print("Not found. would you like to add the item you were looking for?y item - input ("Enter new item (or blank to skip): ") if item: 35 36 37 38 39 list of_items.append(item) query input("Enter search query (blank to exit):-)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