to input a number and print all numbers from 30 to 60 that is divisible by the input number
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)
Comments
Leave a comment