Write a python program to find the sum of all the primes below hundred.
3)b)Write a python program to find the sum of all the primes below hundred.
upto = 100
sum = 0
for num in range(2, upto + 1):
i = 2
for i in range(2, num):
if (int(num % i) == 0):
i = num
break;
if i is not num:
sum += num
print("\nSum of all prime numbers upto 100:", sum)
Comments
Post a Comment