Posts by Welisson SM • 1 point
1 post
-
0
votes3
answers693
viewsQ: I can’t make the sum of the first 100 prime numbers, where am I wrong?
#python3.7 cont = 0 cont_100 = 0 primos = 0 num = 1 soma = 0 while True: primos += 1 while primos != num: if primos % num == 0: num += 1 cont += 1 if cont == 2: soma += primos num = 1 cont_100 += 1…