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