Fix the score counter — Software Developer · Pretender
The fictional quiz app QuizPop shows the wrong total at the end of each game. Players are confused, and the team needs a fix today.
Code checks · ~5 min
Your role
You're a junior developer on the QuizPop team.
Your goal
Complete the function so it adds up all the points of a game.
What you know
- `points` is a list of the points from each question, for example [2, 3, 5].
- An empty game must give 0.
Limits
- You can only change the three blanks.
- All three checks must pass before release.
Success looks like
- Starts right — The total starts at zero, so nothing extra sneaks in.
- Adds every point — Each turn of the loop adds the new points to what you already had.
- Returns the answer — The function gives back the finished total.
Skills you used
- Logical thinking — Following steps and rules precisely.
- Debugging — Finding what's wrong and why.
In real life
Real developers write checks like these (automated tests) so a bug that was fixed once never comes back unnoticed.
Software Developer
Build the apps and tools people use every day.
Explore next
- Game Designer — Invent rules and levels that are fun and fair.
- Data Analyst — Turn numbers into honest answers.
- Cybersecurity Analyst — Protect people and systems from online threats.
Keep exploring
Other languages
Loading MyLeoNes®…
