+ 1
What does this code do?
#Fibonacci code. huh? a = 0 b = 1 while a < 21: print(a) b + a elif: while a > 21: print(a) a = b + a
2 ответов
+ 1
It showed error
It said that the error at elif:
Syntax error
0
Why you are using elif first.
The syntax of if else statement is
if(...):
//Body
elif(...):
//Body
.
.
.
else:
//Body
This code gives you syntax error because you are not using if first , you are start using elif first which is syntactical error.