WAP to add all the numbers between 1 to 50 that are divisible by 2,3 and 5 in python.
Share
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.
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: