Logical Operators + Conditional expression

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/4

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 4:46 PM on 9/6/25
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

5 Terms

1
New cards

What are the 3 logical operators and what do that do?

“Or” - at least one condition must be true

“And” All conditions must be true

“Not” Inverts or reverses the condition (not True, not False.

2
New cards

What is a logical operator?

A logical operator allows us to check multiple conditions

3
New cards

What is a conditional expression?

A one-liner shortcut using an If Else statement (AKA Ternary operator)

Print or assign one of two values based on the condition 

4
New cards

How do you write an conditional expression?

X if condition else Y

Examples:

Num = 5 

print( “EVEN” if Num % 2 == 0 else “Negative) 

5
New cards

Explore top flashcards