0 0 Minni Asked: March 24, 20222022-03-24T14:31:34+05:30 2022-03-24T14:31:34+05:30In: Python WAP to add all the numbers between 1 to 50 that are divisible by 2,3 and 5 in python. 0 0 WAP to add all the numbers between 1 to 50 that are divisible by 2,3 and 5 in python. pythonpython programmingwap to add all the numbers between 1 to 50 that are divisible by 2 3 and 5. Share Facebook 3 Answers Voted Oldest Recent Luxx 2022-03-24T14:47:10+05:30Added an answer on March 24, 2022 at 2:47 pm This answer was edited. sum = 0 for i in range(1,50): if i%2==0 or i%3==0 or i%5==0: sum = sum + i print("Sum : ",sum) Minni 2022-03-24T15:32:52+05:30Replied to answer on March 24, 2022 at 3:32 pm Thanks buddy.❤️ I'M ADMIN 2022-03-24T15:48:30+05:30Added an answer on March 24, 2022 at 3:48 pm FOR ERROR-FREE CODE YOU CAN ALSO CHECK BELOW ATTACHMENT: Attachment Leave an answerCancel replyYou must login to add an answer. Username or email* Password* Remember Me! Forgot Password?
sum = 0
for i in range(1,50):
if i%2==0 or i%3==0 or i%5==0:
sum = sum + i
print("Sum : ",sum)
Thanks buddy.❤️
FOR ERROR-FREE CODE YOU CAN ALSO CHECK BELOW ATTACHMENT: