Pseudocode Compiler
Practice

Prime Number Checker

HARDAlgorithms

Read a positive integer N. Output Prime if N is a prime number, or Not Prime otherwise.

A prime number is a whole number greater than 1 that has no divisors other than 1 and itself.

Input: A positive integer N. Output: Prime or Not Prime.

Example:

Input:  7
Output: Prime
Premium is coming soon. All grading features are currently unlocked.

Sample Test Cases

Test 1: 7 is prime
Inputs: 7
Expected: Prime
Test 2: 12 is not prime
Inputs: 12
Expected: Not Prime
Test 3: Smallest prime
Inputs: 2
Expected: Prime
Test 4: 1 is not prime
Inputs: 1
Expected: Not Prime
Press Ctrl+Enter to run your code
or Ctrl+Shift+Enter to grade
Prime Number Checker | IGCSE Pseudocode Compiler