Your browser is not supported. Please upgrade your browser to one of our supported browsers. You can try viewing the page, but expect functionality to be broken.
CS in Algebra curriculum and content is being deprecated. Within the next few months, this lab will no longer be available. Please check out Bootstrap: Algebra instead. Learn More.
Hour of Code | Dance Party: Measures
I'm Aloe Blacc. I'm a singer, songwriter, and entertainer. I think computer science is really important to learn because computer science is the future, and I think it's important for people to be in control of the technology that is literally controlling their lives.
The event we’re going to use now will listen for a change in the song. That change will trigger you dancer to do a new dance.
Professional dancers practice their choreography by counting the beats of the song. In music, a measure refers to a certain number of beats. In most popular songs, a measure is four beats long.
To get your dancers to let loose, you'll need a green event block. This event block says, "after 4 measures".
If you drag out a purple "do forever" block, you can pick a dance for your dancer to do. Because it's under the "after 4 measures" event block, your dancer will wait for four measures of the song before starting their dance.
Keep an eye on the measure counter at the top of the display area.
Look and listen for the event that will trigger the dance code. And right on cue, our dancer starts going.