CS Discoveries - Unit 3 Lesson 12

Link to the project or level: [replace with link to the curriculum or get the “Share” link to a project [Game Lab - Code.org]

What I expect to happen: [The student was trying to set a random interval for the size of the moon, ranging from 0.5 to 1.5]
What actually happens: [The moon would only appear when the value was a whole number scale factor.]
What I’ve tried: [not sure what to try… when the students learned dot notation, they were able to scale sprites up or down using decimals]

The randomNumber block only uses integers, so it will choose either 1 or 2 every time.

You might want to reframe it to choose between 5 and 15 and then divide that result by 10 and use that result for your scaling.

Hope this helps, but check back in if not!

Mike

Thank you for the suggestion! That’s helpful.