Check if number is prime
Write a program that gets a number on the commnad line a prints “True” if the number is a prime number or “False” if it isn’t.
$ is_prime 42
False
$ is_prime 19
True
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
Write a program that gets a number on the commnad line a prints “True” if the number is a prime number or “False” if it isn’t.
$ is_prime 42
False
$ is_prime 19
True