the script runs fine, but only records the last result in the .txt file. What am i doing wrong?
a= float(input('Insert a: ')) b= float(input('Insert b: ')) for c in range(10,300): d= float(46+(9*a)-(7*c)) e= float(-6+(463*b)+(-1*c)+(0.8*a)+(0.89*d)) print(d) print(e) import sys sys.stdout=open("loop.txt","w") print(d) print(e) sys.stdout.close()
dandehave the last computed values.