+ 2
Help me to understand else if statements
how does it work exactly?
3 Respostas
+ 3
if (this is true) {
Run code in here
}
else(if ^ is false) {
Run this code instead
}
example:
If 1==4:
print("If is true")
else:
print("If is not true")
output:
If is not true
+ 1
It basically means that if this 'if' statement is false then move on to this 'else if' statement only if the conditions of that 'else if' statement is true.
https://code.sololearn.com/cEkf1yZocyhM/?ref=app
0
take the above answer.