Answer and explanation

Correct answer: A. `'computer'`

  1. Step 1: Slicing includes the start index and excludes the end index.
  2. Step 2: Characters 0 to 7 are 'computer'.
Answer
`'computer'`.
Why not the others: `'compute'`, `'omputer'` and `'retupmoc'` do not fit.

Practise more Python programming and algorithms.

Free questions with an explanation for every one, and full timed Saudi Secondary School Certificate mock tests.