Answer to Question #228187 in Python for kaavya

Question #228187

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.

Sample Input 1

5633

Sample Output 1

True

Sample Input 2

1000

Sample Output 2

False




1
Expert's answer
2021-08-22T00:27:15-0400
N=int(input("Enter an interger: "))
if (N%2==0 or N%3==0 or N%5==0 or N%7==0):
    print("False")
else:
    print("True")

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