• looks like u solved it in a long manner

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

  • thanks for the tip~

  • If you put print(CONVERSION_RATES) statement in your code you will see conversios rates in the console

  • am i supposed to define my own CONVERSION_RATES dictionary?, i dont see any rates or anything like that in the kata description...

  • How do you tell a number from binary code? Is there some kind of formula for this?

  • Fixed.

  • Python automatic tests are incorect. Instead of reqiuring digit in amount of currency, it requried long string: number of usd repeated coefficient (exchnage rate) times.

    It should work for random inputs too.: 'You now have 9560 of Armenian Dram.' should equal 'You now have 20202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020 of Armenian Dram.'
    

    Thus "You now have %d of %s." % (usd*coef,currency) does not works, and requred one with format call.

  • yes because nothing is freezable in python, so in this language, I just defined another dict for the test cases.

  • I see that in JavaScript and Ruby, but not Python. Is that intentional?

    Anyway, thanks.

  • Problem is I did not get any error messages when I tried to update the frozen object. Just the changes didn't go through and my tests failed. That's not nice. Error messages can't be fixed, description can.

    I can't see the description source, but it's a code block, so, yeah, two code blocks, say ruby and javascript, and any unspecified language wuill use the first one.

  • is that really necessary...? moreover, it's language specific, so... (yeah, "code block", I know)

    ?

  • Thanks.

    For bonus points, specify that CONVERSION_RATES is frozen in the description .. :P

    ( CONVERSION_RATES = Object.freeze({ ... }) )

    I'd do it myself, but I can't edit.

  • Loading more items...