Alice Community Teaching Multiplication

 Teaching Multiplication
johnnywas
Guest

Status:
Posts: n/a
Teaching Multiplication - 02-14-2009, 07:00 PM

I have two young girls and this is a simple game I designed to help teach them multiplication. It also gives me practice within Alice. I'm using Alice to familiarise myself with programming concepts

You choose the times tables you want. We calll them Times tables I think Americans have a different name. We're talking 2*2=4 3*2=6. All that stuff

I would like to work on the programme so the race track was circular and
so both cars were always moving at a minimum speed at all times
but the programming task is currently beyond me

I have a couple of other ideas so may return to this one

Thanks Dr Jim and Dick Baldwin for the advice and tutorials
Attached Files
 Times Race4.a2w (1,009.1 KB, 34 views)

 johnnywas Guest   Status: Posts: n/a 02-15-2009, 06:37 AM just to expand on the difficulties I have the programme is based on asking the user a question (4*4). If he gets the question right the car goes a long way and if he gets it wrong it moves a shorter distance along the track one of the problems i have is that the programme requires a lot of variables (the random number, the table being tested, the user answer, the computers answer, the distance travelled). these all seem to have to be present in the same method because I haven't found a way to make variables created in one method avialable in another. I don't think I can manage the other suggested changes (a circular track and a constant speed) without being able to access some of the variables in different methods. otherwise the programme (the Race Method) will soon run to several pages) grateful for suggestions
DrJim
Guest

Status:
Posts: n/a
02-15-2009, 11:52 AM

Maybe the attached will give you a few ideas.

Note that a world level variable remains active as long as the world is running (and then resets to the default). It can also be accessed and modified by any method without restriction. (Note - in this respect Alice 2.0 totally defeats the concept of encapsulation. In terms of good programming practice, it would be far better to pass the lap time to the "say" method as a parameter.)
Attached Files
 Car in Circle.a2w (899.0 KB, 22 views)

 johnnywas Guest   Status: Posts: n/a 02-15-2009, 01:40 PM thanks Dr Jim i see, I should have created most of my variables at world level very good. J

 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     Alice Player and VR General Discussion     Questions and Comments     The Lounge