CodeLab Academy 📞 9936 6696
← List Scratch · Level 10: Algorithms Quiz · 50 points ← #942 #944 →

#943. Fibonacci

When the green flag is clicked, this script runs. What number will the cat say?
when green flag clicked
set [a v] to (0)
set [b v] to (1)
repeat (4)
set [t v] to ((a) + (b))
set [a v] to (b)
set [b v] to (t)
end
say (a)

💡 Not sure? Build it in Scratch and try it out.

🔒 You can solve the first 3 problems without an account. Sign up for free to solve this one!