89 - Exercise Functions

Run Settings
LanguagePython
Language Version
Run Command
def highest_even(li): evens = [] for item in li: if item % 2 == 0: evens.append(item) return max(evens) # Be careful about the indentation. If you put the return statement inside the loop, it only return the first even number which in this case is 2 print(highest_even([2,10,2,3,4,8,11]))
Editor Settings
Theme
Key bindings
Full width
Lines