Debug This Code — Day 1Sharpen your problem-solving skills, one bug at a time!
Every post in this series drops a short, buggy code snippet. Your job: spot the bug, explain what's wrong, and fix it. Drop your answer in the comments before we reveal the solution tomorrow!
Today's snippet (Python):
def get_average(numbers):
total = 0
for n in numbers:
total += n
return total / len(numbers)
print(get_average([]))
What breaks here, and why?
💡 Comment your fix below
🔁 Share with a friend who loves a good debugging challenge
⏰ Solution + explanation drops tomorrow
#DebugThisCode #CodingChallenge #LearnToCode #Python #edtech #HCLGUVI
❤1🥰1👏1