Composite Number
This Program name is Composite Number. Write a Python program to Composite Number
The below link contains Composite Number question, explanation and test cases
https://drive.google.com/file/d/1XrSRAXys8kKSTYMSm58aED455XD_i4tm/view?usp=sharing
We need exact output when the code was run
num = int(input())
if num > 1:
for i in range(2, int(num/2)+1):
if (num % i) == 0:
print(True)
break
else:
print(False)
else:
print(True)
Input 1:
12
Output 1:
True
Input 2:
3
Output 2:
False
Comments
Leave a comment