click below
click below
Normal Size Small Size show me how
CSP - Section 4
Term | Definition |
---|---|
Append | concatenate |
Capitalize | returns a new string with the first character capitalized |
Concatenate | add two strings together using the + symbol |
Function | a sub-procedure that returns a value and can take input |
Immutable | does not change; example strings |
Index | a number associated with the position of a character in a string |
Object | can have behavior (things it can do). Ex. strings and turtles |
String | a sequence of characters inside a pair of single, double, or triple quotes |
Substring | part of a string |
find | takes a string as input and returns the index of the first occurence of that string in the string the function is called on |
len | takes a string as input and returns the number of characters in the string including any spaces. For example len("Hi there") w |
lower | returns a new string with only lowercase letters |
slice | uses [start] or [start:end] which will return a substring of the current string starting at the given start position and if an end position is given ending at the character before the end position |