Coders Packet

FINDING NUMBER OF PRIME PAIRS WHOSE DIFFERENCE IS 6 USING PYTHON

By Akula Arjun

In this python project, we will find the number of prime pairs that are present between the given inclusive range with the difference of 6.

Prime number :

                A prime number is a number having exactly two factors. If p is a prime, then its only factors are necessarily 1 and p itself. In this program,                      we will find the number of prime pairs with a difference of 6 is present in the given inclusive range using python.For example, the given range                  is 4,30 then all possible pairs are (5,11),(7,13),(11,17),(13,19),(17,23),(23,29) i.e 6 pairs with a difference of 6.

 

Example :

Input   :4 30

Output :6

 

 

Input   :101 500

Output :30

 

 

Input   :1000 2000

Output :54

Download project

Reviews Report

Submitted by Akula Arjun (Arjun)

Download packets of source code on Coders Packet