perfectly written code not being performed correctly on chrome books.

16 views
Skip to first unread message

vgul...@forteprep.org

unread,
Jan 25, 2019, 6:48:23 PM1/25/19
to Bootstrap-Teachers
Question:
My students are working on chrome books.
One students typed in code to produce a simple triangle.  His code was perfect, I double and triple checked it.  But an error message came up.  I wish I had snapped a picture of it.  It said something like "triangle" was unsupported or unbound.

All of the students were able to get theirs to work.  He even tried another computer.  All students need to log into the chrome books with a QR code sheet.  He tried two different computers, and it was not able to work.  Does it have to do with the fact that the file saved in his google drive account (that follows him around from jump because he signs in with a QR code)  is corrupt or something?  I hit run a bunch of times; wrote and re-wrote the line of code a few times. I made sure he was using the right starter file....

Any thoughts?

Schanzer (Director)

unread,
Jan 26, 2019, 7:23:34 AM1/26/19
to Bootstrap-Teachers
Hi Vania - it's highly unlikely that the file was corrupt. If it was, it wouldn't have loaded. I assume he was using the shape starter file, from Unit 1 of Data Science?

Without seeing the code, there's really no way to tell whether or not the code was correct, but I suspect there are two things that could have gone wrong:

1) In the definitions area on the left, did he have include image at the top of the file? This line is what imports all the image functions, and without it the triangle function would surely have been unbound. (If he was using the shapes starter file, then he should be all set here.)
2) Had he clicked "Run"? Remember that the computer only reads the definitions area after Run is clicked, so even if your student had the image library included he would have had to click Run in order to use it. You can test this for yourself by loading the starter file, not clicking run, and then typing triangle(50, "solid", "red") into the Interactions area.

The lesson here is that things are interconnected: the libraries included on the left will impact how code behaves on the right, and even if all the code on the left looks perfect it still has to be Run to ensure the stuff on the right functions correctly. I hope this is helpful - let us know if your student gets it working!
Reply all
Reply to author
Forward
0 new messages