Skip to content
Sign upLog in
← Back to Community

Log in system :)

Profile icon
D4an13l

import time
account = input("do you have an account?: ")
if account =="yes":
time.sleep(0.2)
print("..")
time.sleep(0.2)
print("....")
time.sleep(0.4)
while True:
login1 = input("Login:")
login2 = input("Password:")
file = open(login1+".txt", "r")
data = file.readline()
file.close()
if data == login1+":"+login2:
print("Welcome", login1)
break
print("Incorrect username or password.")
elif account =="no":
time.sleep(0.2)
print("..")
time.sleep(0.2)
print("....")
while True:
username = input("Enter a username:")
password = input("Enter a password:")
password1 = input("Confirm password:")
if password == password1:
file = open(username+".txt", "w")
file.write(username+":"+password)
file.close()
welcome = "y"
print("welcome" , username)
break
print("Passwords do NOT match!")
else:
time.sleep(0.2)
print("..")
time.sleep(0.2)
print("....")

print("Please choose yes/no .") account2 = input("do u have an account?: ") if account2 =="yes": time.sleep(0.2) time.sleep(0.2) print("..") time.sleep(0.2) print("....") time.sleep(0.4) while True: login1 = input("Login:") login2 = input("Password:") file = open(login1+".txt", "r") data = file.readline() file.close() if data == login1+":"+login2: print("Welcome", login1) break print("Incorrect username or password.") elif account2 =="no": time.sleep(0.2) print("no") else: print("theres no hope ")
Voters
Profile icon
mxok012
Profile icon
mkhoi
Profile icon
D4an13l
Comments
hotnewtop
Profile icon
mkhoi

Thanks man, it totally worked and it work great!

Profile icon
MATTHEWBECHTEL

@D4an13l

Cannot infer image mime type
un problema hasta ahora lol.

Profile icon
MATTHEWBECHTEL

Cool? I’ll try it out later.

Profile icon
D4an13l

@MATTHEWBECHTEL
allright sick let me know if there are any bugs

Profile icon
MATTHEWBECHTEL

I don’t know why it’d need an indentation block but apparently it does XD.

@D4an13l