Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def is_prime(n):
- if n<2:return False
- for i in range(2,int(n**(1/2))+1,):
- if not n%i:return False
- return True
- def is_total_prime(n):
- for i in str(n):
- if int(i) not in (2,3,5,7):return False
- return True
- def get_total_primes(a, b):
- c = 0
- for i in range(a,b+1):
- if is_prime(i) and is_total_prime(i):
- c+=1
- return c
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement