Hello, I have following code that works as "solution" of the task, but it's failing 3rd example assertion. I don't know why...
def checkio(data):
if len(data) >= 10:
has_digit, has_upper, has_lower = (False, False, False)
for char in data:
if char.isdigit():
has_digit = True
if char.isupper():
has_upper = True
if char.islower():
has_lower = True
if has_digit and has_upper and has_lower:
return True
else:
return False
Traceback (most recent call last):
File "D:\Barbara\home_house-password.py", line 22, in <module>
assert checkio('asasasasasasasaas') == False, "3rd example"
AssertionError: 3rd example
Created at: 2015/03/28 09:22; Updated at: 2015/04/20 13:51