Answer to Question #221737 in Python for Hari nadh babu

Question #221737

Indivisible Numbers


This Program name is Indivisible Numbers. Write a Python program to Indivisible Numbers


The below link contains Indivisible Numbers question, explanation and test cases


https://drive.google.com/file/d/1f7eIquKcLG9PWczki8tG3PWLRrqX3HR1/view?usp=sharing


We need exact output when the code was run

1
Expert's answer
2021-08-04T07:35:23-0400


def isDivisible(K):
    counter=0
    for n in range(2,11):
        if K%n==0:
            counter+=1
    return (counter>0)


N=int(input())
indivisibleNumber=0
for K in range(1,N+1):
    if not isDivisible(K):
        indivisibleNumber +=1
print(indivisibleNumber)




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