Read the code.
Find the bug.
Short, broken Python functions. Predict what they do, point at the bug, explain it, then fix it. Runs in your browser. No account.
The kind of thing you will find
def sum_list(numbers):
total = 0
for i in range(len(numbers) - 1):
total += numbers[i]
return total
sum_list([1, 2, 3]) returns 3. Why?
Solved0 of 20 solved · 0 pts
001Off By Onenot found yetP L E Feasyopen002The Silent Returnnot found yetP L E Feasyopen003Is It Prime?not found yetP L E Fmediumopen004The Haunted Listnot found yetP L E Fmediumopen005One Too Manynot found yetP L E Fmediumopen006Closure Trapnot found yetP L E Fhardopen007Vanishing Elementsnot found yetP L E Fhardopen008Exhaustednot found yetP L E Fhardopen009Identity Crisisnot found yetP L E Fmediumopen010Almost Equalnot found yetP L E Fmediumopen011Sorted by Nothingnot found yetP L E Feasyopen012The Lost Returnnot found yetP L E Fmediumopen013Zero Productnot found yetP L E Feasyopen014Wrong by Designnot found yetP L E Feasyopen015Read-Onlynot found yetP L E Feasyopen016Missing Keynot found yetP L E Fmediumopen017The Shared Rownot found yetP L E Fhardopen018Wrong Ranknot found yetP L E Feasyopen019Misleading Truthnot found yetP L E Feasyopen020The Ignored Starsnot found yetP L E Fmediumopen