Length, Substring and Character Codes (AQA GCSE Computer Science): Quizzes
📚Quizzes
Practise the questions
12 questions from this quiz
ShowHide
Practise the questions
12 questions from this quiz
What does the LEN operation count in a string?
What does the LEN operation count in a string?
All characters including spaces
What is the result of LEN("Seth Bottomley")?
What is the result of LEN("Seth Bottomley")?
14
In zero-based indexing, what position is the first character in a string?
In zero-based indexing, what position is the first character in a string?
0
What is the result of POSITION('h', "Seth Bottomley")?
What is the result of POSITION('h', "Seth Bottomley")?
3
What does the SUBSTRING operation do?
What does the SUBSTRING operation do?
Extracts a section of text
What is the result of SUBSTRING(2,6,"Seth Bottomley")?
What is the result of SUBSTRING(2,6,"Seth Bottomley")?
th Bo
What does CHAR_TO_CODE operation do?
What does CHAR_TO_CODE operation do?
Converts character to ASCII number
What does CODE_TO_CHAR(68) return?
What does CODE_TO_CHAR(68) return?
D
What is the Python equivalent of the LEN operation?
What is the Python equivalent of the LEN operation?
len(string)
Which Python function converts a character to its ASCII number?
Which Python function converts a character to its ASCII number?
ord()
What syntax does Python use to extract a substring?
What syntax does Python use to extract a substring?
string[2:7]
What common mistake do students make with SUBSTRING's end position?
What common mistake do students make with SUBSTRING's end position?
Thinking it's included in the result
