Back to tasks
A safe with a mistake
BeginnerPython for kids 路 Lesson 29: Mistakes in ifs
Problem Statement
The safe should open only with the code 1234: the program prints OTWARTE (open) or ZAMKNIETE (closed). This program has a mistake - find it and submit the fixed version.
code_str = input()
code = int(code_str)
if code = 1234:
print("OTWARTE")
else:
print("ZAMKNIETE")
Input Format
One whole number - the code (0 <= code <= 9999).
Output Format
OTWARTE or ZAMKNIETE.
Examples
Example 1
Input
1234
Output
OTWARTE
Example 2
Input
1111
Output
ZAMKNIETE