7 kyu

Thinkful - String Drills: Jedi name

Description
Loading description...
Fundamentals
  • Please sign in or sign up to leave a comment.
  • ejini战神 Avatar

    Python new test framework should be used with 3.8 enabled

  • rc_dolezal Avatar

    I was trying to select digit from the string like an index function. Program isn't having it... Here is my try:

    def JediName(first,last) return "Greetings, Master {}{}".format(last[:3], first[:2])

  • nbeck Avatar

    Some translations here:

    Please review and accept if ok.

  • kazk Avatar

    The expected values of 2nd and 3rd example test cases are wrong. (have first and last flipped)

    Test.assert_equals(greet_jedi('Chris', 'Angelico'), 'Greetings, master ChrAn') # expected value takes three letters from first name
    
    Test.assert_equals(greet_jedi('grae', 'drake'), 'Greetings, master GraDr') # Same. Doesn't match the description
    
    • Grae-Drake Avatar

      Yup, mixed those up. Went back and fixed the real tests but not the examples. Do you know if there's a way to run those example tests? Happened a couple times to me now where I fixed the real tests but missed updating the examples :/

      Issue marked resolved by Grae-Drake 9 years ago
    • kazk Avatar

      Confirmed the fix :) I'm not sure. How about trying it out yourself after publishing? Click "TRAIN AGAIN", paste reference solution and "RUN EXAMPLES"?

    • suic Avatar

      @kazk: Good advice :) I can be wrong but as I remember the example tests were also tested against the reference solution when one pressed (Re-)Publish. This isn't the case anymore. I'll raise a github issue to "restore" this behaviour as this could prevent similar issues and oversights.

      Regards,

      suic

    • kazk Avatar

      @suic, testing on every (re)publish and only allowing valid katas to go public will be the best, but any warning/status indication should help a lot :) It seems too easy to overlook even for careful authors. Thanks for the github issue