Created
May 6, 2017 04:18
-
-
Save ehedaoo/6046cada09ecfecc95798d7869abbb88 to your computer and use it in GitHub Desktop.
Create a program that asks the user for a number
and then prints out a list of all the divisors of that number.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create a program that asks the user for a number | |
# and then prints out a list of all the divisors of that number. | |
num = int(input("Enter a number")) | |
check = list(range(1, num+5)) | |
for number in check: | |
if num % number == 0: | |
print(number) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment