Students will be able to:
Challenge Level: Beginner
This programming challenge is linked to the following lessons:
Create a program to display numbers 1, 2, 4, 8 and 16 on the screen, one at a time.
The output will always show the numbers 1, 2, 4, 8 and 16 (there is no input).
Click on the green flag to see the expected output of your program.
Click inside the block and type to change “Hello” to what you want to display on the screen. In this case, it will be ‘1’ for the first output, ‘2’ for the second, ‘4’ for the third and so on.
The number of seconds tells the output how long to show. The script waits that long before continuing.
Make sure all your blocks are “snapped” together in a line like a jigsaw puzzle.
Whenever you click the green flag, your script will start. To stop, click the stop button.
1 2 4 8 16
print()statement allows you to display text or values within the parentheses on the screen. For example:
100on the screen.
print()statement for each number you wish to display.
Display the numbers from largest to smallest (display numbers 16, 8, 4, 2 and 1).