Alice Community  

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

Reply
 
Thread Tools Display Modes
Penguin calculating pi (
Old
BravoTwoZero
Guest
 
Status:
Posts: n/a
Question Penguin calculating pi ( - 03-14-2011, 04: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
Old
Dameria
Senior Member
 
Dameria's Avatar
 
Status: Offline
Posts: 976
Join Date: Sep 2009
Location: United States
Default 03-14-2011, 04:17 PM

The teacher says exactly what to do right in his directions.


Check out my best projects so far and please comment:

Tic-Tac-Toe 2.0 ................... http://www.alice.org/community/showthread.php?t=3548
Alice Paint ........................... http://www.alice.org/community/showthread.php?p=23408
Real-Time Clock .................. http://www.alice.org/community/showthread.php?p=12725
Maze Game ......................... http://www.alice.org/community/showthread.php?t=4301
   
Reply With Quote
Old
David B
Senior Member
 
David B's Avatar
 
Status: Offline
Posts: 1,145
Join Date: Dec 2010
Location: N/A
Default 03-14-2011, 05:05 PM

This is slightly off topic, but today happens to be Pi Day (read more here).

As for helping you with this project, I will have to pull out my notes from when I was a student learning how to use Alice. I don't exactly remember how to do this.
   
Reply With Quote
I understand that...
Old
BravoTwoZero
Guest
 
Status:
Posts: n/a
Default I understand that... - 03-14-2011, 07:33 PM

Yes, I see the directions...but HOW to exactly do it IS the question. WHAT to do is not the issue at all.

Thank you, any notes would be of GREAT help.
   
Reply With Quote
pi
Old
kates77
Guest
 
Status:
Posts: n/a
Default pi - 03-14-2011, 09:25 PM

obviously, pi = 3.14159265. Seems like they are ok with you truncating it. don't make things harder than they are. :-)
   
Reply With Quote
Old
BravoTwoZero
Guest
 
Status:
Posts: n/a
Default 03-14-2011, 10:07 PM

Yes, it seems as though I am

I still have no idea where to start, or what steps to take.
   
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 ©2021, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.