- 1

Hmmm, HELP!

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, 8:29 PM
Christian Sandoval
Christian Sandoval - avatar
2 ответов
0
while True: mypass = input("Choose a password:") if mypass not in ["your", "list", "of", "passwords"]: break else: print("Too common..try again.") print(mypass)
22nd Apr 2020, 8:54 PM
rodwynnejones
rodwynnejones - avatar
0
sorry. i posted two different things but i got it . thank you!
22nd Apr 2020, 8:56 PM
Christian Sandoval
Christian Sandoval - avatar