Advertisement
Carlos-Quispe

valida password

Jan 27th, 2020
1,033
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # import the GUI widgets taht 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 definition for your eventws go here
  6. def btn_go_clicked():
  7.     if txt_pw1.value==txt_pw2.value:
  8.         info( "Password validate", txt_name.value + " passwords match " )
  9.     else:
  10.         info("Password validate", txt_name.value + " passwords no match " )
  11.  
  12. # Your GUI widgets go here
  13. lbl_name = Text(app,text="Hello. What's your name?")
  14. txt_name = TextBox(app)
  15. lbl_pw1 = Text(app,text="enter a password:")
  16. txt_pw1 = TextBox(app)
  17. lbl_pw2 = Text(app,text="repeat a password:")
  18. txt_pw2 = TextBox(app)
  19. btn_go = PushButton(app, command=btn_go_clicked, text="Done")
  20.  
  21. #Show the GUI on the screen
  22. app.display()# Escribe tu código aquí :-)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement