Doubt on appJar
from appJar import gui x=1 def press(button): while(x < 4): usr = app.getEntry("Username") pwd = app.getEntry("Password") if usr == "user" and pwd == "pass": print("Access granted.", "You are now logged in !") app.infoBox("Logged in", "You are now logged in !") break elif usr != "user" and pwd != "pass": print("Access denied", "Your credentials are invalid !") app.errorBox("Error", "Your credentials are invalid !") if x==4: print("No more attempts", "try again later !") app.infoBox("no more attmpt", "try again later !") app.stop() app = gui("LOGIN WINDOW") app.setBg("white") app.setFont(18) app.addLabel("title","Login") app.setLabelBg("title","orange") app.setLabelFg("title","blue") app.addLabelEntry("Username") app.addLabelSecretEntry("Password") app.addButtons(["Log In","Cancel"],press) app.setFocus("Username") app.go() this is my code. I wanted to make a password system. but users can do attempt of password 3 times only. but I am unable to solve it.plz, help with it.