Answer to Question #292684 in Python for Raj

Question #292684

to input a number and print all numbers from 30 to 60 that is divisible by the input number



1
Expert's answer
2022-02-01T06:23:03-0500
def result(N):
    # iterate from 0 to N
    for num in range(N):

        # There are the number can be devided by 3  and 5
        if num % 3 == 0 and num % 5 == 0:
            print(str(num) + " ", end="")

        else:
            pass


if __name__ == "__main__":
    # input goes here
    N = 100

    # Calling function
    result(N)

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