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, andtest3using 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
Free plan: 30 tutor messages. Premium is unlimited.
Saved
Ctrl + Enter to check
