I made this code for project Euler (its in the first 100, so allowed to ask here I believer), but it is veeery slow. I believe it should work, but I would like to make it go faster. I feel like it would take an hour to finish. Here is the code in python.
guess=2
prime=True
total=0
while guess<2_000_000:
prime=True
for i in range(2, guess):
if guess%i == 0:
prime=False
if prime:
total+=guess
guess+=1
print(total)