You are viewing a single comment's thread. Return to all comments →
python
def minimumNumber(n, p): add = 0 count_up = 0 count_low = 0 count_num = 0 count_sp = 0 for i in p: if i.islower(): count_low = 1 elif i.isupper(): count_up = 1 elif i.isdigit(): count_num = 1 elif i in "!@#$%^&*()-+": count_sp = 1 add = 4 - (count_low + count_up + count_num + count_sp) if n + add return add + (6 - (n + add)) else: return add![](https://)
Seems like cookies are disabled on this browser, please enable them to open this website
Strong Password
You are viewing a single comment's thread. Return to all comments →
python