Exercise
Create a program that asks the user for a number and then prints out a list of all the divisors of that number. (If you don’t know what a divisor is, it is a number that divides evenly into another number. For example, 13 is a divisor of 26 because 26 / 13 has no remainder.)There is an easy way to create list.
x = range(1,9) which will contain [1,2,3,4,5,6,7,8]
Solution:
Git Hub reference:
Github code
https://gist.github.com/pinkpretty/f3d4773c334ae24a1dc31f6f8a543ba2
Happy coding! :)
No comments:
Post a Comment