What keyword begins and closes a pseudocode program?
START, END
Which data type stores True or False?
BOOLEAN
Write a statement to display: Hello
OUTPUT "Hello"
START
DECLARE name: STRING
INPUT name
OUTPUT "Hi," name
END
If user enters "Zoe", what is the output?
"Hi, Zoe"
Fix:
DECLARE name = STRING
DECLARE name : STRING
Term: Receives data from the user
INPUT
Which data type should be used to store number of students?
INTEGER
Write a statement to receive input into variable name
INPUT name
START
DECLARE name: STRING
INPUT name
OUTPUT "Morning, " name, ". How are you?"
END
If user enters "Caleb", what is the output?
"Morning, Caleb. How are you?"
Fix:
OUTPUT Hello
OUTPUT "Hello"
Term: Displays data to the user
OUTPUT
Which data type should be used to store temperature (eg: 37.9)?
REAL
Write a statement to display "Hi " and the variable name
OUTPUT "Hi " + name
START
DECLARE num: INTEGER
INPUT num
OUTPUT num + num + num
END
If input is 67, what is the output?
201
Find and fix TWO errors:
START
DECLARE age: STRING
INPUT "age"
END
START
DECLARE age:INTEGER
INPUT age
END
Term: A container used to store a value.
Variable
Which data type should be used to store name?
STRING
Write a statement to display the result of adding 2 to the variable number.
OUTPUT number + 2
START
DECLARE age : INTEGER
INPUT age
OUTPUT "You will be ", age + 5, " years old in five more years."
END
"You will be 25 years old in five more years."
Find and fix TWO errors:
START
DECLARE StudentID:STRING
INPUT "Enter your student ID:"
INPUT StudentID
OUTPUT "Your student ID is ", StudentID
END
START
DECLARE StudentID:STRING
OUTPUT "Enter your student ID:"
INPUT StudentID
OUTPUT "Your student ID is "+ StudentID
END
Term: Describes a variable (the name and datat type of a variable)
DECLARE
Which data type should be used to store gender (eg: 'M', 'F')?
CHAR
Write pseudocode to ask for age and store it.
You can assume that the variable age has been declared.
OUTPUT "Enter your age"
INPUT age
START
DECLARE mark: INTEGER
INPUT mark
OUTPUT "You scored " + marks
END
If user enters 100, what is the output?
Error.
Find and fix TWO errors:
START
DECLARE ICNumber:REAL
INPUT 1CNumber
OUTPUT "Your IC number is" + ICNumber
END
START
DECLARE ICNumber:STRING
INPUT ICNumber
OUTPUT "Your IC number is" + ICNumber
END