Ad
  • Default User Avatar

    This kata should be renamed 'time machine stock billionaire' for more flare.

  • Custom User Avatar

    Approved! ;)

  • Custom User Avatar

    Approved! ;)

  • Default User Avatar

    I actually thought about it a little bit.
    So to eliminate the biggest misunderstandings, it would be easiest, but I don't say best, to throw the stock story around it overboard.
    If this story remains, that is definitely what should be adjusted most urgently.
    What I specifically suggest immediately in the error message:
    The statement "... quotes: expected 19180 to equal 32786"
    I must admit, yes, it is not wrong, but unsettles at first, especially because you are used to it differently from other Katas.
    Just very simple and you have saved many people a few minutes of thinking about it ^^ :
    "... quotes: expected 32786; your result: 19180 "

  • Default User Avatar

    I was also bothered by it at first, but the truth is that a task is offered here, no matter what the story is around it. Often the background plays a role, but sometimes actually not. And this can be seen as such and is part of the training to recognize it as such. That's how i try to see it. You can also see that the author just tried to package it nicely for us, or I can imagine that banks want to have such programs purely for statistical reasons and not for the development of investment strategies? Would be even logical. Of course, after a week of e.g. share trading and not in advance.
    Whereby something like this could be used for setting and calculating stop-loss orders - something like this really exists btw.

  • Custom User Avatar

    Each day, you can either buy one unit of stock, sell any number of stock units you have already bought, or do nothing. Isn't it clear?

  • Default User Avatar

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

  • Custom User Avatar

    https://docs.python.org/3/library/math.html#math.pow

    Unlike the built-in ** operator, math.pow() converts both its arguments to type float. Use ** or the built-in pow() function for computing exact integer powers.
    
  • Custom User Avatar

    Max Buffer Size Reached (1.5 MiB)

    Remove print statements and it will pass... There's no magic here.

  • Default User Avatar

    Well, if you can't reproduce the code in question, a question remains as to whether that same code worked with all the print statements in place (because that's what causes a buffer error as detailed by @natan). So, do you remember removing the print statements before re-running the code?

  • Default User Avatar

    there was no difference between 'fail' version code and 'pass version' only after I 'unlock solutions' did it work tho. Not being beligerant just not sure what you mean....

  • Default User Avatar

    If you mean

    Max Buffer Size Reached (1.5 MiB)

    Then you're writing too much output.

  • Default User Avatar

    consistant 'buffer error' 1.5mb. is that...clientside? I'm new to coding however I cant learn anything from this because I cant reproduce. Seems like more than a few others have a similar error. Happened always on test 118 until I 'unlocked solutions' with not 1 iota of difference between the code before and after, not to mention the other two methods I tried.

  • Custom User Avatar

    @MobulaKuhlii...Well ,

    • Thanks for Notifying, and I'm Awfully sorry for being that late to respond as I've Been busy For the Last couple of Months/Years/Centuries or So :smile:

    • Revised and Fixed to Match The Description Constraints and Notes :wink: :+1:

    • Hope you've Enjoyed This Humble Kata, Sum of Two Integers as Well :wink:

    • Wish you all the best On/Off Cw .. Regards .. Zizou

  • Custom User Avatar

    @hitch-

    Since this problem relies on optimization to pass all test cases, I'd rate 6 Kyu, not 7.

    • Yes, I Agree With you, Since Code Optimization requires an effective algorithm to attempt the problem and pass all the tests, that's Why the Average assessment of this kata before being approved was 6kyu , But I think you're not standing alone with this opinion Because many other Who've Solved this Problem Posted the Same Words, 1,2, 3,4 , But unfortunately its moderators' matter :pensive: .

    • Hope you've enjoyed this humble kata, Form The Largest , See You Next Happy Year , .. :wink:

    • Wish you all the Best On/Off CW .. Regards .. Zizou

  • Loading more items...