alice-teacher Program problem

Steven Huss-Lederman huss at beloit.edu
Thu Nov 3 10:01:46 EDT 2011


Dear Emily,

I agree with others that some other techniques may work better.  However, taking the code as it is written, two ideas come to mind:

1) If the shark moves too fast it can be missed because the if does not execute in time.  This could be the case if there are some items below where we can see that slows the loop down.  Each line may take a second be default.

2) Alice uses center of mass to determine distance.  This can make something seem close when it is not in this regard.  One technique I use is to increase the distance to see if it ever executes.  If you make it hugh it should work even before the shark is moved.  If it does and then reducing does not work then this may be the reason (or above)

I hope this helps.

Steve

On Nov 2, 2011, at 7:11 AM, Emily Higgins wrote:

> Hi All -
> One of my students is having a problem with an if...else statement.  I have used the same setup myself, coupled with a loop, and had it work fine.  As is, the lifeboat does not ever recognize the shark, even if the shark is literally in the boat.  If you have a moment to look and get back to me, I would really appreciate it.  I have put in a screenshot of the bulk of the program.  My hunch is that one of his events is causing the problem, but still just can't figure it out.  
> Thanks to all,
> Emily Higgins
> BRHS
> Boothbay Harbor, Maine<Screen shot 2011-11-02 at 8.10.44 AM.png>
> _______________________________________________
> alice-teachers mailing list
> alice-teachers at lists.andrew.cmu.edu
> https://lists.andrew.cmu.edu/mailman/listinfo/alice-teachers



More information about the alice-teachers mailing list