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.
What abt thease brackets inside the parentheses, could you explain why he puts parenteses if he's reffering to the array, and why putting - between the two extremes of the array and most importantly, why the hell it works inside the two double quotaions :) m just curious to know more about thease notation :)
Fixed.
Maybe, but speed isn't usually particularly important with this kind of string replacement. Your solution appears to be about 9x faster, which might matter in some cases, but definitely doesn't for this kata-- or most real-world applications-- but 8 lines vs 1 for a simple string character replacement function does. 2.6 million operations/s is plenty.
I did finish it using 0.082 for R. I would argue though that the description does not say it is, but rather a calculation where one of the factors is 0.082.
Those are units, and the only one left is
atm
when you return the pressure.R
is a constant.Excactly where does R come from ?
The description says "R=0.082dm3⋅atm⋅K−1⋅mol−1", but atm isn't anywhere to be found. Unless you count the return value.
Being a level kyu8 kata it couldn't hurt to give up the number intended used for mol and atm.
both approved
Parameter names are fixed in this C fork and this NASM fork.
lst.reverse()
reverses the list in-place, see this manual.Try
print(lst)
after callinglst.reverse()
, you'll see the difference.gM
are given mass,mM
are molar mass, and they are given in the same order as in the "Input" paragraph of the description.But you are right, they are confusing, I will add some description.
This comment is hidden because it contains spoiler information about the solution
That's not a quadratic equation to start with, it's a linear one. Wikipedia