Alice Community MPG mathematical calculations and imputing data

 MPG mathematical calculations and imputing data
 54I54 Guest   Status: Posts: n/a MPG mathematical calculations and imputing data - 03-16-2012, 09:55 PM I'm trying to do problem 1 from chapter 3. It says: "Create a world in which the user is asked for the number of gallons of fuel his or her car can hold, and the number of miles that he or she can drive on a full tank. Use variables to hold these values. You should also have a variable to hold the car's miles-per-gallon (MPG). Calculate the MPG with the following forumla: MPG=miles/gallons The world should have a person and a car. The initial setup the car should be positioned off-camera. After the data is entered, the person should approach the camera and the car should drive into view and stop in front of the camera. The person should then say a message indicating the car's MPG, as calculated from the data entered by the user. Then the car should drive away, to a position off camera. " I don't know how to begin this problem. Is it possible for someone to walk me threw it? I have no idea how to make the character say the MPG. Thank You
 TauTrumpsPi Senior Member     Status: Offline Posts: 399 Join Date: Mar 2011 Location: The diamond layer 03-17-2012, 08:35 AM In the methods, there should be a "say" method. Ask for input by using the "ask user for a number" function. -------------------------------------------------------------------------------------------------------------------------- I have plenty of common sense. I just choose to ignore it. -Calvin and Hobbes Wondering about my Avatar? http://en.wikipedia.org/wiki/Tardigrade Wondering about my username? http://www.youtube.com/watch?v=jG7vhMMXagQ

 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