Question 1 of 3Difficulty ●●●●●
A gym gives each locker a 4-digit code, such as 0472. Codes are typed in and compared, but never used in calculations.
Which data type is most suitable for storing a locker code?
GCSE Computer Science practice questions on programming concepts. Try 3 for free below — with hints, the answer and why the wrong answers are tempting. GCSE Beast has 22 questions on this topic.
A gym gives each locker a 4-digit code, such as 0472. Codes are typed in and compared, but never used in calculations.
Which data type is most suitable for storing a locker code?
53 students go on a school trip. Each minibus has 12 seats. This pseudocode works out how many minibuses are completely full and how many students are left over.
Students ← 53Full ← DIV(Students, 12)Left ← MOD(Students, 12)OUTPUT Full, " ", LeftWhat is output?
A puzzle game has a grid of 3 rows and 4 columns. A coin is placed on every square where the remainder of (Row + Col) divided by 3 is 0. This pseudocode counts the coins.
Coins ← 0FOR Row ← 1 TO 3 FOR Col ← 1 TO 4 IF MOD(Row + Col, 3) = 0 THEN Coins ← Coins + 1 ENDIF NEXT ColNEXT RowOUTPUT CoinsWhat is output?