Coding Quiz
Level 2, 2026-06-02
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 DoSum(Q,A) Z=Q + A Print(Z)
DoSum(2,4)
| [1]
|
|
A=8 VAR=5 if A != VAR: Print("Yes") else: Print("No")
| [1]
|
|
|
B=3 Print(B)
def MyFunction (B): B=B+8 Print(B)
MyFunction(2) Print(B+6)
| [1]
|
|
|
VAR=7 Print(VAR)
def MyFunction (VAR): VAR=VAR+7 Print(VAR)
MyFunction(6) Print(VAR+7)
| [1]
|
|
Print("A") Print("B") Print("C")
| [1]
|
|
|
B=0 VAR="" while (B<3): B=B+1 VAR=VAR+"X" Print(VAR)
| [1]
|
|
def DoSum(X,A) Y=X - A return Y
DoSum(7,5) Print("Y")
| [1]
|
|
def Hello(Z) Q="Hi " + Z Print(Q)
Hello("Felix")
| [1]
|
|
if False: Print(1) elif False: Print(2) else: Print(3)
| [1]
|
|
def DoSum(A,Z) F=A * Z return F
DoSum(2,8) Print(F)
| [1]
|
|
def Hello(Q) VAR="Hi " + Q Print(VAR)
Hello("Julie")
| [1]
|
|
|
def DoSum(E,Q) F=E - Q return F
F=DoSum(7,9) Print(F)
| [1]
|
|
def DoSum(E,X) B=E - X return B
Z=DoSum(7,3) Print(Z)
| [1]
|
|
F=7 if F <= 4: Print("Yes") else: Print("No")
| [1]
|
|
def Hello(A,type) if (!A) return if (type=="good"): F="Hi " elif (type=="bad"): F="Boo " else: F="Bye" return F + " " + A
B = Hello("good","Mongo") Print(B)
| [1]
|
|
|
|