Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Movie-ChatBot/RememberingUserNames.py
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
32 lines (27 sloc)
904 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name = input("Please enter your name: ") | |
nickname = input("Please enter your nickname: ") | |
profile = name[0:3] + nickname[0:4] | |
print("Your profile has been created and is " + str(profile ) + ".") | |
file = open("Login.txt " , "a") | |
file.write(profile) | |
file.write(",") | |
file.write("\n") | |
file.close() | |
print("Your name has been saved ") | |
print("Remember you have only three choices to enter correct profile name ") | |
userInput = input("What is your profile ?\n") | |
if userInput == profile: | |
print("Welcome " + str(name)) | |
print("Finished") | |
else: | |
print("Please try again ") | |
userInput = input("Please enter a valid profile name: ") | |
if userInput == profile: | |
print("Welcome " + str(name)) | |
else: | |
print("Please try again ") | |
userInput = input("Please enter a valid profile name: ") | |
if userInput == profile: | |
print("Welcome " + str(name)) | |
else: | |
print("Please start again !") |