View Single Post
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