0
user password
I need help with this program. I have to find common passwords on the Internet and then design a program to prompt a user for a password and continue to prompt the user until the user has not chosen one of the passwords that I found on the Internet.  def appenfile(patient_info): f=open(patient_info) name = input("Enter first and last name:") f.write(name+'\n') address = input("Enter your home address:") f.write(address+'\n') birth = input("Enter your date of birth:") f.write(birth+'\n') f.close() f=open(patient_info,'r') print(f.read()) f.close()
3 ответов
+ 5
Post your code
+ 2
You can save a password in a variable and run a while loop for input untill password is not equals to input. For e.x:
password = "qwerty"
x = input( "Enter password: ")
while x != password:
x = input( " Please Re-Enter: " )
Note: this won't work on sololearn's playground.
0
Sorry, that would help...