Understanding Conditional Statements in Python

0.0(0)
studied byStudied by 1 person
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/21

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

22 Terms

1
New cards

Boolean

Python data type representing True or False.

2
New cards

Boolean Values

Only two possible values: True or False.

3
New cards

Boolean Expression

Evaluates to either True or False.

4
New cards

Comparison Expression

Compares two values using operators.

<p>Compares two values using operators.</p>
5
New cards

Equality Operator

x == y means x is equal to y.

6
New cards

Inequality Operator

x != y means x is not equal to y.

7
New cards

Greater Than Operator

x > y means x is greater than y.

8
New cards

Less Than Operator

x < y means x is less than y.

9
New cards

Greater Than or Equal To

x >= y means x is greater or equal to y.

10
New cards

Less Than or Equal To

x <= y means x is less than or equal to y.

11
New cards

Logical Operators

Includes and, or, not for combining conditions.

<p>Includes and, or, not for combining conditions.</p>
12
New cards

And Operator

True if both operands are True.

13
New cards

Or Operator

True if at least one operand is True.

14
New cards

Not Operator

Inverts the truth value of an operand.

15
New cards

Order of Operations

Arithmetic > Comparisons > Logical operations.

16
New cards

Conditional Statement

Executes code based on Boolean expression.

<p>Executes code based on Boolean expression.</p>
17
New cards

If Statement

Executes if the condition is True.

18
New cards

Else Statement

Executes if the condition is False.

19
New cards

Elif Statement

Checks additional conditions in a chain.

20
New cards

Nested Conditionals

Conditionals within other conditionals.

21
New cards

Variable Naming

Gives meaning to Boolean expressions.

22
New cards

Triangle Types

Classifies triangles as EQUILATERAL, ISOSCELES, SCALENE.