Python Forum
My very first "thing" what I'm somewhat proud of, after a week udomy class. Register
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
My very first "thing" what I'm somewhat proud of, after a week udomy class. Register
#2
Pretty good for one week keep going
just a quick tip tho make your code more readable first off by using a linter as with imports it a better practice to put them all at the top of the file
A linted python code should look like this
import os
import time


def log_in():
    return ()


print("Register:")
ui = []
pw = []
while True == 1:
    userid = input("Give you User name: ")
    password = input("Give your password: ")

    if userid in ui:
        print('Userid already in use!')
        True == 1
    else:
        print('You registered successfully!!')
        ui.insert(0, userid)
        pw.insert(0, password)
        print(ui)
        print(pw)
        #True == 1
        break
time.sleep(2)
os.system('clear')
while True == 1:
    print("Log In:")
    if input("User ID: ") in ui:
        if input("Password: ") in pw:
            print("Succesfull LogIn!")

            import webbrowser
            webbrowser.open('http://www.youtube.com', new=2)
            break
            True == 4
        else:
            print("Wrong User name or password!! Try again!!")
I just put that in my editor (Visual studio code) and it linted it on save
Reply


Messages In This Thread
RE: My very first "thing" what I'm somewhat proud of, after a week udomy class. Register - by Anarab - Jun-17-2020, 09:06 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  My very first "thing" what I'm somewhat proud of, after a week udomy class. Register Haulpa 3 2,632 Jun-19-2020, 09:02 PM
Last Post: Haulpa
  my first attempt, please advise me of any thing danak 6 3,987 Feb-01-2020, 03:19 PM
Last Post: Skaperen

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020