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()

22nd Apr 2020, 4:38 PM
Christian Sandoval
Christian Sandoval - avatar
3 ответов
+ 5
Post your code
22nd Apr 2020, 4:42 PM
Justus
Justus - avatar
+ 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.
23rd Apr 2020, 2:07 AM
Tricker
0
Sorry, that would help...
22nd Apr 2020, 7:52 PM
Christian Sandoval
Christian Sandoval - avatar