What is a prime number?
A prime number is a natural number that is greater than 1 and cannot be formed by multiplying two smaller natural numbers.
Given a number num, we have to check whether num is a prime number or not.
Example:
Input:
num = 59
Output:
59 is a prime number
Input:
num = 123
Output:
123 is not a prime number
Program to check prime number in Python
Output
need an explanation for this answer? contact us directly to get an explanation for this answer