my $percent = $answers_correct / 50; $percent = sprintf("%.2f", $percent); print "You scored $percent%";