Hard
Count Primes up to N
Write a helper function
is_prime(n) and use it to count the primes from 2 to N.Input
One integer N ≥ 1.
Output
The number of primes ≤ N.
Sample 1
Input
10
Output
4
Sample 2
Input
30
Output
10
Output appears hereHints