wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Pseudocode Input

Total questions: 10

Worksheet time: 4mins

Name
Class
Date
1.

We need variables to:

a)

store and manipulate data.

b)

store data.

c)

manipulate data.

d)

make fun of students.

2.

We need to give a variable a name so we can...

a)

assign and retrieve values from memory.

b)

be cool.

c)

read code.

d)

know what we're doing.

3.

Which of the following correctly creates a variable?

a)

DECLARE INTEGER AS x

b)

DECLARE INT x

c)

DECLARE non_binary AS BOOLEAN

d)

DIM string As STRIN

4.

Which of the following correctly creates a variable?

a)

DIM age AS x

b)

DECLARE age AS INTEGER

c)

DECLARE CORRECT AS string

d)

INPUT user's full name

5.

What does the following pseudocode snippet do?


DECLARE car AS STRING

a)

It creates a character variable named car.

b)

Creates a new car object.

c)

Nothing

d)

It creates an address in memory which is referenced by the label car.

6.

What does the following pseudocode snippet do?


car <- "Honda"

a)

Assigns car to Honda.

b)

Assigns a string value to car.

c)

Assigns an integer value to car.

d)

Nothing.

7.

Which of the following correctly assigns a value to an integer variable?

a)

STORE '5' IN x

b)

STORE 5 IN x

c)

INPUT x IN '5'

d)

STORE x IN 5

8.

Which of the following snippets might read and store user input?

a)

DECLARE name AS STRING

OUTPUT “Please enter your name.”

b)

DECLARE name AS STRING

INPUT “Please enter your name.”

c)

DECLARE name AS INTEGER

STORE user’s full name IN name

d)

DECLARE name AS STRING

STORE user’s full name IN name

9.

What is a CHAR datatype?

a)

A datatype that can hold any single character.

b)

A datatype that can hold only numbers.

c)

A datatype that can be ignored.

d)

A datatype that can fit 7.

10.

What is a STRING datatype?

a)

It can store a sequence of numbers.

b)

It can store a sequence of characters.

c)

It can store a sequence of letters.

d)

All of the above.