Jan-23-2019, 02:52 AM
print('\n') print('uPass 1.0') menu = input('Create - Y, Enter N: ') if menu == 'Y' or menu == 'y': new_pass = input('Enter new password: ') file = open('uPass_pass.txt', 'w') file.write(new_pass) file.close() print_password = open('uPass_pass.txt', 'r') print(print_password.read()) file.close() elif menu == 'N' or menu == 'n': pass_input = input('Enter password: ') file = open('uPass_pass.txt', 'r') if pass_input == file: print('working') else: print('error')This is my attempt at creating a program that lets the user create a password that is stored and can be called upon when the user enters the password and the program should determine if it is the correct or incorrect password. This program is very unfinished and in trial stages but I cannot figure out how to store the password in the text file that I have created. I am using PyCharm and have created the python file and text file names uPass_pass.txt. Any help is appreciated and I have tried to write this without help of other modules to challenge myself.