Acceptable Password I

def is_acceptable_password(password: str) -> bool:
if len(password)>6:
return True
else:
return False

if name == 'main':
print("Example:")
print(is_acceptable_password('short'))

# These "asserts" are used for self-checking and not for an auto-testing
assert is_acceptable_password('short') == False
assert is_acceptable_password('muchlonger') == True
assert is_acceptable_password('ashort') == False
print("Coding complete? Click 'Check' to earn cool rewards!")

좋은 웹페이지 즐겨찾기