You are viewing a single comment's thread. Return to all comments →
def eval_identifier(identifier): if len(identifier) != 10: raise Exception characters = {} digits = 0 uppercase = 0 for character in identifier: if not characters.get(character) and character.isalnum(): characters[character] = 1 if character.isdigit(): digits += 1 if character.isupper(): uppercase += 1 else: raise Exception if digits < 3 or uppercase < 2: raise Exception for _ in range(int(input())): try: eval_identifier(input()) print("Valid") except Exception: print("Invalid")
Seems like cookies are disabled on this browser, please enable them to open this website
Validating UID
You are viewing a single comment's thread. Return to all comments →