Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

express part2 little coder

Total questions: 17

Worksheet time: 9mins

Name
Class
Date
1.

What does a while loop do?

a)

Runs once only

b)

Repeats until a condition is false

c)

Runs without stopping forever

d)

Runs a fixed number of times

2.

Which of these is the best example of a while loop?
ماهو افضل مثال ل while loop

a)

Keep moving forward while the path is clear

b)

Move forward 5 times

c)

Turn right after moving

d)

Click to move a sprite

3.

If the condition in a while loop is never true, what happens?
اذا لم يتحقق الشرط في while loop ماذا يحدث

a)

The loop runs forever
البرنامج يتكرر باستمرار

b)

The loop never runs
الكود لن ينفذ

c)

The sprite disappears
الشخصيه تختفي

4.

What does an until loop do?
ما وظيفه ال until loop

a)

Stops immediately
يتوقف فجأه

b)

Repeats until a condition becomes true
التكرار المستمر لحين تحقق الشرط او الوصول للهدف

c)

Runs forever
التكرار المستمر دائما

d)

Runs only one time
يكرر مره واحده

5.

What is a sprite?

a)

A block of code
امر برمجي

b)

A character or object on the screen that can move and change
كائن او شخصيه

c)

A type of loop
نوع من انواع التكرار

d)

A kind of event
نوع من انواع الحدث

6.

Which of the following is an example of a sprite action?
اي من هذه الاختيارات تمثل احداث خاصه بالشخصيات

a)

Move 10 steps
يتحرك

b)

Say 'Hello!'
يتكلم

c)

Change color
تغيير اللون

d)

All of the above
كل ما سبق

7.

Why do programmers use sprites in games?
لماذا نستخدم الشخصيات في الالعاب

a)

To make programs more interactive and fun
لجعل البرنامج اكثر تفاعل ومرح

b)

To replace loops
للاستغناء عن التكرار

c)

To remove events
للاستغناء عن الاحداث

d)

To make code longer
لجعل الكود اطول

8.

What is an event?
ما هو الحدث

a)

A bug in your code
خطأ في الكود

b)

Something that makes the program react (like key press, mouse click)
شئ يجعل البرنامج اكثر تفاعلا كالضغط علي الماوس او الزر

c)

A loop that repeats
امر تكرار

d)

A sprite that moves
شخصيه يمكنها التحرك

9.

Which block is an event block?

a)

When up arrow pressed

b)

Repeat 10 times

c)

Move forward

d)

While path ahead

10.

Why are events important in games?

a)

They allow the player to control the game

b)

They make the game crash

c)

They stop the sprites from moving

d)

They add random colors

11.

If you want a sprite to jump when the space bar is pressed, you should:
عندما نريد ان تقفز الشخصيه عند الضغط عليspace ماذا نستخدم

a)

Put the code inside a while loop

b)

Use the event 'when space bar pressed'

c)

Use a repeat forever loop
استخدم التكرار المستمر

d)

Use a function with no events

12.

Which block would be best for: 'Keep moving until you reach the goal'?
"ما الامر الافضل ل "استمر في الحركه حتي تصل للهدف

a)

While loop

b)

Until loop

c)

Repeat 10 times

d)

When clicked

13.

What does an if condition do?

a)

a) Repeats code many times

b)

b) Checks if something is true, then runs the code inside

c)

c) Always runs no matter what

d)

d) Creates a new sprite

14.

What happens if the condition in an if block is false?

a)

a) The code inside the if block still runs

b)

b) The code inside the if block is skipped

c)

c) The computer stops the game

d)

d) The sprite disappears

15.

What does an if–else condition do?

a)

a) Runs the code only if the condition is true

b)

b) Chooses between two different sets of code: one if true, another if false

c)

c) Runs forever

d)

d) Creates a new sprite

16.

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) A while loop

b)

b) An until loop

c)

c) An if–else condition

d)

d) A forever loop

17.

If the condition in an if–else block is false, what happens?

a)

a) The “if” part runs

b)

b) The “else” part runs

c)

c) Both parts run

d)

d) Nothing happens