vendredi 31 juillet 2020

Trying to calculate even odd without math operators

w= int(input('enter a num:'))
even= []
for x in range (0, 999999999999999999999999999999999999999999999999, 2):
    even.append(x)
    if w in even:
        print ('the num is even')
        break
else:
    print ('the num is odd')

Aucun commentaire:

Enregistrer un commentaire