https://docs.python.org/3/tutorial/floatingpoint.html
and 
https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html 

On Sunday, 8 March 2020 21:26:50 UTC+1, SarahC5 GoRonix wrote:
>
> Hi, my name is *Veronica*, I am new to Python programming.
> I am using Spyder, and here is what is in my code.  It's giving
> me the *wrong output:*
>
> *EDITOR___*
> num1 = input("Enter a number: ")
> num2 = input("Enter another number: ")
> result = float(num1) + float(num2)
>
> print(result)
>
> *CONSOLE_____________*
> Enter a number: 4.4
>
> Enter another number: 2.2
> 6.6000000000000005
>
> *QUESTION________________*
> Why is this the output?  It's supposed to be 6.6
> Why is it adding those zeros and the five at the end?
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"spyder" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/spyderlib/b1d80bf7-1ce3-4377-bed2-1282c2366b6e%40googlegroups.com.

Reply via email to