vendredi 25 septembre 2020

Python If else statement have a bug maybe

def evod(number):
    if number % 2 == 0:
        print("The number is even")
    return"The number is odd"

print(evod(60))


Output:
The number is even
The number is odd

if I run this function it prints both lines. It should print a single one of those. Why is this happening? Please help...

Aucun commentaire:

Enregistrer un commentaire