Worksheetsexpress part2 little coder
Total questions: 17
Worksheet time: 9mins
What does a while loop do?
Runs once only
Repeats until a condition is false
Runs without stopping forever
Runs a fixed number of times
Which of these is the best example of a while loop?
ماهو افضل مثال ل while loop
Keep moving forward while the path is clear
Move forward 5 times
Turn right after moving
Click to move a sprite
If the condition in a while loop is never true, what happens?
اذا لم يتحقق الشرط في while loop ماذا يحدث
The loop runs forever
البرنامج يتكرر باستمرار
The loop never runs
الكود لن ينفذ
The sprite disappears
الشخصيه تختفي
What does an until loop do?
ما وظيفه ال until loop
Stops immediately
يتوقف فجأه
Repeats until a condition becomes true
التكرار المستمر لحين تحقق الشرط او الوصول للهدف
Runs forever
التكرار المستمر دائما
Runs only one time
يكرر مره واحده
What is a sprite?
A block of code
امر برمجي
A character or object on the screen that can move and change
كائن او شخصيه
A type of loop
نوع من انواع التكرار
A kind of event
نوع من انواع الحدث
Which of the following is an example of a sprite action?
اي من هذه الاختيارات تمثل احداث خاصه بالشخصيات
Move 10 steps
يتحرك
Say 'Hello!'
يتكلم
Change color
تغيير اللون
All of the above
كل ما سبق
Why do programmers use sprites in games?
لماذا نستخدم الشخصيات في الالعاب
To make programs more interactive and fun
لجعل البرنامج اكثر تفاعل ومرح
To replace loops
للاستغناء عن التكرار
To remove events
للاستغناء عن الاحداث
To make code longer
لجعل الكود اطول
What is an event?
ما هو الحدث
A bug in your code
خطأ في الكود
Something that makes the program react (like key press, mouse click)
شئ يجعل البرنامج اكثر تفاعلا كالضغط علي الماوس او الزر
A loop that repeats
امر تكرار
A sprite that moves
شخصيه يمكنها التحرك
Which block is an event block?
When up arrow pressed
Repeat 10 times
Move forward
While path ahead
Why are events important in games?
They allow the player to control the game
They make the game crash
They stop the sprites from moving
They add random colors
If you want a sprite to jump when the space bar is pressed, you should:
عندما نريد ان تقفز الشخصيه عند الضغط عليspace ماذا نستخدم
Put the code inside a while loop
Use the event 'when space bar pressed'
Use a repeat forever loop
استخدم التكرار المستمر
Use a function with no events
Which block would be best for: 'Keep moving until you reach the goal'?
"ما الامر الافضل ل "استمر في الحركه حتي تصل للهدف
While loop
Until loop
Repeat 10 times
When clicked
What does an if condition do?
a) Repeats code many times
b) Checks if something is true, then runs the code inside
c) Always runs no matter what
d) Creates a new sprite
What happens if the condition in an if block is false?
a) The code inside the if block still runs
b) The code inside the if block is skipped
c) The computer stops the game
d) The sprite disappears
What does an if–else condition do?
a) Runs the code only if the condition is true
b) Chooses between two different sets of code: one if true, another if false
c) Runs forever
d) Creates a new sprite
If you want your sprite to say ‘Correct!’ when the answer is right, and ‘Try again!’ when it is wrong, what should you use?
a) A while loop
b) An until loop
c) An if–else condition
d) A forever loop
If the condition in an if–else block is false, what happens?
a) The “if” part runs
b) The “else” part runs
c) Both parts run
d) Nothing happens
