Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Thread Tools Display Modes
Prev Previous Post   Next Post Next
Penguin calculating pi (
Posts: n/a
Question Penguin calculating pi ( - 03-14-2011, 05:10 PM

Hi there. I'm taking Alice as part of my program study. I really love the program and the class, however, I'm at a point where I'm stuck.

My teacher has assigned us with this:

"Using the concept of variables, create a Snow World in which a penguin calculates the area of a circle A=πr2 in his head, where the user enters the r value (radius), and π is pi (3.14159265). Define descriptive variables for each quantity, and use the World function pow() to compute r2"

I have used the skatergirl example in the book, yet, it's still confusing for me because it is a different math function altogether. I don't even see anywhere on the keyboard where I can type the symbol for "pi".

Obviously, I need help. Here is the storyboard:

"Penguin says, 'I can calculate the area of a circle A=π r2 in my head!'

Prompt the user to enter a value for radius.

Calculate area using the formula: area.set(value, (pi * Math.pow(radius, 2))

Penguin says, 'The area of the circle is' + area"

Any help would be GREATLY appreciated. I've been trying to figure this out for almost a whole week, and the assignment is due tomorrow night. My teacher doesn't have any office hours, so it is difficult to set up a meeting for help. I thank anyone ahead of time for any help you may be able to provide me.
Reply With Quote

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 ©2021, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.