1/24
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
Boolean Logic
True & False
Not
Equals
Not Equals
And
Or
True & False
basic boolean values used in conditions
Not
negates a boolean value (not true becomes false)
Equals (=)
checks if two values are the same
Not Equals (≠)
checks if two values are not the same
And
returns true only if both conditions are tru
Or
returns true if at least one condition is true
Mathematical Operation Blocks
Addition (+)
Subtraction (-)
Multiplication (x)
Division (/)
Comparison Operators Blocks
Equals (=)
Greater than (>)
Less than (<)
Greater than or equal (≥)
Less than or equal (≤)
Text Operations
Length
is empty
compare texts
Length
finds the number of characters in a string
Is empty
checks if a string has no characters
Compare texts
compares two strings (A<B)
List Blocks
a collection of multiple values in a single variable
unlike a single variable, which stores one time, a list stores many
keep data organized
makes it easy to add, remove, or check items
List Operations
Is in list?
Length of list
Is list empty?
Is In List?
checks if an item exists in a list
Length of list
returns the number of items in a list
Is list empty?
checks if a list has no elements
Decision Statement
enables an app to make decisions by testing for a condition with a Boolean expression.
A Boolean expression evaluates to a Boolean value using relational or comparison operators like =, ≤, and ≥ to test the conditions.
“If” Block
a fundamental control structure that allows your app to make decisions.
It executes an action only if a specific condition is true.
If the condition is false, the action inside the block will be skipped
“If-Else” Block
allows the app to make decisions based on conditions.
It checks if a condition is true and executes a block of code.
If the condition is false, it executes an alternative block of cod
“If-Else If-Else” Block
In a conditional structure, the program evaluates conditions one by one from top to bottom.
As soon as it finds a true condition, it executes the corresponding block and skips the rest.
Repetition Structure
code segments that repeats a task a specific number of times or until a certain condition is met
avoids copying and pasting the same lines of code over and over again
easier to review and correct errors in a loop than multiple lines of repeated code.
While Loop
control structure that keeps running as long as a specified condition is true
it is useful for situations where you don’t know in advance how many times the loop should run, like waiting for a user input or continuously checking a sensor value
For Loop
a control structure that repeats a block of code a fixed number of times, either by counting through a range (e.g., 1 to 5) or iterating over a collection like a list or dictionary
help automate repetitive tasks