Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions SimpleLoginRegistrationSystem.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
usernames = ["Johnrey","Mary","Jonas","Brix"]
passwords = [202211615,202211616,202211617,202211618]

def inputUser():
username = input("Enter your username: ")
password = int(input("Enter your password: "))

i = 0
while i < len(usernames) and len(str(password)):
if username == usernames[i] and password == passwords[i]:
print("Success Login")
break
elif username == usernames[i]:
print("Your password doesn't match your username.")
break
elif username != usernames[i] and password != passwords[i]:
i = i + 1
elif usernames[i] and passwords[i] != username and password:
print("Pls try Again")
break
else:
print("Invalid username or password")
asking()


def asking():
question = input("Do you want to register Yes or No? :")
if question == "Yes":
username = input("Enter your username: ")
password = int(input("Enter your password: "))
usernames.append(username)
passwords.append(password)
print("Successfully Registered")
question = input("Do you want to Log In Yes or No? :")
if question == "Yes":
inputUser()
else:
print("Thankyouu for using our system")
else:
print("Thankyouu for using our system")

inputUser()