I am trying to get all of my answers/numbers to be outputted to my .txt file, but I am only getting the last value in the set for each of the values, where did I go wrong?
You are only writing to the file on lines 46-48. If you want to output thosethe same variables for each iteration of the loop you could move those lines inside the loop.