Ad
  • Default User Avatar

    Example:
    Quis custodiet ipsos custodes ?
    When i = " " after custodes
    a = "uisQay ustodietcay psosiay ustodescay "
    b = ""
    Then i = ?
    So the script go else:
    a = a = a + b[1:] + b[0] + "ay" + i
    But b is null so index 0 or 1 don't exist.

    PS:
    In your line if i.isalpha() and i != " " and i != "!":, and i != " " and i != "!" is unuse. If i is a letter, it's not a space or !.
    PPS:
    a = a + b[1:] + b[0] + "ay", just before return, isn't necessary, when the last character is a ponctuation.

  • Custom User Avatar

    I think the same than you, maybe its correct because they dont put a test in order like you write but its a posibility so for my is not the correct answer

  • Custom User Avatar

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

  • Custom User Avatar

    because if you have number<0 you need return 0. Why are you check if i < 0: in your loop?

  • Default User Avatar

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