We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
I ended up doing the exact same thing, except my method starts with a 'fine' variable equal to zero, and it gets set under the different conditions. Default is to return no fine. I'm not a big fan of multiple returns in a single funciton.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Library Fine
You are viewing a single comment's thread. Return to all comments →
I ended up doing the exact same thing, except my method starts with a 'fine' variable equal to zero, and it gets set under the different conditions. Default is to return no fine. I'm not a big fan of multiple returns in a single funciton.