What this deck covers
This deck focuses on Strings, giving you a quick way to review the definitions, rules, and examples that matter most for AP Computer Science Principles.
Study Strings in AP Computer Science Principles with focused flashcards that help you recognize the idea, recall the key rule, and apply it in practice-style prompts.
0% Complete
Find and correct the error: 'Hello'.indexOf('e') in Python.
Tap card or press Space to flip
Correct: 'Hello'.find('e'). Python uses find() instead of indexOf().
How well did you know it?
Card 1 / 74
Space to flip · ← / → to move · once flipped, → Got it · ← Still learning
This deck focuses on Strings, giving you a quick way to review the definitions, rules, and examples that matter most for AP Computer Science Principles.
Work through these flashcards in short sessions. Try to answer each prompt before flipping the card, then revisit any cards you miss until the explanation feels automatic.
Answer: Correct: 'Hello'.find('e'). Python uses find() instead of indexOf().
Answer: find(). Locates initial position of substring occurrence.
Answer: toUpperCase(). Converts all letters to uppercase format.
Answer: isdigit(). Returns True if character is numeric digit.
Answer: join(). Combines list elements into single string.
Answer: equals(). Compares string content for exact match.
Answer: find(). Locates initial position of substring occurrence.
Answer: Correct: 'Hello'[0:3]. Python uses slice notation instead of substring method.
Answer: capitalize(). Makes first letter uppercase, rest lowercase.
Answer: includes(). Checks if substring exists within the string.
Answer: encode('utf-8'). Converts string to UTF-8 byte encoding.
Answer: float(). Converts string to decimal number format.
Answer: list(). Creates list with each character as element.
Answer: split(). Divides string into array elements by delimiter.
Answer: toString(). Converts numeric value to string representation.
Answer: length property or === ''. Tests length property or compares to empty.
Answer: endsWith(). Tests if string terminates with given suffix.
Answer: split(). Breaks string into word array elements.
Answer: toString(). Converts numeric value to string representation.
Answer: toLowerCase(). Built-in method for case conversion in Java.
Answer: length property or === ''. Tests length property or compares to empty.
Answer: capitalize(). Makes first letter uppercase, rest lowercase.
Answer: toUpperCase(). Converts all letters to uppercase format.
Answer: isdigit(). Returns True if character is numeric digit.
Answer: lastIndexOf(). Finds rightmost position of substring match.
Answer: center(). Pads string with spaces for centered alignment.
Answer: length() or len(). Standard method to count characters in a string.
Answer: parseFloat(). Converts string to floating-point number.
Answer: at() or []. Accesses individual character by position.
Answer: upper(). Transforms all letters to capital case.
Answer: equals(). Compares string content for exact match.
Answer: indexOf(). Returns position of first occurrence of character.
Answer: center(). Pads string with spaces for centered alignment.
Answer: The + operator. Joins strings together using addition operator.
Answer: compareTo(). Performs alphabetical ordering comparison between strings.
Answer: endsWith(). Tests if string terminates with given suffix.
Answer: list(). Creates list with each character as element.
Answer: substring(). Extracts portion of string between indices.
Answer: parseFloat(). Converts string to floating-point number.
Answer: isspace(). Checks if all characters are whitespace.
Answer: lastIndexOf(). Finds rightmost position of substring match.
Answer: Correct: 'Java'[2]. Python uses bracket notation for character access.
Answer: int(). Parses string representation into integer value.
Answer: length() or len(). Standard method to count characters in a string.
Answer: join(). Combines list elements into single string.
Answer: int(). Parses string representation into integer value.
Answer: startswith(). Tests if string begins with given prefix.
Answer: indexOf(). Returns position of first occurrence of character.
Answer: slice with [::-1]. Extended slicing with step -1 reverses order.
Answer: includes(). Checks if substring exists within the string.
Answer: split(). Breaks string into word array elements.
Answer: strip(). Removes leading and trailing whitespace characters.
Answer: split(). Divides string into array elements by delimiter.
Answer: replace(). Substitutes specified text with new text.
Answer: format(). Inserts values into string template placeholders.
Answer: at() or []. Accesses individual character by position.
Answer: toLowerCase(). Built-in method for case conversion in Java.
Answer: compareTo(). Performs alphabetical ordering comparison between strings.
Answer: format(). Inserts values into string template placeholders.
Answer: isspace(). Checks if all characters are whitespace.
Answer: Correct: 'Hello'[0:3]. Python uses slice notation instead of substring method.
Answer: The + operator. Joins strings together using addition operator.
Answer: startswith(). Tests if string begins with given prefix.
Answer: float(). Converts string to decimal number format.
Answer: isalpha(). Validates string contains only letter characters.
Answer: slice with [::-1]. Extended slicing with step -1 reverses order.
Answer: replace(). Substitutes specified text with new text.
Answer: upper(). Transforms all letters to capital case.
Answer: encode('utf-8'). Converts string to UTF-8 byte encoding.
Answer: substring(). Extracts portion of string between indices.
Answer: Correct: 'Hello'.find('e'). Python uses find() instead of indexOf().
Answer: strip(). Removes leading and trailing whitespace characters.
Answer: Correct: 'Java'[2]. Python uses bracket notation for character access.
Answer: isalpha(). Validates string contains only letter characters.