You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: