I have a number, I want to print the factors of it but that's very easy

I want to distinguish between the odd and even factors.

eg:

10
The factors of 10 are:
1  Odd
2  Even
5  Odd
10  Even
Nov 19, 2018 in Python 16,721 views

## 1 answer to this question.

```x = int(input("Enter any number \n"))
print("The factors of",x,"are:")
for i in range(1, x + 1):
if x % i == 0:
if i % 2 == 0:
print(i," Even")
else:
print(i," Odd")```

Hope this will help!

Thank!

answered Nov 19, 2018 by Nabarupa
Master Kill!!!! Edureka rocks!!

## How to find the value of a row in a csv file in python and print column and row of that value ?

Hello @Khanhh , Use panda to find the value of ...READ MORE

## Write a Python program that takes as input a month and year, determines how many days are in the month, and outputs the number of days. Thirty days are in September, April, June, and November

Write a Python program that takes as ...READ MORE

–1 vote

## How to filter out any digit that contains odd number in a range of number in Python?

n = list(range(10)) b = list(filter(lambda i:i%2!=0,n)) print(b) READ MORE

+1 vote

## How do I find out the sum of digits of a number in Python?

Hi, good question. If you are considering ...READ MORE

## how can i randomly select items from a list?

You can also use the random library's ...READ MORE

+1 vote

## how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

## Lowercase in Python

You can simply the built-in function in ...READ MORE