0% found this document useful (0 votes)
30 views3 pages

Test 3

Uploaded by

Amjad Hussain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views3 pages

Test 3

Uploaded by

Amjad Hussain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

• What is a variable in programming?

a) A fixed data value


b) A data value that can change
c) A part of the computer hardware
d) A sequence of instructions

• What is the purpose of using a variable?


a) To display information only
b) To store and manipulate data in a program
c) To control the hardware of a computer
d) To terminate a program

• Which programming block is used to set the value of a variable in Scratch?


a) Control
b) Operators
c) Set
d) Looks

• What happens when a variable's value is changed in a program?


a) The program crashes
b) The program ignores the change
c) The program uses the updated value
d) The program restarts

• What does the “Ask” block in Scratch do?


a) Outputs a sound
b) Moves a sprite
c) Collects user input
d) Stops the program

• What type of loop repeats a fixed number of times?


a) Conditional loop
b) Infinite loop
c) Counter loop
d) Variable loop

• Which block would you use to repeat an action until a condition is met?
a) Forever
b) Repeat until
c) Wait
d) Broadcast

• What is the purpose of the “If” block in Scratch?


a) To store data
b) To add visuals
c) To make decisions
d) To create loops

• What is the outcome of a logical test that compares two equal numbers?
a) True
b) False
c) Error
d) Loop

• How do you display the value of a variable on the stage in Scratch?


a) By using the “Show Variable” option
b) By using the “Hide Variable” option
c) By using the “Forever” block
d) By creating a new sprite

• What is the purpose of the "Repeat Until" block in Scratch?


a) To loop forever
b) To repeat actions a fixed number of times
c) To repeat actions until a condition is true
d) To stop all actions

• Which operator is used to add two values in Scratch?


a) Multiply
b) Divide
c) Plus
d) Subtract

• What does the "Join" block do in Scratch?


a) Combines two strings of text
b) Adds two numbers
c) Connects two sprites
d) Links two projects

• How many times will a loop execute if the counter is set to 10?
a) 9
b) 10
c) Infinite
d) Until a condition is met

• What is the starting event for most Scratch programs?


a) Green flag clicked
b) Space key pressed
c) Variable set to 0
d) When the sprite moves
• What happens if a condition in a conditional loop is never met?
a) The program terminates
b) The loop executes indefinitely
c) The program skips the loop
d) The loop runs once

• What is stored in the “Answer” block in Scratch?


a) The last user input
b) A fixed value
c) A sprite’s position
d) The program’s name

• Which Scratch block allows a sprite to move to a random position?


a) Go to random position
b) Move 10 steps
c) Turn 15 degrees
d) Forever

• What is the benefit of using variables in a program?


a) Simplifies program logic
b) Increases program size
c) Reduces program speed
d) Eliminates the need for user input

• What will the following code do? "Set variable X to 5, then change X by 3."
a) X becomes 8
b) X remains 5
c) X becomes 3
d) X becomes 15

You might also like