From 76824bd08476bff6f2bb1ee7cb98fdcd171d9f70 Mon Sep 17 00:00:00 2001 From: Bob The Burger <yofihzilif@sch.bme.hu> Date: Thu, 2 Apr 2020 11:42:42 -0700 Subject: [PATCH] I am such a dumb boi --- program.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 program.py diff --git a/program.py b/program.py new file mode 100644 index 0000000..6590a5c --- /dev/null +++ b/program.py @@ -0,0 +1,26 @@ +import DB.Database as db + + +def Register(username=None, password=None): + if db.check_user_name(username) != '': + return db.check_user_name(username) + if db.validate_password(password) != '': + return db.validate_password(password) + else: + db.create_user(username, password) + return 'Succes' + + +if __name__ == "__main__": + text_input = input("Press enter to start registration") + if text_input == '': + name = input("Give us a Username ") + psw = input("Give us a Password ") + state = Register(name, psw) + if state != 'Succes': + while state != 'Succes': + print('Let\'s Try again because:' + state, '\n') + name = input("Give us a Username ") + psw = input("Give us a Password ") + state = Register(name, psw) + print('Noice') -- GitLab