Check Prime

Easy
0/40
0 upvote

Problem statement

Given an integer, check if it is prime or not. Return True if the number is prime, otherwise False.


Note:
No need to print anything; it has already been handled.
Detailed explanation ( Input/output format, Notes, Images )
Input Format:
The first line contains a single integer 'n'.
Output Format:
Return True if the number 'n' is prime otherwise False.
Sample Input 1 :
7
Sample Output 1 :
 True
Sample Input 2 :
15
Sample Output 2 :
 False
Check Prime
Full screen
Console