I managed to solve the above BUT have another problem if anyone could look at it:
while True: x=float(input("First number: ")) y=float(input("Second number: ")) z=float(input("Third number: ")) x=int(x) y=int(y) z=int(z) pf=(int(str(x)+str(y))*10**z) print(pf) print(float(pf*10**-3)) print(float(pf*10**-6)) replay=input("Would you like to calculate again? (yes/no) ") print('\n') if replay=="no": print("...Terminated Program.") break print('\n')
The problem is shown in the outcome below:
First number: 1 Second number: 0 Third number: 4 100000 100.0 0.09999999999999999 Would you like to calculate again? (yes/no)
As can be seen in line 6, the result I get is supposed to be 0.1 but is instead a long decimal which is, technically equal to 0.1 if it is recurring, but I would rather it simply say 0.1. Anyway, this result is from line 14 in my script - any ideas how to adapt that line in order to solve my problem?