Answer to Question #207813 in Electrical Engineering for sarah

Question #207813


Write and execute a PYTHON program to perform the following tasks.

1. Find the sum of all numbers below 1000 which are multiples of 3 or 5 in Python


1
Expert's answer
2021-06-17T07:37:36-0400
sum=0
for (i in range(0,1000)):
  if (i%3==0 or i%5==0):
   sum=sum+i
print(sum)

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