Share your repls and programming experiences

← Back to all posts
#WEEKLY Fibonacci Sequence!
CodingCactus (3027)

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. 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.


minx28 (356)

@CodingCactus your nickname on the repl discord was literally minx but worse

CodingCactus (3027)

@minx28 i was joking silly billy

ZDev1 (639)

Is the Fibonacci of 10 is 34?
It should be 89, like my Fibonacci:

samiti3d (0)

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.

AbdulwajidArika (0)

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.

CodingCactus (3027)

@AbdulwajidArika hi, just send the repl link if you are sharing with your teacher. That is what we are saying.

AbdulwajidArika (0)

@CodingCactus I see that you unlist many people's work,great job!!! May I ask what do you get ot of this? As I see that you're spending your time efficiantly.

CodingCactus (3027)

@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 There they can see the full repl and mark your work. Much easier than making a post on the forum.

CodeLongAndPros (1362)

@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.

PyCoder01 (41)


CodingCactus (3027)

@minx28 lets try to be nice please

minx28 (356)

@CodingCactus bruh srsly nobody cares that someone was the first upvoter

CodingCactus (3027)

@minx28 someone out there in the world might

maxyang (72)

@PyCoder01 Wouldn't the first upvoter be the creator of the post?

RahulChoubey1 (20)

@adsarebbbad Maybe by "first upvoter," they meant "first non-creator upvoter" since the creator upvote is default.