From 3b22a4705f77d18b46bd20542717519174881396 Mon Sep 17 00:00:00 2001 From: Shadi Shadab <46791602+ShadiShadab@users.noreply.github.com> Date: Fri, 10 Jan 2025 15:40:07 +0200 Subject: [PATCH] Update Count-Prime-Numbers.py --- solutions/Count-Prime-Numbers.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/solutions/Count-Prime-Numbers.py b/solutions/Count-Prime-Numbers.py index 6e0d6a185..e97a04953 100644 --- a/solutions/Count-Prime-Numbers.py +++ b/solutions/Count-Prime-Numbers.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- -""" +r""" This module defines the functions `is_prime` and `count_primes` for checking primality and counting prime numbers in a list. @@ -9,7 +9,7 @@ """ def is_prime(n: int) -> bool: - """ + r""" Checks if a given number is prime. Parameters: @@ -39,9 +39,8 @@ def is_prime(n: int) -> bool: return False return True - def count_primes(numbers: list) -> int: - """ + r""" Counts the number of prime numbers in a list. Parameters: @@ -67,7 +66,6 @@ def count_primes(numbers: list) -> int: prime_count += 1 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))