Guest User

Untitled

a guest
May 24th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. mlist = []
  2. for x in range(1, 1000):
  3. if x %3 ==0 and x % 5 ==0:
  4. mlist.append(x)
  5. elif x % 3 ==0:
  6. mlist.append(x)
  7. elif x % 5==0:
  8. mlist.append(x)
  9.  
  10. print(sum(mlist))
Add Comment
Please, Sign In to add comment