Loading...
The Bug Spotter
A easy Python interview practice problem on DataDriven. Write and execute real python code with instant grading.
- Domain
- Python
- Difficulty
- easy
- Seniority
- junior
Problem
Our code review tool flags functions whose output does not match expectations. Write a function called fix_running_average that computes the running average of a list of numbers. The broken version is provided. It has two bugs. Fix them so that fix_running_average([10, 20, 30]) returns [10.0, 15.0, 20.0].
Practice This Problem
Solve this Python problem with real code execution. DataDriven runs your Python code in a sandboxed Docker environment and grades it instantly.