Answer to Question #279196 in Python for Varaprasad

Question #279196

write a program to print sum of the numbers divisible by the given number T from M to N in python


1
Expert's answer
2021-12-13T10:21:18-0500
# Python 3.9.5

T, M, N = input("Enter T, M and N space separation: ").split()
counter = 0
for i in range(int(M), int(N)+1):
    if (i % int(T) == 0):
        counter += i
print(counter)

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