Sequences and Loops
שאלות 10
מפתח התשובות מוצג למורים מחוברים.
-
Order of blocks
A robot must draw a square. Which order of block commands makes the robot draw a square correctly?
Turn right, move forward, move forward, turn right
Move forward, move forward, move forward, move forward
Move forward, turn right, move forward, turn right, move forward, turn right, move forward, turn right
Turn right, turn right, move forward, move forward
A square has four sides and four corners. Think about what the robot does at each side before turning. -
What is a sequence?
In block-based coding, what does it mean when blocks run in a sequence?
The blocks run at the same time, all together
The blocks run only when the user clicks each one
The blocks run one after another, from top to bottom
The blocks run in random order chosen by the computer
Think about how you read a list of instructions on a page. -
Repeat block purpose
Why would a programmer use a repeat block instead of copying the same move block many times?
It makes the computer run faster by skipping steps
It removes the need for any sequence of blocks
It makes the code shorter and easier to change
It stops the program from ever having errors
Imagine writing the same instruction ten times versus writing it once with a number. -
-
Finding a bug
A program should make a cat walk to the edge of the screen, but the cat stops too early. Which kind of problem is this?
A broken computer screen
A missing sound file
A logic or sequence error in the blocks
A problem with the internet connection
Look at the blocks in the program and ask whether they are in the right order or have the right numbers. -
-
Forever loop
What happens when a forever block contains a move block and nothing else is added to stop it?
The move block is removed from the program automatically
The move block runs exactly once and then the program ends
The computer changes the block into a sound block
The move block keeps running again and again until the program is stopped
A forever loop has no number on it, so it does not have a set end. -
Testing a program
Which step is the best way to test whether a block program works as planned?
Delete the last block and never run the program again
Run the program and watch what each block does, comparing it to the plan
Guess the answer without running the program
Change the color of every block before running it
Think about how you can check if the program does what you wanted it to do. -
-
Order matters
A program has the blocks: say Hello, then wait 2 seconds, then move 50 steps. Later the same blocks are placed as: move 50 steps, then say Hello, then wait 2 seconds. What is true about the two programs?
The first program is always faster than the second
The second program cannot run because the order is wrong
They can behave differently because the order of the blocks is different
They always behave exactly the same because the same blocks are used
In a sequence, the computer follows the blocks in the order they appear, from top to bottom.
פרטים
- מקצועות
- מדעי המחשב
- תגיות
- נוסף על ידי AI block coding נוסף על ידי AI repeat loops נוסף על ידי AI debugging נוסף על ידי AI sequences נוסף על ידי AI forever loop
- קהל יעד
- בית ספר יסודי · כיתות ב׳–ד׳
- רמת קושי
- 2 מתוך 10
- שפה
- אנגלית
- מי יכול לראות
- כולם
- הושלם על ידי AI
- מה שמסומן בניצוץ נוסף על ידי AI.
- נוצר באמצעות AI
- Claude Haiku 5.5
- נוצר
תגובות