Untitled
unknown
plain_text
8 months ago
456 B
5
Indexable
import random
import string
def generate_captcha(length=6):
characters = string.ascii_letters + string.digits
captcha = ''.join(random.choice(characters) for _ in range(length))
return captcha
captcha = generate_captcha()
print(f"Your CAPTCHA is: {captcha}")
user_input = input("Enter the CAPTCHA: ")
if user_input == captcha:
print("CAPTCHA verification successful!")
else:
print("CAPTCHA verification failed.")
Editor is loading...
Leave a Comment