Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Please set your Username and Password below!")
- Input_Username = input("Username: ")
- Input_Password = input("Password: ")
- print("\nUsername:",Input_Username,"\nPassowrd:",Input_Password)
- Y_or_N = input("Is this information correct? Y/N \n")
- controller = False #Controller for Y_or_N
- #WHILE FUNCTION FOR YES OR NO TO LOGIN
- while controller == False: #Continuous loop until the information is correct
- if Y_or_N == "y":
- controller = True
- elif Y_or_N == "n":
- print("Please set your Username and Password below!")
- Input_Username = input("Username: ")
- Input_Password = input("Password: ")
- print("\nUsername:",Input_Username,"\nPassowrd:",Input_Password)
- Y_or_N = input("Is this information correct? Y/N \n")
- else:
- Y_or_N = input("Invalid input, please re-enter your choice! Y/N \n")
- #OPENING, READING AND WRITING FILES
- file = open("Data.txt", "a") # "w" write "a" append (save continuously)
- file.write(Input_Username + ", " + Input_Password + "\n")
- file.close()
- print("Your information has been saved")
- file = open('Data.txt', 'r') #Opens and reads text file
- for line in file: # !REMOVE! Prints the Username and Password (My confirmation)
- print (line),
- file.close()
- Username = Input_Username #For use later
- Passowrd = Input_Password #For use later
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement