diff --git a/C/.gitignore b/C/.gitignore index d6b7ef3..f935021 100644 --- a/C/.gitignore +++ b/C/.gitignore @@ -1,2 +1 @@ -* !.gitignore diff --git a/C/ootpatang.c b/C/ootpatang.c new file mode 100644 index 0000000..2e3e996 Binary files /dev/null and b/C/ootpatang.c differ diff --git a/Python/.gitignore b/Python/.gitignore deleted file mode 100644 index d6b7ef3..0000000 --- a/Python/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!.gitignore diff --git a/Python/captcha_app.py b/Python/captcha_app.py new file mode 100644 index 0000000..7b9ec84 --- /dev/null +++ b/Python/captcha_app.py @@ -0,0 +1,27 @@ +import random +from tkinter import * +from tkinter import messagebox + +text = 'abcdefghijklmnopqrstuvwxyz0123456789' +window = Tk() +window.title("Captcha App") +window.geometry("300x100") #You can set the window according to your use +captcha = StringVar() +user_input = StringVar() + +def set_captcha(): + s = random.choices(text, k = 6) #value of k decides the length of captcha + captcha.set(''.join(s)) + +def check(): + if captcha.get() == user_input.get(): + messagebox.showinfo("Success", "Correct") + else: + messagebox.showinfo("Error", "Incorrect") + set_captcha() + +Label(window, textvariable = captcha, font = "Arial 16 bold").pack() +Entry(window, textvariable = user_input, font = "Arial 16 bold").pack(ipady = 5) +Button(window, command = check, text = 'Check', font = "Arial 10").pack() #you can change the font of title, captcha given and user input +set_captcha() +window.mainloop() \ No newline at end of file