Create a Python script which will accept a positive integer and will display the DIVISORS of the input number.
Sample Output:
Input a Positive Integer : 20
The DIVISORS of 20 are...
1 2 4 5 10 20
I need the code to have an output stated above.
1
Expert's answer
2022-02-26T11:31:30-0500
SOLUTION CODE
my_integer = int(input("\nEnter a Positive integer: "))
print("\nThe DIVISORS of ", str(my_integer), " are : \n")
for i in range(1, my_integer+1):
if my_integer % i == 0:
print(str(i),end = " ")
Finding a professional expert in "partial differential equations" in the advanced level is difficult.
You can find this expert in "Assignmentexpert.com" with confidence.
Exceptional experts! I appreciate your help. God bless you!
Comments