users = { "amir": "123456", "ashkan": "12345678", "reza": "123" } # new_name = 0 enterd_username = 0 y = "y" # for line 26 while enterd_username not in users: #i serch this one enterd_username = input("enter your username : ") if enterd_username in users: print("you are a user") v = True else: print("you are not a user sign up first.") v = False if v == False : new_user = input("are you wana sign up ? y/n :") if new_user == y : new_name = input("write your username : ") while new_name in users : new_name = input("This name has been used before \n try a new one : ") new_password = input("write your password : ") new_password2 = input("write your password again : ") while new_password != new_password2 : new_password = input("password doesn't match try again \n write your password : ") new_password2 = input("write your password again : ") if new_password == new_password : str(new_password) str(new_name) users.update({new_name : new_password}) print("you sign up successfully") else : print("sorry, you can't use website without having account") break if v == True : enterd_password = input("enter your password : ") x = enterd_username p = enterd_password == users[x] while p != True: print("your password was wrong ") enterd_password = input("try again : ") p = enterd_password == users[x] if p == True: print("you loged in successfully") print("WELCOME")