Answer to Question #231095 in Python for umesh

Question #231095

Uncommon Number

Given a number

N, find whether the number is common or uncommon. A number is considered uncommon if it is not divisible by any of the single-digit primes.Input

The first line of input is an integer

N.Output

The output should be a single line containing

True if it satisfies the given conditions, False in all other cases.Explanation

In the given example,

N = 5633 the number is not divisible by 2, 3, 5, 7. So, the number is an uncommon number.Therefore, the output should be

True.


1
Expert's answer
2021-09-01T07:54:35-0400
n = int(input())
common = True
for i in (2, 3, 5, 7):
	if (n%i) == 0:
		common = False
		break
print(common)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS