wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Calculator in Scratch Code

Total questions: 14

Worksheet time: 7mins

Name
Class
Date
1.

In the Scratch math quiz, which block starts the program when clicked?

a)

when green flag clicked

b)

when space key pressed

c)

when sprite clicked

d)

when backdrop switches to city

2.

What is the purpose of setting the variable score to 0 at the start of the program?

a)

It initializes the score so the quiz begins at zero.

b)

It randomly chooses the first question.

c)

It resets the sprite's position on the stage.

d)

It selects the arithmetic operator.

3.

The variable problemsAttempted is set to 0 at the beginning. What does this track?

a)

How many questions the player has tried

b)

How many correct answers the player has

c)

Which operator is currently used

d)

The time remaining in the quiz

4.

Which blocks choose the two random numbers used in each math question?

a)

set [number1] to pick random 1 to 10 and set [number2] to pick random 1 to 10

b)

set [score] to pick random 1 to 10 and set [operator] to pick random 1 to 2

c)

set [answer] to join number1 operator number2 and set [useAnswer] to answer

d)

set [problemsAttempted] to pick random 1 to 10 and set [wait] to pick random 1 to 2

5.

What does the variable operator store in this quiz?

a)

A random choice between addition and subtraction

b)

The number of questions attempted

c)

The player's typed answer string

d)

The product of number1 and number2

6.

According to the comments, what does operator=1 represent and operator=2 represent?

a)

1 means addition (+); 2 means subtraction (−)

b)

1 means subtraction (−); 2 means addition (+)

c)

1 means multiplication (×); 2 means division (÷)

d)

1 means division (÷); 2 means multiplication (×)

7.

Which block asks the player the math question and waits for input?

a)

ask [join number1 operatorSymbol number2] and wait

b)

say [That's Correct!] for 2 seconds

c)

set [score] to 1

d)

broadcast [new question]

8.

What does useAnswer store after the 'ask ... and wait' block runs?

a)

The player's typed answer from the answer box

b)

The correct computed result of the problem

c)

The chosen operator symbol

d)

The current score value

9.

How is the correct answer computed before checking the user's input?

a)

Using a variable correctAnswer that equals number1 ± number2 based on operator

b)

By reading the answer bubble from the sprite

c)

By multiplying score by problemsAttempted

d)

By converting the operator into text only

10.

Which conditional structure is used to decide whether the user's answer is correct or incorrect?

a)

if then … else …

b)

repeat until

c)

wait until 0>

d)

forever if

11.

What happens to the score when the player answers correctly?

a)

change score by 1

b)

set score to 0

c)

change problemsAttempted by −1

d)

set number1 to score

12.

What feedback does the program give when the answer is incorrect?

a)

It says 'Oops! That's incorrect! The correct answer is [correctAnswer]'

b)

It restarts the program automatically

c)

It hides the sprite and stops all scripts

d)

It adds 2 points to the score

13.

Which loop structure keeps generating new math questions continuously?

a)

forever

b)

repeat 10

c)

repeat until

d)

wait until 5>

14.

Which string-building technique is used to display 'number1 operatorSymbol number2' in the ask prompt?

a)

join block concatenates number1, operatorSymbol, and number2

b)

broadcast block merges the variables automatically

c)

add block calculates the sum and shows it

d)

glide block moves the sprite while showing text