{"id":10374,"date":"2021-09-30T11:00:23","date_gmt":"2021-09-30T05:30:23","guid":{"rendered":"https:\/\/python-programs.com\/?p=10374"},"modified":"2021-11-22T18:35:32","modified_gmt":"2021-11-22T13:05:32","slug":"python-program-to-find-the-smallest-divisor-of-an-integer","status":"publish","type":"post","link":"https:\/\/python-programs.com\/python-program-to-find-the-smallest-divisor-of-an-integer\/","title":{"rendered":"Python Program to Find the Smallest Divisor of an Integer"},"content":{"rendered":"

Our website provided core java programs examples with output<\/a> aid beginners and expert coders to test their knowledge gap and learn accordingly.<\/p>\n

Given a number, the task is to find the smallest number which divides the given number in Python.<\/p>\n

Examples:<\/strong><\/p>\n

Example1:<\/strong><\/p>\n

Input:<\/strong><\/p>\n

given number = 91<\/pre>\n

Output:<\/strong><\/p>\n

The smallest which divides the given number [ 91 ] = 7<\/pre>\n

Example2:<\/strong><\/p>\n

Input:<\/strong><\/p>\n

given number = 169<\/pre>\n

Output:<\/strong><\/p>\n

Enter some random number = 169\r\nThe smallest which divides the given number [ 169 ] = 13<\/pre>\n

Program to Find the Smallest Divisor of an Integer in Python<\/h2>\n

There are several ways to find the smallest divisor of the given number in Python some of them are:<\/p>\n