All problems
EasyAlgorithms
Is prime?
Write `is_prime(n)`. Test 2, 7, 9, 17, 25.
- #algorithms
- #math
Sample input
[2, 7, 9, 17, 25]
Sample output
True True False True False
is-prime.py
Output
Press "Run code" to execute.
Loading…
Write `is_prime(n)`. Test 2, 7, 9, 17, 25.
[2, 7, 9, 17, 25]
True True False True False
Press "Run code" to execute.