Length, Substring and Character Codes (AQA GCSE Computer Science): Flashcards
📚Flashcards
Practise the cards
15 cards from this deck
ShowHide
Practise the cards
15 cards from this deck
What are strings in programming
What are strings in programming
Text data
What LEN operation does
What LEN operation does
Counts how many characters are in a string
Result of LEN("Seth Bottomley")
Result of LEN("Seth Bottomley")
14 characters
What POSITION operation does
What POSITION operation does
Locates where a specific character appears in a string
What zero-based indexing means
What zero-based indexing means
Computers start counting positions from 0, not 1
Position of first character in zero-based indexing
Position of first character in zero-based indexing
Position 0
Result of POSITION('h', "Seth Bottomley")
Result of POSITION('h', "Seth Bottomley")
3
What SUBSTRING operation does
What SUBSTRING operation does
Extracts a specific section of text between two positions
Is the SUBSTRING end position inclusive or exclusive?
Is the SUBSTRING end position inclusive or exclusive?
Exclusive (not included in result)
Result of SUBSTRING(2,6,"Seth Bottomley")
Result of SUBSTRING(2,6,"Seth Bottomley")
th Bo
What ASCII codes are
What ASCII codes are
Number codes that represent each character
What CHAR_TO_CODE does
What CHAR_TO_CODE does
Converts a character to its ASCII number code
What CODE_TO_CHAR does
What CODE_TO_CHAR does
Converts an ASCII number to its character
Python function for string length
Python function for string length
len(string)
Python function to convert character to ASCII
Python function to convert character to ASCII
ord(char)
