Last active
June 22, 2021 18:11
-
-
Save Just-Simple-59/21f41179287f017fc1ef6e9bfdadf36f 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
Number = int(input("Enter a random number\n")) | |
Check = range(2, 11) | |
empty = [] | |
for element in check: | |
if number % element == 0: | |
empty.append(element) | |
print("The number" + ' ' + str(number) + ' ' + "you entered" | |
" is a divisor of this number(s)" + ' ' + str(empty)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment