Learn about **Print Even and Odd numbers from 1 to 100 in Python** in the below code example. Also refer the comments in the code snippet to get a detailed view about what’s actually happening.

Contents

#### Print Even and Odd numbers from 1 to 100 in Python

```
# Python program to print all even and odd numbers in given range
# range
start, end = 1, 100
for num in range(start, end + 1):
# check number is odd or not
if num % 2 == 0:
print(num,end = ':Even ')
else:
print(num, end = ':Odd ')
```

**Output:**

1:Odd 2:Even 3:Odd 4:Even 5:Odd 6:Even 7:Odd 8:Even 9:Odd 10:Even 11:Odd 12:Even 13:Odd 14:Even 15:Odd 16:Even 17:Odd 18:Even 19:Odd 20:Even 21:Odd 22:Even 23:Odd 24:Even 25:Odd 26:Even 27:Odd 28:Even 29:Odd 30:Even 31:Odd 32:Even 33:Odd 34:Even 35:Odd 36:Even 37:Odd 38:Even 39:Odd 40:Even 41:Odd 42:Even 43:Odd 44:Even 45:Odd 46:Even 47:Odd 48:Even 49:Odd 50:Even 51:Odd 52:Even 53:Odd 54:Even 55:Odd 56:Even 57:Odd 58:Even 59:Odd 60:Even 61:Odd 62:Even 63:Odd 64:Even 65:Odd 66:Even 67:Odd 68:Even 69:Odd 70:Even 71:Odd 72:Even 73:Odd 74:Even 75:Odd 76:Even 77:Odd 78:Even 79:Odd 80:Even 81:Odd 82:Even 83:Odd 84:Even 85:Odd 86:Even 87:Odd 88:Even 89:Odd 90:Even 91:Odd 92:Even 93:Odd 94:Even 95:Odd 96:Even 97:Odd 98:Even 99:Odd 100:Even

Hope above code works for you and Refer the below Related Codes to gain more insights. Happy coding and come back again.

**Similar Code :** Print Even and Odd in Given Range Python