Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

if-else Conditional Statement in Python

def authentication(password):
    if password == 'unstoppable':
        message = "Login Successful !! Welcome to the Softhunt"
    else:
        message = "Try a different password"
        
    return message
    
def main():
    print("Authentication System")
    print("======================")
    passwordInput = input("Enter your password: ")
    checkPass = authentication(passwordInput)
    print(checkPass)
main()
Source by softhunt.net #
 
PREVIOUS NEXT
Tagged: #Conditional #Statement #Python
ADD COMMENT
Topic
Name
9+1 =