Skip to content
← Back to Community
Writing program in python
Profile icon
kazib

How to write a python program using if else statement to find factor for a number when even or odd.

Voters
Profile icon
kazib
Comments
hotnewtop
Profile icon
InvisibleOne

Like this:

for i in range(100): if i % 2 == 0: print("Number: " + str(i) + " is even") else: print("Number: " + str(i) + " is odd")
Profile icon
ch1ck3n