A generic example in Python:
def mahFuncshiown(a, b):
c = None
if a == 3:
c = 8
a += 9
else if a + 10 == 15:
c = 2
return c + a
What's the reason for most programming languages not allowing code to be put in-between if
and else if
statements? The else if
should execute if the previous if
was not True.
Aucun commentaire:
Enregistrer un commentaire