+ 2

Help me to understand else if statements

how does it work exactly?

1st May 2018, 10:51 AM
James John Chirwa
James John Chirwa - avatar
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
1st May 2018, 10:57 AM
LordHill
LordHill - avatar
+ 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
1st May 2018, 11:19 AM
Jordan Patterson
Jordan Patterson - avatar
0
take the above answer.
1st May 2018, 11:24 AM
pempho jimu
pempho jimu - avatar