Write a Python program that asks the user to enter a number. Then check if the given number is a prime number or not. A prime number is a number that is greater than 1 and has no factors other than 1 and itself. For example, 7 is a prime number because it is only divisible by 1 and 7. But 6 is not a prime number because it is divisible by 2 and 3 also. If the number is prime, print "Prime". If not, print "Not Prime". The program must take the number as input from the user.
Examples
Example 1
Input
7
Output
Prime
Explanation 7 is only divisible by 1 and 7 so it is Prime
Example 2
Input
1
Output
Not Prime
Explanation 1 is not greater than 1 so it is Not Prime
Example 3
Input
2
Output
Prime
Explanation 2 is the smallest prime number divisible only by 1 and 2
Acceptance—
Accepted0
Submissions0
Auto-save
SavedLn 1, Col 1
Submit a solution to see its status here.
Input
Expected Output
Prime
No results yet
Run your code to test it against the sample cases.