Created
May 26, 2021 05:14
-
-
Save bharathmuddada/d5b437b3438088caaaf584a48cc93268 to your computer and use it in GitHub Desktop.
Smallest Divisor of a number which is greater than 1 in python
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
number = int(input("Enter your number \n")) | |
for i in range(2, number + 1): | |
if number % i == 0: | |
print(i, "is smallest divisor") | |
break |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment