Alice Community How do I do a calculation in Alice 2.2

 How do I do a calculation in Alice 2.2
 zlloyd1 Junior Member     Status: Offline Posts: 8 Join Date: Nov 2011 Location: Virginia How do I do a calculation in Alice 2.2 - 11-04-2011, 11:32 PM I have a project where I have two user inputted numbers that I need to divide and return a value. It is simple really, the first is the distance and the second is the speed limit. I need to divide the speed limit into the distance and return the outcome in hours to the screen. This is a dumb issue but I am new to Alice and would greatly appreciate any advice, and thanks in advance!!
sfunk
Senior Member

Status: Offline
Posts: 1,112
Join Date: Mar 2011
Location: I don't know
11-05-2011, 06:23 AM

Check List of things needed:if you don't know how to do these, i'll make simple explinations of them further below.

1.)Need to know how to ask for user input

2.) need to know how to create world variables

3.) Need to know how to create methods and events to make your world run.

HOW TO:

1.) this is done inside of the "world">"functions tab" and is needed to be placed inside of 3D text, (i'll attach a world showing how this is done)

2 and 3 are shown in the world I provided

I showed how to make a 3d text object represent a number variable, I walked you through on how to create number variables, then I showed you how to ask for user input, try the rest on your own
Attached Files
 quick_help.a2w (177.4 KB, 30 views)

If you are stuck on a project, check out the tutorials I made here at this link:

There are lots of tutorials on it so far, including some youtube videos, check it out

Or..

Go to my youtube channel to check out my alice 2.2 tutorials I have there..

 Your file only seems to have one method??
 zlloyd1 Junior Member     Status: Offline Posts: 8 Join Date: Nov 2011 Location: Virginia Your file only seems to have one method?? - 11-05-2011, 10:42 PM I tried to follow your instructions but got stuck where it says "now go to world functions and drag the "ask user for number" tile into the number of user_input method (check mine as reference)". I am not sure what this is saying because the entire file only has one method in it, so there is nothing to check as a reference. I do see in the event window there are other methods being called but I do not know how to find them to look at them.
 sfunk Senior Member     Status: Offline Posts: 1,112 Join Date: Mar 2011 Location: I don't know 11-06-2011, 01:14 AM in the method list, on the left side of the screen, there should be the methods I use, just click "edit" and they will pop up showing what they were done If you are stuck on a project, check out the tutorials I made here at this link: http://alice.org/community/showthread.php?p=36778#post36778 There are lots of tutorials on it so far, including some youtube videos, check it out Or.. Go to my youtube channel to check out my alice 2.2 tutorials I have there.. http://www.youtube.com/user/sfunk1992?feature=mhsn

 Tags functions, math

 Thread Tools Display Modes Linear Mode

 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 Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Announcements     Community News and Announcements Alice 3     How Do I?     Works In Progress     Share Your World     Share Custom Classes     Bugs and Trouble Shooting     Suggestion Box Alice 2     How do I...?     Works-In-Progress     Share Worlds     Share Objects     Bugs and Troubleshooting     Suggestion Box Educators     Teaching with Alice     Teaching Using Alice 3     Teaching Using Alice 2     CS Principles and Alice     AP CSA and Intro to Java and Alice     Workshops General Discussion     Questions and Comments     The Lounge