Font size
WorksheetsPseudocode Input
Total questions: 10
Worksheet time: 4mins
We need variables to:
store and manipulate data.
store data.
manipulate data.
make fun of students.
We need to give a variable a name so we can...
assign and retrieve values from memory.
be cool.
read code.
know what we're doing.
Which of the following correctly creates a variable?
DECLARE INTEGER AS x
DECLARE INT x
DECLARE non_binary AS BOOLEAN
DIM string As STRIN
Which of the following correctly creates a variable?
DIM age AS x
DECLARE age AS INTEGER
DECLARE CORRECT AS string
INPUT user's full name
What does the following pseudocode snippet do?
DECLARE car AS STRING
It creates a character variable named car.
Creates a new car object.
Nothing
It creates an address in memory which is referenced by the label car.
What does the following pseudocode snippet do?
car <- "Honda"
Assigns car to Honda.
Assigns a string value to car.
Assigns an integer value to car.
Nothing.
Which of the following correctly assigns a value to an integer variable?
STORE '5' IN x
STORE 5 IN x
INPUT x IN '5'
STORE x IN 5
Which of the following snippets might read and store user input?
DECLARE name AS STRING
OUTPUT “Please enter your name.”
DECLARE name AS STRING
INPUT “Please enter your name.”
DECLARE name AS INTEGER
STORE user’s full name IN name
DECLARE name AS STRING
STORE user’s full name IN name
What is a CHAR datatype?
A datatype that can hold any single character.
A datatype that can hold only numbers.
A datatype that can be ignored.
A datatype that can fit 7.
What is a STRING datatype?
It can store a sequence of numbers.
It can store a sequence of characters.
It can store a sequence of letters.
All of the above.
