Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribedimage text in transcribed

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, in

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

Database And Expert Systems Applications 24th International Conference Dexa 2013 Prague Czech Republic August 2013 Proceedings Part 1 Lncs 8055

Authors: Hendrik Decker ,Lenka Lhotska ,Sebastian Link ,Josef Basl ,A Min Tjoa

2013 Edition

3642402844, 978-3642402845

More Books

Students also viewed these Databases questions

Question

Find the derivative. f(x) 8 3 4 mix X O 4 x32 4 x32 3 -4x - x2

Answered: 1 week ago