Programming Examples

Python program to calculate the sum of odd numbers divisible by 5 from the range 1 to 100


write a program to calculate the sum of odd numbers divisible by 5 from the range 1..100

Solution

sum=0
for i in range (1,101,2):
    if i%5==0:
        sum=sum+i
print("Sum of odd numbers divisible by 5 from range 1 to 100 is : ",sum)
Output

Sum of odd numbers divisible by 5 from range 1 to 100 is :  500

Online Exam Quiz for One day Exam Online Typing Test CCC Online Test 2026 Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Best Website and Software Company in Allahabad