{"id":15300,"date":"2021-10-01T10:00:40","date_gmt":"2021-10-01T04:30:40","guid":{"rendered":"https:\/\/python-programs.com\/?p=15300"},"modified":"2021-11-22T18:33:30","modified_gmt":"2021-11-22T13:03:30","slug":"python-program-to-find-common-divisors-of-two-numbers","status":"publish","type":"post","link":"https:\/\/python-programs.com\/python-program-to-find-common-divisors-of-two-numbers\/","title":{"rendered":"Python Program to Find Common Divisors of Two Numbers"},"content":{"rendered":"

Given two numbers the task is to find the common divisors of the given two numbers in Python.<\/p>\n

Using a Python program, we will find the common divisors of two numbers. Integers that divide both numbers correctly are known as common divisors. Here, we will learn what common divisors are, how to find them, and how to use Python to find the common divisors of two numbers.<\/p>\n

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

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

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

Given First Number =56\r\nGiven Second Number =88<\/pre>\n

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

The common divisors of the two numbers { 56 88 } are :\r\n1\r\n2\r\n4\r\n8<\/pre>\n

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

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

Given First Number =105\r\nGiven Second Number =85<\/pre>\n

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

Enter some random first number =105\r\nEnter some random second number =85\r\nThe common divisors of the two numbers { 105 85 } are :\r\n1\r\n5<\/pre>\n

Program to Find Common Divisors of Two Numbers in Python<\/h2>\n

Below are the ways to find the common divisors of the given two numbers in Python.<\/p>\n