MacSG

Template Lab13_3

Apr 29th, 2015
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.41 KB | None | 0 0
  1. st = input("Enter a string: ")
  2.  
  3. #Case check, initial all to False
  4. case_len = False
  5. case_num = False
  6. case_upper = False
  7.  
  8.  
  9. #Change case check to True
  10. if len(st)>8:
  11.     case_len = True
  12. for i in st:
  13.     if i.isnumeric():
  14.         case_num = True
  15.     if i.isupper():
  16.         case_upper = True
  17.  
  18.  
  19. #If all cases are True, Pass
  20. if case_num and case_len and case_upper:
  21.     print("Yes")
  22. else:
  23.     print("No")
Advertisement
Add Comment
Please, Sign In to add comment