Coding Quiz
Level 4, 2026-02-07
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 isCool(VAR): Y = false if VAR > 8: Y = true return Y
def isFool(X): Z = false if X < 6: Z = true return Z
E = 9 Print(E) if isCool(E): Print("!") elif isFool(E): Print("?") else: Z=0
| [2]
|
|
VAR = "A" Z = "!" E = 6 Z = 5 Y = Z+VAR Print(Y)
| [1]
|
|
def Hello(Z,type) if (type=="good"): VAR="Hi " else: VAR="Bye" Print(VAR+" "+Z)
Hello("Mike","good")
| [1]
|
|
Q=0 while (Q<3): Q=Q+1 Print("X")
| [1]
|
|
def doThis(Q): E=Q + 1 E = doThat(E) return E
def doThat(B): VAR=B * 4 return VAR
VAR = doThis(9) Print(VAR)
| [2]
|
|
def doThis(Q): Z=Q - 7 return Z
def doThat(X): Y=X * 4 return Y
A = doThis(2) A = doThat(A) Print(A)
| [2]
|
|
def Hello(B,type) if (!B) return if (type=="good"): Q="Hi " elif (type=="bad"): Q="Boo " else: Q="Bye" return Q + " " + B
B = Hello("","good") Print(B)
| [1]
|
|
def doThis(Q): Q=Q * 5 return Q
def doThat(A): Y=A - 5 return Y
Q = doThis(8) Q = doThat(Q) Print(Q)
| [2]
|
|
def DoSum(F,Q,Y) B=Y - Q - F Print(B)
DoSum(7,3,2)
| [1]
|
|
def makeString(Q,F): F=0 F="" while F < F F = F + 1 F = F + Q return Q
A = makeString("G",3) A = A + makeString("g",3) Print(A)
| [2]
|
|
B = "" X = "B" B = 3 E = 6 A = B+E Print(A)
| [1]
|
|
F = "B" B = "A" Q = 6 Z = 4 F = B+F Print(F)
| [1]
|
|
VAR="6" VAR="f" Print(VAR)
| [1]
|
|
def DoSum(VAR,Y) Q=VAR - Y return Q
DoSum(5,3) Print(Q)
| [1]
|
|
|
|