Я вполне уверен, что причина этого в том, что вы печатаете сумму денег, которую вы сохранили в файл. В общем случае вы не хотите изменять длину объекта, по которому вы выполняете итерацию, потому что это может вызвать проблемы.
account1 = BankAccount()
file1 = open("data.txt","r+") # reading the file, + indicated read and write
s = 0 # to keep track of the new savings
amount_saved = []
for n in file1:
n = float(n) #lets python know that the values are floats and not a string
z= math.ceil(n) #rounds up to the whole digit
amount = float(z-n) # subtract the rounded sum with actaul total to get change
amount_saved.append(round(amount,2))
s = amount + s
x = (account1.makeSavings(s))
for n in amount_saved:
print(" Saved $",round(amount,2), "on this purchase",file = file1)
Это напечатает суммы, которые вы сохранили в конце файла после того, как закончите итерацию по нему.