Answered step by step
Verified Expert Solution
Question
1 Approved Answer
PLEASE HELP! I HAVE BEEN SEATING FOR HOURS TRYING TO FIX THE CODE. THANK YOU. Run Window Help a7-functions 231?q1 a7-functions Xeq1 Dq2 ?q3 return
PLEASE HELP! I HAVE BEEN SEATING FOR HOURS TRYING TO FIX THE CODE.
THANK YOU.
Run Window Help a7-functions 231?q1 a7-functions Xeq1 Dq2 ?q3 return list 24 25e def largest even (num list): 27 28 29 30 31 32 Takes List of integers and returns Largest even integer in the List If no even number, returns false Use: result=Largest-even(num List) p. Preconditions num list List of numbers user has entered (int) 34 35 36 37 38 39 Postconditions returns: result Fatse, if the List has no even integers or The targest even integer in the list size-len(num list) 41 even list [ 42- for index in range(size 43 if num list/index! % 2-0: even list.append (num list[index]) 45 size-even if size even len(even-list) --'e; 46 = 47 result - False 49 50 51 52 53 54 else: result max(even_list) return result 555 def find value(num 1ist, target): 56 57 58 59 60 61 locations [] size len(num list) for index in range(size): if target num list[index]: locations.append(index) 62 63 return locations 64 D Console 23 nguy7670 workspacelnguy7670 a7srelq2.?? terminated> C:\Users Enter item: 5? Enter item: 1', 30', '40', '50 Traceback (most recent call last): File "C:\Users guy767@workspaceInguy7670 ansrca2.??", line 19, inStep 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