So for my half year project about pi I made a simple checking program, that opens a file that is stored in the same folder, and an input, then is compares those and checks how many are the same, and stops if one isn't.
Code:
now, when running this in the regular python interpreter it closes basically instantly. when run in cmd it does work perfectly, (the inputs wait for enter key).
now why doesn't this work in the regular python interpreter?
Code:
data=open("PI100000.txt", 'r').read()
data2=input("Import number: ")
i = 0
while i < len(data) and i < len(data2) and data[i] == data2[i]:
i += 1
printx=str(i)+" Decimals of PI are correct"
print(printx)
input("Press enter to exit...")
now, when running this in the regular python interpreter it closes basically instantly. when run in cmd it does work perfectly, (the inputs wait for enter key).
now why doesn't this work in the regular python interpreter?