calling "define function (def function) for a simple login
OmegaX (0)

Hello everyone
here is my simple code for a simple login :

def Login(username , password):
i = 1
while i<5 :
username = int(input("Enter your username: "))
password = int(input("Enter your password: "))
if username == "Test" and password == "Test123":
return print("Successful Login")
else :
return print("username or password is wrong")
i += 1

my question is how can I call it ?

You are viewing a single comment. View All
JoshDaBosh (79)

First, remove the parameters username and password from line 1:
def Login(username , password): -> def Login():
put this at the bottom of your code:

Get rid of the return print() statements and just print() first and then just put "return" at the end.