logo

AQA A-Level Computer Science practice

What is the final value of total after this Python 3 code executes? total = 2 total = total + 3 total = total * 2

Try the question first, then check the answer and practise the same topic again.

At a glance

MCQ

Type

practice

Style

Topic

Programming

Exam-style question

Try this first

What is the final value of total after this Python 3 code executes? total = 2 total = total + 3 total = total * 2.

  1. A.5
  2. B.7
  3. C.10
  4. D.12

Answer and explanation

Concise answer

10

Why this is correct

The statements execute in sequence. First total becomes 5, then it becomes 10.

Use the concise answer above for a quick check, then reveal the full model answer and detailed explanation.

Common mistake

No common mistake is linked to this question yet.

Related flashcards

No flashcards are published for this page yet.

Related practice questions