Question: Write Python code which lists all the factors of an integer. Your code should ask the user to enter an integer, and then return the
Write Python code which lists all the factors of an integer. Your code should ask the user to enter an integer, and then return the factors as multiplicative pairs. For example, if the user enters 12, the program should return
1,12
2,6
3,4
Hint 1: Use a loop
Hint 2: If n is the number the user enters, you only have to loop up to n/2
Hint 3: The input function returns a string you need to convert it to an integer using the int function
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
