EMTECH | Decision Making and Loops with Code

0.0(0)
studied byStudied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/24

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 5:11 AM on 2/7/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

25 Terms

1
New cards

Boolean Logic

  • True & False

  • Not

  • Equals

  • Not Equals

  • And

  • Or

2
New cards

True & False

basic boolean values used in conditions

3
New cards

Not

negates a boolean value (not true becomes false)

4
New cards

Equals (=)

checks if two values are the same

5
New cards

Not Equals (≠)

checks if two values are not the same

6
New cards

And

returns true only if both conditions are tru

7
New cards

Or

returns true if at least one condition is true

8
New cards

Mathematical Operation Blocks

  • Addition (+)

  • Subtraction (-)

  • Multiplication (x)

  • Division (/)

9
New cards

Comparison Operators Blocks

  • Equals (=)

  • Greater than (>)

  • Less than (<)

  • Greater than or equal (≥)

  • Less than or equal (≤)

10
New cards

Text Operations

  • Length

  • is empty

  • compare texts

11
New cards

Length

finds the number of characters in a string

12
New cards

Is empty

checks if a string has no characters

13
New cards

Compare texts

compares two strings (A<B)

14
New cards

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

15
New cards

List Operations

  • Is in list?

  • Length of list

  • Is list empty?

16
New cards

Is In List?

checks if an item exists in a list

17
New cards

Length of list

returns the number of items in a list

18
New cards

Is list empty?

checks if a list has no elements

19
New cards

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.

20
New cards

“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

21
New cards

“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

22
New cards

“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.

23
New cards

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.

24
New cards

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

25
New cards

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

Explore top flashcards

SENTENCE STARTERS!
Updated 1028d ago
flashcards Flashcards (52)
WWII
Updated 22d ago
flashcards Flashcards (35)
Word List 3 Math
Updated 1166d ago
flashcards Flashcards (20)
A2.2 Cell Organelles
Updated 884d ago
flashcards Flashcards (51)
Mechanics
Updated 624d ago
flashcards Flashcards (35)
SENTENCE STARTERS!
Updated 1028d ago
flashcards Flashcards (52)
WWII
Updated 22d ago
flashcards Flashcards (35)
Word List 3 Math
Updated 1166d ago
flashcards Flashcards (20)
A2.2 Cell Organelles
Updated 884d ago
flashcards Flashcards (51)
Mechanics
Updated 624d ago
flashcards Flashcards (35)