Advertisement
load-net

captcha

Nov 8th, 2023
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. import random
  2.  
  3. def cap():
  4. psw = "" # предварительно создаем переменную psw
  5. for x in range(20):
  6. psw = psw + random.choice(list('123456789qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM'))
  7. return psw
  8.  
  9. while True:
  10. a = cap()
  11. print(a)
  12. try_cap = input("Введите капчу >>> ")
  13. if try_cap == a:
  14. print("Добро пожаловать")
  15. break
  16. else:
  17. print("Вы допустили ошибку")
  18. print()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement