How many prime numbers between two integers statistics

He is now an ongoing entry or white, I hope you can give me something that makes me able to see their own shortcomings 

in this Thank you friends



DEF Demo (the X-):
DEF Inner (NUM):
IF NUM <= 2: # 2 are prime numbers
result = 'is a prime number'
the else:
NUM> 2 # determines we are mainly> number 2
for I in Range (2, NUM):
IF NUM I == 0%:
Result = 0 in # this determination is non-prime
BREAK
elif NUM. 1% I ==:
Result =. 1 # determines again this prime
return X (Result)
return Inner

@demo
DEF FUNC (P):
return P
num1 = int (iNPUT ( 'enter a digital: \ n-'))
num2 = int (iNPUT (' enter a number: \ n-'))

a = 0
B = 0
I in Range for (num1, num2 +. 1):
FUNC (I)
IF FUNC (I) == 0:
A = +. 1
the else:
B = +. 1
Print ( '2 to 100} {Africa has a prime'. the format (A))
Print ( 'prime number in {2-100} has a' .format (b))

Guess you like

Origin www.cnblogs.com/ldmb/p/11966217.html