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 | |
|---|---|---|
| 1UCASE("Happy") | AUCASE makes Answer all capitals, so it can never equal the lower case text "yes". The comparison is always false. It should be "YES". | |
| 2LCASE('W') | BReturns the character 'w' in lower case | |
| 3Make sure an answer typed as "yes", "Yes" or "YES" is treated the same by converting it to upper case before comparing | CThe argument must be inside brackets after the function name. It should be LCASE('K'). | |
| 4Store a copy of the user's name in lower case so that it can be compared without worrying about capital letters | DIF UCASE(Answer) = "YES" THEN | |
| 5IF UCASE(Answer) = "yes" THEN | ELowerName ← LCASE(Name) | |
| 6Letter ← LCASE 'K' | FReturns the string "HAPPY" with every letter in upper case |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
UCASE(x) and LCASE(x) — UCASE returns a string or character in upper case, e.g. UCASE("Happy") gives "HAPPY". LCASE returns it in lower case, e.g. LCASE('W') gives 'w'.OUTPUT UCASE("Happy")OUTPUT LCASE('W')INPUT Answer
Shout ← UCASE(Answer)
OUTPUT ShoutINPUT Answer
Match ← UCASE(Answer) = "YES"
OUTPUT MatchDECLARE Letter : CHAR
Letter ← LCASE('W')
OUTPUT Letter