The variable token is assigned a value.
token = "code4150"
Complete the table to show the sequence of outputs when each statement executes.
The first output has been completed for you.
| Statement | Output |
|---|---|
print(token.length) | 8 |
print(token.upper) | |
print(token.left(4)) | |
print(int(token.right(4)) * 3) |
95 exam-style questions on OCR GCSE Computer Science Programming fundamentals. Each one has a worked solution and a mark scheme showing where the marks go.