Hi ! Can anyone help me out on this one ?
I'm setting up a quiz for students and want to evaluate their answers with a simple percentage function.
I created three variables:
Tries shows the number of attempts
Correct shows the number of correct answers.
Percent shows the correct percentage.
I set up the variable percent using th Math.floor function to round it down to the nearest integer :
percent=Math.floor(Correct/Tries*100)
The variables
Tries and
Correct display correctly, but when , for example you get 8 out of 8 correct , the variable
Percent displays 111 or 114
Did I set up the function correctly or am I missing something ?