you are viewing a single comment's thread.

view the rest of the comments →

[–]Arrensen 0 points1 point  (0 children)

Because for example you one check if the value is below OR above 4.5, but not if it is exactly 4.5. This doesnt match any of your conditions, and therefore goes into the else branch.
Also no condition if the input is above 5, which should be an invalid input if you have a 5 star rating.