mercredi 23 novembre 2016

python if else function not working

I am trying to make it so that when I call the function "vote" that a conditional statement will execute and either return True or False. When I run it Python tells me there is no input. I put inputs in the function I called so I am confused. What am I doing incorrectly? Here is my code:

def vote(vote_one, vote_two, vote_three):
    if (vote_one == vote_two):
        return True
    elif (vote_one == vote_three):
        return True
    elif (vote_two == vote_three):
        return True
    else:
        return False

vote(1, 2, 1)

Aucun commentaire:

Enregistrer un commentaire