Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download
Views: 38
#Given that A and B are two prime numbers that are less than 1000. # Find A and B such that A x B = 7387. def find_two_prime(answer): for first in range(2, 1000+1): for second in range(2, 1000+1): if is_prime(first) and is_prime(second): if first * second == answer: return first, second return 0, 0 # first, second = find_two_prime(7387) print 'The two numbers are %d and %d.' % (first, second)
The two numbers are 83 and 89.