Created
March 12, 2025 14:44
-
-
Save HandsonMatheus/bb8ba57058e114e55770aba6169f7231 to your computer and use it in GitHub Desktop.
This file contains hidden or 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. (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. | |
| """ | |
| def divisor(n): | |
| for i in range(1, n+1): | |
| if n % i == 0: | |
| print(i) | |
| print(divisor(n = int(input('Choose a number >>> ')))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment