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