How to find common factors of two numbers in python?
Here we’ll see how to find common factors of two numbers in python.
e.g.,
a = 10 b = 50 count = 0 for i in range(1, min(a, b)+1): if a%i==0 and b%i==0: count+=1 print(count) print(i)
We can find common factors of two numbers in this way.
Subscribe
Login
Please login to comment
0 Discussion