Jul-21-2020, 03:15 PM
(This post was last modified: Jul-21-2020, 03:16 PM by spalisetty06.)

I don't want the following output, I want the odd numbers, even numbers separately. Can you please help.

'''odd and even numbers under 10''' for i in range(1, 11): if i % 2 == 0: print(i, " is even") else: print(i, "is odd")

```
Output:1 is odd
2 is even
3 is odd
4 is even
5 is odd
6 is even
7 is odd
8 is even
9 is odd
10 is even
```