We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ff13d8a commit d620d3aCopy full SHA for d620d3a
TimedMathGame.rb
@@ -24,7 +24,7 @@ def passed
24
if timer.passed >= time_limit
25
puts "\nSorry, you've run out of time."
26
puts "You got #{correct} correct, and #{incorrect} incorrect."
27
- puts "Your final grade is #{(((correct+incorrect).to_f/correct)*100).round}%"
+ puts "Your final grade is #{((correct/(correct+incorrect).to_f)*100).round}%"
28
exit
29
end
30
@@ -43,5 +43,4 @@ def passed
43
puts "I'm sorry, the correct answer was #{num1 + num2}."
44
45
46
-
47
0 commit comments