Mar-15-2023, 01:53 AM
Tried moving the assignment out of the while statement. made no sense with it there. should be at top.
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
""" Spyder Editor This is a temporary script file. """ import os repeat = "y" input("set mypassword") mypassword = "test123" while repeat=="y": input("stsart while") guesspassword = input("What is the password: ") if guesspassword==mypassword: input("start if") print("match") input("Press Enter") else: input("start else") print("no match") print("Password is ", mypassword) input("Press Enter") repeat = input("Run again?") os.system('cls')