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