Mini project — A score counter and statistics

Lesson 23 of 26 · Basic Python

In this project we will make a simple program that keeps track of points during a game and stores the statistics in a list. Programs like this are common in games, quizzes and sports applications.


Task description


  • The user enters points (positive or negative).
  • All the points are stored in a list.
  • The program calculates the total score.
  • At the end the statistics are printed.

Basic code



points = []
total = 0

while True:
    entry = input("Enter points or 'end': ")

    if entry == "end":
        break

    point = int(entry)
    points.append(point)
    total += point

print("All points:", points)
print("Total score:", total)

Practice tasks


  • Calculate the average number of points.
  • Find the largest and the smallest number of points.
  • Add a function for resetting the points.