Coding Quiz
Level 5, 2026-03-25
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 doThis(X): Q=X * 5 return Q
def doThat(F): A=F + 5 return A
E = doThat(2) E = doThis(E) Print(E)
| [2]
|
|
VAR = 9 B = 7 if VAR == 7: Print("1") if B < 5: Print("2") else: Print("3") elif VAR <= 9: Print("4") if B != 9: Print("5") else: Print("6") else: Print("7") if B <= 4: Print("8") else: Print("9")
| [2]
|
|
def doThis(Z): E=Z + 3 E = doThat(E) return E
def doThat(Q): F=Q + 2 return F
B = doThis(6) B = doThis(B) Print(B)
| [2]
|
|
def Hello(F,type) if (type=="good"): A="Hi " elif (type=="bad"): A="Boo " else: A="Bye" Print(A+" "+F)
Hello("Melissa","ok")
| [1]
|
|
Print("A") #Print("B") #Print("C")
| [1]
|
|
VAR="3" A="D" Print(VAR+A)
| [1]
|
|
def DoSum(A,Y) Z=A * Y return Z
DoSum(2,1) Print("Z")
| [1]
|
|
#Print("A") Print("B") Print("C")
| [1]
|
|
for Y in [ 4,"d","a" ]: Print(Y)
| [1]
|
|
for Y in [ "b","b","c" ]: if (Y > "b"): Print(Y)
| [1]
|
|
def makeString(F,F): Y=0 E="" while Y < F Y = Y + 1 E = E + F return F
Q = makeString("e",8) Q = Q + makeString("D",2) Print(Q)
| [2]
|
|
|
def DoSum(A,Y) B=A * Y Print(B)
DoSum(7,9)
| [1]
|
|
|
def Hello(E,type) if (!E) return if (type=="good"): X="Hi " elif (type=="bad"): X="Boo " else: X="Bye" return X + " " + E
X = Hello("good","Missy") Print(X)
| [1]
|
|
F=0 VAR=0 while (F<1): F=F+1 VAR=VAR+7 Print(F+","+VAR)
| [1]
|
|
|