Alice Community  

Go Back   Alice Community > Alice 2 > Share Worlds

Reply
 
Thread Tools Display Modes
Test if number is Fibonacci
Old
aeroworks
Guest
 
Status:
Posts: n/a
Default Test if number is Fibonacci - 10-30-2011, 12:54 PM

I just finished an assignment for my class at Owens, and thought i would share wit the community.

Objectives:
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?
-John
Attached Files
File Type: a2w fibonacci.a2w (845.2 KB, 63 views)
   
Reply With Quote
Old
x2495iiii
Super Moderator
 
x2495iiii's Avatar
 
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
Default 10-30-2011, 02:05 PM

Cool. I'm going to Owens too. Who was your teacher?
   
Reply With Quote
Old
aeroworks
Guest
 
Status:
Posts: n/a
Default 10-30-2011, 02:27 PM

Mrs. Buser
   
Reply With Quote
Old
x2495iiii
Super Moderator
 
x2495iiii's Avatar
 
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
Default 10-30-2011, 04:38 PM

Yup. Same here.
   
Reply With Quote
Old
aeroworks
Guest
 
Status:
Posts: n/a
Default 10-30-2011, 04:39 PM

Your in her class now? or have had her in the past?
   
Reply With Quote
Old
x2495iiii
Super Moderator
 
x2495iiii's Avatar
 
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
Default 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.
   
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



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