View Full Version : Test if number is Fibonacci

10-30-2011, 01:54 PM
I just finished an assignment for my class at Owens, and thought i would share wit the community.

Create and Alice world with a Count penguin and a Fibonacci penguin. Count penguin will simply start counting slowly when the world starts. The Fibonacci penguin will jump up and down and flap its wings while saying "Fibonacci, Fibonacci, (n) is Fibonacci!" When Count penguin says a number that is part of the Fibonacci sequence. the Fibonacci penguin should say the actual number in place of (n). (p.211 "An introduction to programming Using Alice 2.2" Charles W. Herbert 2nd edition)

I am not sure if theirs a better way to do this, however this is my attempt. And it works quite well. Can anybody offer any improvements to my method?

10-30-2011, 03:05 PM
Cool. I'm going to Owens too. Who was your teacher?

10-30-2011, 03:27 PM
Mrs. Buser

10-30-2011, 05:38 PM
Yup. Same here.

10-30-2011, 05:39 PM
Your in her class now? or have had her in the past?

10-30-2011, 10:39 PM

She was the teacher who didn't like it when I was going above and beyond in my worlds. She thought it was wasting time.

Then again, I didn't work nearly as hard as I should've in her other class.

I guess it evens out.

Oh well. Great world man. A nice bit of logic there.