Ad
  • Custom User Avatar

    cuz "C" appears twice (once in camel, and another in case) so ur code substitutes it twice (replace will replace all occurrences, read https://www.w3schools.com/python/ref_string_replace.asp . hope this helps !

  • Default User Avatar

    I just solved this kata in Python to see what's going on - I wrote everything myself, no imports, and it works fine.

    However there are 1-2 tests which are a bit "unexpected" for a 7 kyu: it's not mentioned in the Description, but you need to handle cases where input is not a string.

    To troubleshoot and understand what I'm saying here, you can print the input that the tests are using: to do this, type:

    def check_coupon(entered_code, correct_code, current_date, expiration_date):
      print(entered_code, correct_code)
      print(current_date, expiration_date)
      # rest of your code here bla bla
    

    then in console you'll be able to see which inputs you are failing on.

  • Custom User Avatar

    No example, no proof... Are you aware this is a pointless message?