I am having a calculation problem.
main_value = 4.4789
Now i want to compare this value with a user input value
user_input = 4.5
if main_value >= user_input:
print('yes')
else:
print('no')
The problem is i'm displaying the main_value in single digit precision in GUI (4.4789 gets rounded and displayed_value = 4.5)
so when comparison is made the display shows 4.5 but prints NO...
how do i solve this!!!
Should i use Decimal module (please with an example) or any other simple method is there??
Thanks!!