The word is uppercase!
if
statement, which executes code only when a condition is true.if
Statementelse
Statementelse
Statementif
condition is False.x
is 3, the else
block executes, printing “x is not greater than 5”.elif
Statementelif
elif
to check additional conditions if the previous ones are false.x > 10
is false, but x > 5
is true.==
: Equal to!=
: Not equal to>
: Greater than<
: Less than>=
: Greater than or equal to<=
: Less than or equal to==
operator checks if age
is 18, while the !=
operator checks if it is not 20.or
: True if at least one condition is true.not
: Inverts the truth value of the condition.if
Statementsif
Statements?if
statement inside another to check multiple conditions that depend on each other.x > 5
. If true, then check y > 15
.in
Operatorin
Operatorchar.isdigit()
.Seminar: LLM, WiSe 2024/25