Skip to content

Commit

Permalink
Update Count-Prime-Numbers.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ShadiShadab authored Jan 10, 2025
1 parent 372ab97 commit 90536fd
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions solutions/Count-Prime-Numbers.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
Author: Zeinab Shadabshoar
"""


def is_prime(n: int) -> bool:
"""
Checks if a given number is prime.
Expand Down Expand Up @@ -41,7 +40,6 @@ def is_prime(n: int) -> bool:
return False
return True


def count_primes(numbers: list) -> int:
"""
Counts the number of prime numbers in a list.
Expand Down Expand Up @@ -70,7 +68,7 @@ def count_primes(numbers: list) -> int:

return prime_count


# Example usage
numbers = [25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40]
print("Number of prime numbers:", count_primes(numbers))

0 comments on commit 90536fd

Please sign in to comment.