Woah these are wonderful!
Wow, I thought that was great already (I think it looks awesome as well) and I see you are thinking about adding functionality for calculating an approximation for really big numbers that's amazing.
This is really cool! I love how you added the ability to choose a number from playing the project as well, I really didn't expect that. (For my ones, I just let there be a variable in the code that I could change so that was the basic minimum I set in the requirement of 'being able to specify the input n')
Yeah it is really handy what you can do in other languages!
And oh no that must be pretty frustrating (I would like to add, this doesn't have to be in the newest updates this idea was actually inspired by when Hopscotch didn't have a lot of functionalities like a long time ago!)
Very neat! I think that's really cool how you did it with just two variables
previous. I remember when I first did it, I used a, b, c. That was totally unreadable XD so I just went back and changed it now:
(The initialisation here for
nth fib number is a little dodgy...) I like how succinct yours is!
Edit: oh wait, in my picture, I think that should be repeat times(n-1), not n, according to the two starting numbers I defined in the problem.
And yep haha I'm really glad hearing you're interested in hanging around here (I love coming across topics here that make me feel like that )
And this is one idea I was thinking through (aside from the code I put in the previous details):
Here is something I was thinking through recently
I was interested in doing this with recursion in Hopscotch (even though it is an inefficient way of approaching Fibonacci's without a dictionary data type )
This is the pseudocode idea (thinking but not actually coding anything yet)
if n = 1 then
else if n = 2 then
return (fibonacci(n-2) + fibonacci(n-1))
In Hopscotch, there are a few things you have to think about with recursion
This was the code I had so far:
The problem is, the variables
(n-2)th fib number and
(n-1)th fib number don't record as local variables for each time (each time the Fibonacci ability is run, they're both reset)
So I'm stuck there for now.
And again, this is just like the Challenges topic – anyone can submit a puzzle, and anyone can solve whichever they feel like (also inspiration from various other programming competitions)
Oh yeah, I think I forgot to mention, but the heart of this was also inspired by when Hopscotch first announced that it was Turing Complete on its blog – meaning that it can technically be used to solve any computer problem in the world. This made me go like woah so I was really inspired to try solving problems using just Hopscotch, leading to these ideas initially starting