Advertisement
timber101

Passoword checker

Aug 1st, 2019
755
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.71 KB | None | 0 0
  1. # # Import the GUI widgets that you'll be using, and create the 'app' for your program.
  2. from guizero import App, TextBox, PushButton, Text, info
  3. app = App()
  4.  
  5. # Function definitions for your events go here.
  6. def btn_go_clicked():
  7.     if txt_pw1.value == txt_pw2.value :
  8.         info("Password Check","Good news passwords match")
  9.     else:
  10.         info("Password Check","nope passwords don't match")
  11.    
  12. # Your GUI widgets go here
  13. lbl_pw1 = Text(app, text="Hello. Please enter your password")
  14. txt_pw1 = TextBox(app)
  15. lbl_pw2 = Text(app, text="Re- enter password here")
  16. txt_pw2 = TextBox(app)
  17. btn_go = PushButton(app, command=btn_go_clicked, text="Check Password")
  18.  
  19. # Show the GUI on the screen
  20. app.display()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement