Professional Documents
Culture Documents
Question 1
Three marks:
- Correct declaration (accept REAL and INTEGER)
- Input into a variable (comment only for missing prompt message)
- Output message (Correct message on the same line)
Sample Code:
DECLARE Height : REAL
INPUT Height
Sample code:
DECLARE Name : STRING
INPUT Name
INPUT Mark
Question 3
Four marks
- Correct declaration of two variables
- Correct input of both variables
- Correct output for the song name
- Correct output for the artist name
Sample code:
DECLARE Song : STRING
INPUT Song
INPUT Artist
Sample code
DECLARE Name : STRING
DECLARE HomeworkMark : INTEGER
DECLARE QuizMark : INTEGER
OUTPUT "Enter your name:"
INPUT Name
OUTPUT "Enter your homework mark:"
INPUT Mark
OUTPUT "Enter your quiz mark:"
INPUT QuizMark
OUTPUT "Hello ", Name
OUTPUT "Your homework mark is ", Mark
OUTPUT "Your quiz mark is ", QuizMark