NaN with Unit 6 Lesson 13 Puzzles 6-10

Link to the project or level: https://studio.code.org/projects/applab/xz4kj78R30xAWaGFxWqcYxk0yQzF845GLqvqdhxbDjM
What I expect to happen: I expect the accelerometer to return a value to the screen in the form of a number.
What is actually happening. My students are getting a return on NaN, not a number on the accelerometer readings. I do not. Our code is identical. I am working on a Windows or Mac and they are on Chromebooks. Could that be the issue?
What I’ve tried: We’ve tried refreshing, logging out and back in, switching Circuit Playgrounds and trying on a different Chromebook.
Thank you for your help.

Hi @koreen.corbett,

Hmmm…I tested on a Mac and on a Chromebook and did not get an error. It worked in Maker App on the Mac and in Chrome on the Chromebook. You can try updating Chrome? You may need to contact support if updating Chrome does not resolve the issue.

Michelle

Thank you so much for testing it. Based on your test, I figured there HAD to be something wrong in their code and I found it! They were using a var block, declaring the variable again, instead of the block without the var where they are calling up the variable. Yay! Thank you so much for your help!

1 Like