« Web, HTML, Tech Forum

can someone help with python?

 im making a password system for a school project, and i already have most of it made but i want to make it so i can select what i want to access, im not actually making a website btw. ill put the code at the end. im using trinket.io website as an executor since i cant download an executor..

i just want it so i can type something and it will select either the website, login, or sign up. you can polish the code if you find something wrong with it too, it doesnt need to be perfect either.


(i made it say "agh whatever" because i found a bug, where you dont need to confirm your password but you can still login with it.)



import time
import os
print("Hello. Sign up:")
c = input("Username:")
a = input("Set password:")
b = input("Confirm password:")
if a == b:
  print("\r \r \r \r \r \r")
  print("Welcome!")
else:
  print("\r \r \r \r \r \r")
  print("Passwords dont match. Try again?")
  time.sleep(2)
  print("Agh, whatever. Doesnt matter, if you forget, thats on you.")
time.sleep(5)
os.system('cls')

print("\r \r \rLogin:")
d = input("Username:")
e = input("Password:")
if d == c and e == a:
  print("\r \r \r \r \r Good job.")
  time.sleep(2)
  os.system('cls')
  print("This is my website. Work in progresss.")
else:
  print("\r \r \r \r \r Bad job. Retry.")
time.sleep(3)
os.system('cls')


Report Topic

1 Reply

Reply by munchlax

posted
updated

just use input to allow the user to type where they want to go


Permalink Report Reply