Coding Quiz
Level 5, 2026-10-20
All code is in Python. Operations with strings and numbers are not allowed. Ordering of string characters: !,A,1,a (meaning 'A' < 'a').
Special Symbols: Blank: Space: Error: E
def makeString(A,Z): A=0 A="" while A < Z A = A + 1 A = A + A return A
VAR = makeString("a",5) VAR = VAR + makeString("E",3) Print(VAR)
| [2]
|
|
|
def makeString(Y,F): F=0 Q="" while F < F F = F + 1 Q = Q + Y return Y
Y = makeString("d",3) Y = Y + makeString("a",7) Print(Y)
| [2]
|
|
F=0 B=0 while (F<4): F=F+1 B=B+5 Print(F+","+B)
| [1]
|
|
Z = "!" B = "A" Z = 5 F = 7 VAR = B+Z Print(VAR)
| [1]
|
|
def doThis(B): X=B + 8 return X
def doThat(E): A=E + 8 return A
A = doThat(9) A = doThis(A) Print(A)
| [2]
|
|
|
X=2 for A in range(3): for Z in range(2): X = X + A
Print(X)
| [2]
|
|
def Hello(VAR,type) if (type=="good"): F="Hi " else: F="Bye" Print(F+" "+VAR)
Hello("Missy","good")
| [1]
|
|
Z="a" B="a" Print("Z"+B)
| [1]
|
|
|
for VAR in [ "b",4,2 ]: if (VAR >= 4): Print(VAR)
| [1]
|
|
if False: Print(1) elif False: Print(2) else: Print(3)
| [1]
|
|
def DoSum(Z,A) F=Z * A Print(F)
DoSum(4,8)
| [1]
|
|
Z = "B" Q = "!" Y = 5 VAR = 6 Q = Y+Y Print(Q)
| [1]
|
|
|
|