Advertisement
fkudinov

5. Acceptable Password / Вирішуємо задачі на Python CheckIO Українською

Dec 7th, 2023
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.92 KB | Source Code | 0 0
  1.  
  2. def is_acceptable_password(password: str) -> bool:
  3.     return True
  4.  
  5.  
  6. if __name__ == '__main__':
  7.     print("Example:")
  8.     print(is_acceptable_password('short'))
  9.  
  10.     # These "asserts" are used for self-checking and not for an auto-testing
  11.     assert is_acceptable_password('short') == False
  12.     assert is_acceptable_password('short54') == True
  13.     assert is_acceptable_password('muchlonger') == True
  14.     assert is_acceptable_password('ashort') == False
  15.     assert is_acceptable_password('muchlonger5') == True
  16.     assert is_acceptable_password('sh5') == False
  17.     assert is_acceptable_password('1234567') == False
  18.     assert is_acceptable_password('12345678910') == True
  19.     assert is_acceptable_password('password12345') == False
  20.     assert is_acceptable_password('PASSWORD12345') == False
  21.     assert is_acceptable_password('pass1234word') == True
  22.     print("Coding complete? Click 'Check' to earn cool rewards!")
  23.  
Tags: checkio
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement