Saturday, September 26, 2020

sum of multiples of 5 or 3 for less than 100 in Python

total = 0

for j in range(1,100):

    if j % 3 == 0 or j % 5 == 0:

        total += j

print(total)

No comments:

Post a Comment

This post is about sharing a very good and kind and supportive experience from work. So usually once in a while like lets say after a week o...