CodeBlanks Logo Icon CodeBlanks

Project design

Design the beginner final skeleton.

Project: Grade calculator app

In this five-lesson beginner final you will build a grade calculator app that combines everything you have learned. In the first lesson you define a grades list and print it.

In later lessons you will add layers for appending new grades, computing the average, error handling and functions on top of this base. Each lesson adds one piece with a code step; the starting code includes the previous lesson's solution. This shows how a real app grows.

Practice Define and print the grades list

Assign [85, 90, 78] to grades. Then write print(grades).

Starter code

main.py
# Grade calculator - grades list
# define the grades list and print it

Sample solution

main.py
grades = [85, 90, 78]
print(grades)

Expected output

[85, 90, 78]

Next step: data model

The grades list is ready. In the next lesson you will add a data model layer on top: appending new grades with append. This layer will let you dynamically add new values to the grades list.

So the app can accept new grades while it runs. Each lesson adds a layer; the starting code carries the previous solution and you write only the new part. This shows how real apps grow layer by layer.

Questions and answers

Review the lesson questions together with their answers. To test yourself, solve the lesson interactively.

1 What will we compute in this project?

  • Age
  • Grade average Correct answer
  • Price
  • Distance

Explanation: We will compute the grade average in this project.

2 Complete the grades list

Question
grades = ____
Answer
grades = [85, 90, 78]

Explanation: [85, 90, 78] is a list with three grades.

3 Match project concepts

Term Meaning
grades Grade list
print Produces output
append Adds a grade
sum / len Average

All lessons in Beginner