Test pierwszości¶ Opis problemu¶ Implementacja¶ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20def is_prime(n: int) -> bool: if n < 2: return False i = 2 while i * i <= n: if n % i == 0: return False i += 1 return True n = 7 if is_prime(n): print(f"{n} is a prime number") else: print(f"{n} is not a prime number")