Quick Links: Gideros Home | Download Gideros | Developer Guide
convert score to percentage
  • I have a simple question and answer game. How can I get the percentage of correct answers and store in a variable?
  • hgy29hgy29 +1 -1
    If you know the number of correct answers A and the number of questions Q, then you can compute the percentage of good answers P with the following formula : P=100*A/Q
  • Thanks hgy29. Is there a way for the returned percentage to leave out the decimal places and round it to whole number?
  • keszegh +1 -1
    do you mean
    math.floor (P=100*A/Q )
  • Math.floor works to round down or math.ceil to round up but im having trouble rounding to nearest number. Floor for < 0.5 and ceiling for =>0.5

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Login with Facebook Sign In with Google Sign In with OpenID

In this Discussion

Top Posters