The problem with your code is when it takes input, b is always string(if you give input as 12, it will store as '12' in b it's a string always). So first you need to convert b into int and then make a boolean condition on it's data type.
Here is the correct code for you.
from datetime import datetime
a = datetime.now()
c = str(a.hour) + str(a.minute)
b = input("Please, print the password here (without letters!):")
try:
if type(int(b)) is int:
if(b == c):
print("ACCESS CONFIRMED")
else:
print("ACCESS DENIED")
except:
print("Please, don't print letters.")
print("Reset the program.")
It seems that the codewar does not accept direct inputs into the code.
It is necessary to make a function and use the Test Cases to check it out.
The problem with your code is when it takes input, b is always string(if you give input as 12, it will store as '12' in b it's a string always). So first you need to convert b into int and then make a boolean condition on it's data type.
Here is the correct code for you.
from datetime import datetime
a = datetime.now()
c = str(a.hour) + str(a.minute)
b = input("Please, print the password here (without letters!):")
try:
if type(int(b)) is int:
if(b == c):
print("ACCESS CONFIRMED")
else:
print("ACCESS DENIED")
except:
print("Please, don't print letters.")
print("Reset the program.")