Online worksheet ยท 1 of 4

Assignment changes stored state - Online practice 1

Read the information, then answer the questions. An adult may read the instructions aloud. Show your working where asked.

Read before answering

Trace these Python statements in order: score = 4; score = score + 3; saved = score; score = score * 2; same = (score == saved). Semicolons separate statements. = assigns after evaluating the right side; == tests equality. These values are immutable integers, so later reassignment of score does not change saved.

Worksheet preview

This exercise is included in the paid course. Full-course fee: GBP 200.00 once. Register and enrol to complete all course exercises and download the course PDFs. Access begins after payment is confirmed.

Register and enrol

Already registered? Sign in