Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
Shade in the A or B circle for each question.
Draw a line connecting each item on the left to its match on the right.
| Left column | Right column | |
|---|---|---|
| 1DECLARE Name : STRING | ACode ← "123" | |
| 2Text ← "" | BCreates a variable that can store text made of zero or more characters | |
| 3A STRING literal is written between double quotes | CGreeting ← "Hello, Sam" | |
| 4Digits inside double quotes are text, not a number, so they are a STRING | DStores the empty string, which has zero characters, in Text | |
| 5Name ← Sam | E"1234" is a STRING because of the double quotes, so it cannot be assigned to an INTEGER variable. Declare Pin as STRING or assign 1234. | |
| 6DECLARE Pin : INTEGER Pin ← "1234" | FThe text has no double quotes, so it is not a STRING literal. It should be Name ← "Sam". |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
STRING — The data type for text: zero or more characters written between double quotes, such as "This is a string". "" is the empty string and "123" is text, not a number.DECLARE UserName : STRINGDECLARE Message : STRING
Message ← ""DECLARE PhoneNumber : STRING
PhoneNumber ← "0123456789"DECLARE Word : STRING
Word ← "A"DECLARE Reply : STRING
Reply ← "123"