The Fibonacci sequence is where the next number in the sequence is the previous two numbers added together. So: 0,1,1,2,3,5 is part of it for example.
But the problem is, how do you do this without using a loop?
Well, if I'm honest I had no clue until I saw someone else do some clever string manipulation and then
eval(). And that is pretty much what I have done except I have turned it into js and then sent that with the template and then that js is run. it uses
bigints so that you can get massive numbers (but I've capped it at nth = 1,000,000 because once it gets that big, memory and overflow start complaining. It has a loading circle thingy for when it takes a while to compute as well.
As well as just using the form, you can go to /<nth> (e.g. https://fib.codingcactus.repl.co/500000). Seems pretty useless but it means that you can share a certain nth with someone easier rather than having them type it in. Yeah I guess it is pretty useless actually.
Hi CodingCactus, your name so cool. I thank you for letting me know about picking the language on posting, only English because I accidentally posted it, this is so a big help for me.
Anyway, your Fibonacci with Flask make me a lot of coding ideas.
please STOP unlisting my code, the purpose of is not for people to use, I just need a link to send to my teacher, if you find issues with it, it's best if you stay away from my repl!! thank you for understanding.
@AbdulwajidArika all we are doing is enforcing the rules set out to every person that uses this site. In your case, it is the rule that posting homework is not allowed. A better alternative to posting your homework on repl talk, is to send the link to the repl (they are in the form https://repl.it/@username/replName). There they can see the full repl and mark your work. Much easier than making a post on the forum.
@AbdulwajidArika You would not submit math homework to a Calculus journal, would you? This is the same. Repl has features for sharing your code in a classroom, and it’s not Talk. You can just copy the link to your repl that Firefox shows in the URL bar and send it to your teacher. You don’t have to post it.