Man, if I understand you’re having doubts about the control blocks if/Else. Theoretically, in almost all programming languages, you have to have an initial condition with if
, the others with elif
(in the case of python but in some others it is else if
) and the last, in case no other is met, with the else
.
That is to say,
Se algo (if): isso
Se não, se algo (elif): aquilo
Se não, se algo (elif): aquilo outro
Se nenhuma das anteriores (else): aquilo final
Well, that’s the pattern, but nothing stops you from putting it alone elif
. As long as they can cover all the cases, it’s okay, but you’re not programming by the standards.
if
is "if",elif
is "or if". Without theif
doesn’t have theelif
.– Wallace Maxters