Coding Quiz
Level 5, 2026-12-01
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(Q): A = false if Q > 6: A = true return A
def isFool(X): VAR = false if X < 3: VAR = true return VAR
VAR = 4 Print(VAR) if isCool(VAR): Print("!") elif isFool(VAR): Print("?") else: Z=0
| [2]
|
|
def DoSum(A,Z) B=A + Z return B
DoSum(7,3) Print("B")
| [1]
|
|
F=3 for VAR in range(5): F = F * VAR
Print(F)
| [1]
|
|
Z=False X=False if Z != False: Print(1) elif X != True: Print(2) else: Print(3)
| [1]
|
|
Y = "D" Y = "G" A = 5 B = 7 if Y<Y: Print(1) elif B<A: Print(2) elif B>A: Print(3) else: Print(4)
| [1]
|
|
def makeString(E,VAR): A=0 Q="" while A < VAR A = A + 1 Q = Q + E return E
X = makeString("g",7) X = X + makeString("g",2) Print(X)
| [2]
|
|
X=0 B=1 while (X<3): X=X+1 B=B*X Print(B)
| [1]
|
|
|
A=9 for VAR in range(3): A = A - VAR A = A - 2
Print(A)
| [2]
|
|
|
Y = 8 F = 4 if Y == 3: Print("1") if F != 8: Print("2") else: Print("3") elif Y <= 4: Print("4") if F == 5: Print("5") else: Print("6") else: Print("7") if F > 6: Print("8") else: Print("9")
| [2]
|
|
A="8" VAR="c" Print(A+VAR)
| [1]
|
|
X=False F=True if X == False: Print(1) elif F == True: Print(2) else: Print(3)
| [1]
|
|
def Hello(Z,type) if (type=="good"): Y="Hi " elif (type=="bad"): Y="Boo " else: Y="Bye" Print(Y+" "+Z)
Hello("Octavian","bad")
| [1]
|
|
def Hello(VAR,type) if (type=="good"): X="Hi " else: X="Bye" Print(X+" "+VAR)
Hello("Melissa","good")
| [1]
|
|
|
|