Coding Quiz
Level 2, 2024-11-25
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
Q=False B=False if Q != True: Print(1) elif B == True: Print(2) else: Print(3)
| [1]
|
|
def DoSum(Q,Z) Y=Q - Z return Y
DoSum(6,1) Print(Y)
| [1]
|
|
|
|
|
|
def DoSum(A,B,Z) Y=A * B + Z Print(Y)
DoSum(3,8,9)
| [1]
|
|
|
|
|
if (False and True): Print(1) elif (False or True): Print(2) else: Print(3)
| [1]
|
|
def Hello(B,type) if (type=="good"): F="Hi " else: F="Bye" Print(F+" "+B)
Hello("Max","good")
| [1]
|
|
def Hello(Z) Q="Hi " + Z Print(Q)
Hello("Felix")
| [1]
|
|
def Hello(E,type) if (type=="good"): Y="Hi " else: Y="Bye" Print(Y+" "+E)
Hello("Octavian","good")
| [1]
|
|
Q=False Y=False if Q == False: Print(1) elif Y == True: Print(2) else: Print(3)
| [1]
|
|
|
|
#Print("A") Print("B") #Print("C")
| [1]
|
|
|
def DoSum(Y,Q,F) Z=Y * Q + F Print(Z)
DoSum(1,2,7)
| [1]
|
|
|