I have been recently trying to make a calculator in python and added floating points in it but unfortunately it gives me for this simple code
print(0.1 + 0.2)
out put
0.30000004
I have searched a lot for it in stackoverflow but I keep getting questions about why it happened and not how to fix it. Edit: a lot of people have been recently giving me private feedbacks about this already exists I appreciate that to improve stackoverflow but there are no questions most of them are explanations about why it is happening and not how to fix it. some of the feedbacks have got even questions that are not python