This is the python script I ended up with:
x=0
for i in range(1, 1000):
if i % 3 == 0 or i % 5 == 0:
x=x+i
print x
If you found this little bit of code helpful, then please consider donating so that I can continue coding.
You can donate here
No comments:
Post a Comment