I have a method which take two arguments. A value (fixnum) and a boolean.
However, line 4 isn't returning "C" and is returning "D". It isn't recognizing the boolean value and I am unsure why?
def grade(num_books, reads_books)
if num_books < 10
return "D"
elsif num_books < 10 && reads_books == true
return "C"
elsif num_books.between?(10, 20)
return "C"
elsif num_books.between?(10,20) && reads_books == true
return "B"
elsif num_books > 20
return "B"
else
return "A"
end
end
grade(9, true)
num_booksis either below 10, or between 10 and 20, or above 20. There isn't another "else" that could be met.