Input box problem

Lea22 shared this question 2 months ago
Answered

So I want to link input box with the given input - and condition a text that shows when the input is correct.

It all worked fine, but for some reason it doesn't work for decimal numbers.


For example:

if r=2.86, when i put "2.86" into the input box properly linked (input1), the text i conditioned with (input1==r) doesn't show even when it should.

However, it works fine for integers.... but i have problems with decimal numbers.

I'll attach a file.

Thanks in advance!

Comments (4)

photo
1

are you sure that this 2.86 in the example isn't a rounded value?If your setting is on 2 decimals the values shown in the Algebra show rounded but can be different in reality. So if you want to compare input with a decimal decimal solution, first round your solution yourself to be sure that 2.86 is really 2.86

chris

photo
1

Yesss, that was the problem! Thank you!

photo
photo
1

ie: redefine r = round(RandomUniform(0, 3.5), 2)

photo
1

Thank you so much! :D

photo
© 2019 International GeoGebra Institute