pxt-calliope/docs/reference/js/lessons/snowflake-fall/quiz-answer.md
2016-03-25 16:47:20 -07:00

1.4 KiB

snowflake fall quiz answers

create a snowflake fall animation #animation#forever #docs

Name

Directions

Use this activity document to guide your work in the snowflake fall tutorial.

Answer the questions while completing the tutorial. Pay attention to the dialogues!

1. In reference to an animation, what is an "interval"?

The number of milliseconds to pause after each image frame.

2. Consider the following code

basic.showAnimation(`
. . . . .
. . # . .
. # # # .
. . # . .
. . . . .
`, 400)

What is the interval of the animation?

400

3. Consider the following image

Write the code to create a forever loop that shows an animation. Change the interval from 400 to 200 to make the animation go twice as fast!

basic.forever(() => {
    basic.showAnimation(`
. . . . . . . . . .
. . # . . . . . . .
. # # # . . . . . .
. . # . . . . . . .
. . . . . . . . . .
`, 200)
})

4. Consider the following images

Write the code to create a forever loop that shows an animation. Change the interval from 400 to 800 to make the animation go twice as slow!

basic.forever(() => {
    basic.showAnimation(`
. . . . . # # # # #
. . # . . # # . # #
. # # # . # . # . #
. . # . . # # . # #
. . . . . # # # # #
`, 800)
})