Answer:
The solution code is written in Python
Explanation:
Given a function isPrime to check if the input number, num, is a prime (Line 1 - 5). Create the variable n and set it to 1000. Create variable k to hold the number of prime numbers which are added before the total exceed n (Line 8).
Create a while loop and set the loop condition to ensure the loop will keep going until the total of prime value exceed n (Line 12). Within the loop call the isPrime function and if the current input value is a prime, add the value to total and increment k by one (Line 13 - 15). Increment value by one before proceed to next iteration (Line 17).
Lastly, print the value of k (Line 19) and the sample output value is 36.