Ad
  • Default User Avatar

    In python, for input === ===snake========= i get 'snake' should equal '??'. Why is that? Are 'complete' animals not counted or is it a mistake?
    Edit: sorry re-reading the description I understand now

  • Default User Avatar
  • Custom User Avatar

    Hi @johnkirch123,

    Firsly, when 20+ people already passed then you should suspect odds are it is a user error in your solution :-)

    If you supply exact details for the following it would assist anybody trying to help you:

    • what language?
    • what is the input to your function?
    • what is the output from your function?
    • what test failed?
    • what was the test error reported?

    Meanwhile, regarding the snake question I suspect you probably need to re-read the description which said

    ...if there are gaps or other parts that I don't recognise...

    Cheers,

    DM

  • Custom User Avatar

    For some reason in the trickytest it is supposed to return "??", but I am returning "snake" and there is no way to find out what the mistake is since I can't figure out how it would return a value when "snake" apparently should not be in the string, but it is somehow seeing it in the string. There is that problem and then the other says expected answer mo[o]se, but am getting mo[u]se or expected []cat, but getting [bob]cat. Not sure if I can message my code as I am pretty new to this site and am still pretty new to coding. Thanks for any help!

  • Custom User Avatar

    looks like you get a multidimensional array, i.e. int[][] arr = {{5,0},{8,3},{3,5},{2,1}};
    first int indcates people getting on bus, second int indicates people getting off bus. You can probably just do a for loop that adds all of the first
    integers and subtracts all of the second integers, should return just an int value of the remaining number of people on the bus.