1/55
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Variable :: A named storage location in memory used to hold a piece of data.
Data Type :: Specifies the type of data a variable holds (e.g., Integer, Float, String, Boolean).
Integer (int) :: A data type for storing whole numbers (positive or negative). Example: age = 16
Float :: A data type for storing numbers with a decimal point. Example: price = 19.99
String (str) :: A data type for a sequence of characters, enclosed in quotes. Example: name = "Ada Lovelace"
Boolean (bool) :: A data type representing truth values, either True or False. Example: is_active = True
Global Variable :: Declared outside of any function; can be accessed from anywhere in the program. Example: player_score = 100 is usually global.
Local Variable :: Declared inside a function; can only be used within that specific function. Example: local_bonus = 25 inside a function.
Floor Division (//) :: An arithmetic operator that divides two numbers and discards the remainder, resulting in an integer. Example: 10 // 4 results in 2.
Modulus (%) :: An arithmetic operator that divides two numbers and gives the remainder. Example: 10 % 4 results in 2.
Slicing (String) :: Extracting a part of a string (a substring) using indices. The last index specified is non-inclusive. Example: "Python"[1:4] returns "yth".
Concatenate :: To join (link) two or more strings together end-to-end. Example: "IB" + "CS" results in "IBCS".
Immutable :: A property of strings in Python meaning their value cannot be changed after creation; operations like replace() create and return a new string.
Computational Thinking :: The thought process for formulating a problem and expressing its solution in a way a computer (human or machine) can execute.
Decomposition :: Breaking down a large, complex problem into smaller, more manageable sub-problems. Example: Breaking down a game into separate tasks: character design, world creation, scoring system.
Pattern Recognition :: Identifying trends, similarities, or recurring patterns to create more efficient and reusable solutions.Example: All enemies have health and attack, so they can use a single "Enemy" template.
Abstraction :: Filtering out unnecessary details to focus only on the essential concepts. Example: For a character, storing their score and position, but ignoring their shoe size.
Algorithmic Design :: Developing a clear, step-by-step set of instructions to solve a problem