from datetime import datetime def password(p): a = datetime.now() if not p.isdigit(): return "Please, don't print letters.\nReset the program." return "ACCESS CONFIRMED" if p == f"{a.hour}{a.minute}" else "ACCESS DENIED" # Outside the codewar you can use the lines below. # b = input("Please, print the password here (without letters!): ") # print(password(b))
- from datetime import datetime
- def password(p):
- a = datetime.now()
c = str(a.hour) + str(a.minute)if p.isdigit():if(p == c):return("ACCESS CONFIRMED")else:return("ACCESS DENIED")else:return("Please, don't print letters.Reset the program.")- if not p.isdigit():
- return "Please, don't print letters.
- Reset the program."
- return "ACCESS CONFIRMED" if p == f"{a.hour}{a.minute}" else "ACCESS DENIED"
- # Outside the codewar you can use the lines below.
- # b = input("Please, print the password here (without letters!): ")
- # print(password(b))