Draft

Count Primes (EASY)

70 of 91gkucmierz

Description:

Count how many primes is in given range inclusively.

Primes: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, …

For example:
- range 0-10 have 4 primes: 2, 3, 5, 7
- range 0-11 have 5 primes: 2, 3, 5, 7, 11
- range 2-11 have 5 primes: 2, 3, 5, 7, 11
- range 3-11 have 4 primes: 3, 5, 7, 11

countPrimes(min, max)
0 <= min <= 1000
0 <= max <= 1000
min <= max

return Number of primes in given range

Similar Kata:

Stats:

CreatedNov 15, 2016
Warriors Trained211
Total Skips42
Total Code Submissions598
Total Times Completed91
JavaScript Completions70
Ruby Completions25
Total Stars4
% of votes with a positive feedback rating76% of 48
Total "Very Satisfied" Votes33
Total "Somewhat Satisfied" Votes7
Total "Not Satisfied" Votes8
Total Rank Assessments52
Average Assessed Rank
6 kyu
Highest Assessed Rank
1 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • gkucmierz Avatar
  • narayanswa30663 Avatar
  • cliffstamp Avatar
Ad