+ 1
What is else statement ?
5 Réponses
+ 2
Else is statement is uses the if or if else statements have value false!
0
It's similar to the if statement, and it cannot exist without it. The code block after it will execute if the condition in the if statement before it is false.
Example:
x = 5
if x == 4:
print("x equals 4")
else:
print("x doesn't equal 4")
0
An statement what executes if "if statement" returns false
0
Thanks 😁
0
if condition:
here are the orders that are executed if the condition is true and that can occupy multiple lines.
else:
and here are the orders that are executed if the condition is false and that can also occupy multiple lines.