I've coded a program to calculate the Riemann zeta function of a number. This is a school assignment and it requires me to implement a 'yes or no' loop so that the user can input another number without exiting the program. I got the inner loop to work and the calculations match with Wolfram Alpha's one. But when I put a loop to repeat the program, all the computations remain the same e.g. if I enter 3, I get 1.202. If I enter 1.5, I still get the same answer.
You're not resetting the values of zeta and num for each new calculation. At the start of the second calculation, they are still set to the values they had at the end of the first one, and so on.
The point is, each time you do a new calculation - because the user types "Y" - you need to reset them at the start. Can you see where in your program you start doing each new calculation? (Hint: What have you changed in your program to make it do more than 1 calculation?)