Alice Community

Alice Community (http://www.alice.org/community/index.php)
-   Share Worlds (http://www.alice.org/community/forumdisplay.php?f=6)
-   -   Test if number is Fibonacci (http://www.alice.org/community/showthread.php?t=7471)

aeroworks 10-30-2011 12:54 PM

Test if number is Fibonacci
 
1 Attachment(s)
I just finished an assignment for my class at Owens, and thought i would share wit the community.

[B][I]Objectives[/I][/B]:
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, ([B]n[/B]) 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 ([B]n[/B]). (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?
-John

x2495iiii 10-30-2011 02:05 PM

Cool. I'm going to Owens too. Who was your teacher?

aeroworks 10-30-2011 02:27 PM

Mrs. Buser

x2495iiii 10-30-2011 04:38 PM

Yup. Same here.

aeroworks 10-30-2011 04:39 PM

Your in her class now? or have had her in the past?

x2495iiii 10-30-2011 09:39 PM

Past.

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.


All times are GMT -5. The time now is 02:57 PM.

Copyright ©2024, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.