ScratchData LogoScratchData
Back to MegaApuTurkUltra's profile

ApuC generated fibonacci function!

MEMegaApuTurkUltra•Created August 27, 2014
ApuC generated fibonacci function!
8
8
141 views
View on Scratch

Instructions

======== ApuC source =========== def fib(n){ if(fib < 2){ return 1; } return fib(n-1) + fib(n-2); } askAndWait("Enter a number n, and the nth fibonacci number will be displayed:"); say(fib(answer()));

Description

Most likely the first project entirely generated by ApuC! http://scratch.mit.edu/discuss/topic/50212/ This was used as a recursion test to make sure the return stack works. It's actually surprising how much a complex language like ApuC simplifies Scratch operations like this. Compare the ApuC source above to the code inside the editor.

Project Details

Project ID25958119
CreatedAugust 27, 2014
Last ModifiedSeptember 9, 2014
SharedAugust 27, 2014
Visibilityvisible
CommentsAllowed