这是我下面代码的一部分,无论如何,这是唯一不起作用的东西。我很困惑。
def change_numbers_to_grade_points
@course_grades.each do |grade|
case
when grade < 100 && grade > 93.99
grade == 4.0
when grade < 93.99 && grade > 89.99
grade == 3.7
when grade < 88.99 && grade > 86.99
grade == 3.3
when grade < 86.99 && grade > 82.99
grade == 3.0
when grade < 82.99 && grade > 79.99
grade == 2.7
when grade < 79.99 && grade > 76.99
grade == 2.3
when grade < 76.99 && grade > 72.99
grade == 2.0
when grade < 72.99 && grade > 69.99
grade == 1.7
when grade < 69.99 && grade > 66.99
grade == 1.3
when grade < 66.99 && grade > 59.99
grade == 1.0
when grade < 59.99 && grade > 0
grade == 0.0
else
puts "Something went wrong with conversion!"
puts
end
end
end