Ad
  • Default User Avatar

    You should change the order of ifs in the case 100

  • Custom User Avatar

    AHHHH I see now. Sorry, I had a mental block on this one. Thank you.

  • Custom User Avatar

    if someone hands over $100 for a $25 ticket, they've handed you the $75 change they're due

    What?? They handed you 100, not 75. And you're supposed to give out change, not the customer. You can't give back change of 75 when you only have 25 from first customer.

  • Custom User Avatar

    No, they pay you with a 100 dollars bill. And you only have the 25 dollars bill of the previous client.

  • Custom User Avatar

    Test.assertEquals(tickets([25, 100]), "NO");

    ...if someone hands over $100 for a $25 ticket, they've handed you the $75 change they're due. There would be no need to make change from the drawer.

    RIGHT??

  • Custom User Avatar

    When posting code you should mark your message with spoiler code.

    You can give back 3 25s when given a 100 dollar bill. If you actually have the bills.

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution