alice-teacher A number list is being filled with booleans

Donald Slater djslater107 at mac.com
Tue Jan 25 14:04:19 EST 2022


Carlos,
I am not sure where those boolean values are coming from. Perhaps run a loop before actually beginning the work in which all elements in the lists are initialized to 0 to start. (In there words do not rely on whatever initialization Alice does when you set up the list.)

Then as you are watching the variables, slow things down by putting a wait statement after each statement that updates the list so that you can see exactly what is going on.

Please keep us posted and let us know if you have any questions.

All the best,
Don Slater

Alice Project


> On Jan 25, 2022, at 11:33 AM, Carlos Bovell via alice-teachers <alice-teachers at lists.andrew.cmu.edu> wrote:
> 
> Hi,
> 
> We have a project where I'm asking the students to make change and output how many 20s, how many 10s, etc will be needed to make the change. A student is trying to fill a number list with the quotients and getting some weird results that gets in the way of his being able to use the quotients elsewhere in his project. This is what we see when we "watch the variables" (see below). Note that two of the elements in the list appear as booleans. Could that be what is causing elsewhere later on when he tries to use these values as numbers?
> 
> Thanks for taking my question.
> 
> Carlos Bovell
> Northern Burlington High School
> 
> <image.png>
> _______________________________________________
> alice-teachers mailing list
> alice-teachers at lists.andrew.cmu.edu <mailto:alice-teachers at lists.andrew.cmu.edu>
> To change settings or unsubscribe visit:
> https://lists.andrew.cmu.edu/mailman/listinfo/alice-teachers <https://lists.andrew.cmu.edu/mailman/listinfo/alice-teachers>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.andrew.cmu.edu/pipermail/alice-teachers/attachments/20220125/638dd752/attachment.html>


More information about the alice-teachers mailing list