Start learning free

LESSON 198 OF 673 · PROJECTS: EVERYDAY PROGRAMS

Report Card V1 - One Subject Average

Practice

Compute a student's average score across three tests using integer division so the result is a whole number.

You start with:

test1 = 85
test2 = 92
test3 = 78

Build:

Average: 85

Rules:

  • Compute the integer average of test1, test2, and test3 using integer division (//).
  • Store the result in a variable named average. The checker prints "Average: " followed by its value for you, so do not print anything yourself.

Add the three tests inside parentheses, then use // 3 for integer division.

test1 = 85
test2 = 92
test3 = 78

average = (test1 + test2 + test3) // 3

STEP 1 OF 1
    Ctrl + Enter to check