Arquisoft / wiq_en1b

wiq_en1b
https://youtu.be/r2XqDUHj3zU
0 stars 1 forks source link

Fixing the numbers distractors #96

Closed UO289845 closed 2 months ago

UO289845 commented 3 months ago

The current method to create the wrong answers for the questions whose answers are numbers checks whether is an int or a float and does bassically the same but with integers or floats depending on which. A possible solution could be to simply leave it using floats, and then override the method in the specific class that uses integers. This new method will take the output of the parent method, and convert the float values into integers. To avoid problems, instead of being directly converted into integers, they can be converted into Strings, which then are splitted by the decimal point, and the String that remains at the left of the point is then converted into an integer.