+ 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

29th Sep 2019, 9:45 PM
sudo-asap
sudo-asap - avatar
2 Respostas
+ 1
It showed error It said that the error at elif: Syntax error
29th Sep 2019, 10:45 PM
Amarnath
Amarnath - avatar
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.
30th Sep 2019, 1:08 AM
Chirag Kumar
Chirag Kumar - avatar