Answer:
n = int(input())
total = 0
for i in range(0, n):
if is_prime(n):
total += n
print("Total of first", n, "primes is", total)
Explanation:
Define n as an input variable, simply iterate through all numbers from 0 to n, adding them to a running count if the number is a prime as defined.
If you need code for checking if a number is prime - then please let me know.
Hope this helps!