Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Lua translation
Lua translation!
Thanks!
Hi brodiemark, I have inserted the missing loop. Thanks.
Hi metatable,
Thanks for the translation. Looks good, except for one thing. One of the loops when generating the boy times is missing: "Then randomly increase boy_start (while boy_end is fixed) until boy_start is close to boy_end. This furthers increases late prob." As a result the probabilities jump from less than 50% to 100% immediately. Would you mind inserting that?
Thanks,
brodiemark
Thanks!
Lua translation!
was approved some time ago
I've made some changes.
Thank you for help!
Approved
litres
.math.randomseed(os.time())
to the random tests. Currently, the random tests are the same every time the test run.assert.are.same
. For exmaple,assert.are.same(0, litres(0), "litres(0) should return 0")
.for _ = 0, 50 do
looks a little weird to me. It generates integers from 0 to 50 (inclusive), 51 integers in total. If you wanna generate 50 integers, you should usefor _ = 1, 50
instead. You can ignore this though.Approved
Approved, thank you 🙏
I see! Good to know, thank you.
Hi, I don't know how to do the exactly the same thing in Python, but you can add the named argument
allow_raise=True
to assert functions. This displays the error message in CW's fail format and raise an exception to terminate the test.Loading more items...