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

📚Flashcards
Length, Substring and Character Codes
Sign up to keep revising.Create a free account to study more flashcards and track your progress.

Practise the cards

15 cards from this deck

Show

What are strings in programming

Text data

What LEN operation does

Counts how many characters are in a string

Result of LEN("Seth Bottomley")

14 characters

What POSITION operation does

Locates where a specific character appears in a string

What zero-based indexing means

Computers start counting positions from 0, not 1

Position of first character in zero-based indexing

Position 0

Result of POSITION('h', "Seth Bottomley")

3

What SUBSTRING operation does

Extracts a specific section of text between two positions

Is the SUBSTRING end position inclusive or exclusive?

Exclusive (not included in result)

Result of SUBSTRING(2,6,"Seth Bottomley")

th Bo

What ASCII codes are

Number codes that represent each character

What CHAR_TO_CODE does

Converts a character to its ASCII number code

What CODE_TO_CHAR does

Converts an ASCII number to its character

Python function for string length

len(string)

Python function to convert character to ASCII

ord(char)

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

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