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