Length, Substring and Character Codes (AQA GCSE Computer Science): Quizzes

📚Quizzes
Length, Substring and Character Codes
Sign up to keep practising.Create a free account to play more quizzes and track your progress.

Practise the questions

12 questions from this quiz

Show

What does the LEN operation count in a string?

All characters including spaces

What is the result of LEN("Seth Bottomley")?

14

In zero-based indexing, what position is the first character in a string?

0

What is the result of POSITION('h', "Seth Bottomley")?

3

What does the SUBSTRING operation do?

Extracts a section of text

What is the result of SUBSTRING(2,6,"Seth Bottomley")?

th Bo

What does CHAR_TO_CODE operation do?

Converts character to ASCII number

What does CODE_TO_CHAR(68) return?

D

What is the Python equivalent of the LEN operation?

len(string)

Which Python function converts a character to its ASCII number?

ord()

What syntax does Python use to extract a substring?

string[2:7]

What common mistake do students make with SUBSTRING's end position?

Thinking it's included in the result

Join 100,000+ GCSE students studying Quizzes with us.

Select your subjects, and get access to A+ resources today.