I would like to give some feedback about ...
From: http://www.checkio.org/mission/house-password/solve/
Hi,
The site won't allow my code to pass even though it passes in the 'try it' and in python visualiser.
HTTP\_USER\_AGENT:
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36
My Code:
def checkio(data):
isdigit = False
isupper = False
if len(data)>10:
for ch in data:
if ch.isdigit():
isdigit=True
if ch.isupper():
isupper = True
if isdigit == True and isupper == True:
return True
else:
return False
#replace this for solution
#Some hints
#Just check all conditions
if __name__ == '__main__':
#These "asserts" using only for self-checking and not necessary for auto-testing
assert checkio('A1213pokl') == False, "1st example"
assert checkio('bAse730onE4') == True, "2nd example"
assert checkio('asasasasasasasaas') == False, "3rd example"
assert checkio('QWERTYqwerty') == False, "4th example"
assert checkio('123456123456') == False, "5th example"
assert checkio('QwErTy911poqqqq') == True, "6th example"
Created at: 2014/07/04 10:00; Updated at: 2014/07/17 12:47