Ad
  • Custom User Avatar

    My code passed the testing phases but is showing up nonesense characters(like a square with cross in it) after some characters in my output when I attempt it. The characters aren't displaying in this comment so I'll just make a bracket at places that those strange characters appear.

    Error Message :
    Incorrect answer for input: "fhGdEgEaBdgeehehGghbheghGagcab"
    Expected: "fh Gd Eg Ea Bdgeeheh Gghbhegh Gagcab"
    Actual: "fh Gd() Eg() Ea() Bdgeeheh Gghbhegh Gagcab"

  • Custom User Avatar

    If the score < 0, return 0.

  • Default User Avatar

    My code is passing some tests but a couple of them are kicking back. Logs and test below, I can't make sense of it!
    I think the test value is incorrect in this case?

    Log
    Question 1:
    Wrong answer, -1 point
    Score is now -1

    Question 2:
    blank answer, 0 points
    Score is now -1

    Question 3:
    blank answer, 0 points
    Score is now -1

    Question 4:
    Wrong answer, -1 point
    Score is now -2

    total points is -2

    Test Failed
    Should return 0 with ["b", "d", "a", "c"] and ["a", "", "", "b"]
    Expected: 0
    But was: -2

  • Custom User Avatar

    Thank you guys! Appreciate it!

  • Custom User Avatar

    No you don't. It depends on how kata is authored, and one possibility is to print inputs from your solution.

  • Custom User Avatar

    I think you'd need to subscribe for a premium account

  • Default User Avatar
  • Custom User Avatar

    (condition) ? (if true, do this) : (otherwise, do this)

    This is the ternary operator.

  • Custom User Avatar

    Hello! I'm learning myself how to program in C. Can anyone explain me what the code below means? I've passed the test but I found out that many people use this statement in solutions and I don't know what it means. Thanks in advance!
    return score > 0 ? score : 0;