above every function you need to write a comment what the function does, except the comment is just a exact copy of all the comments inside the function
jokes aside i actually did spend an unreasonable amount of time studying the nontransitive cyclical relationship between rock paper scissors elements, trying to give them names / "numbers" that represent their place
I think the idea with the laser mirror is that the mirror reflects some of the beam back into the laser device. It might break itself too but at least it can damage the device
it doesnt imply anything about the game :P it wasnt very useful as an experiment
@mousetail i also tried vectors but it also didnt seem analogous to the game with various operations, or again i was too stupid to find the relationship
i spent a lot of time on this but i didnt know what i was doing XD
Write a program/function that finds the amount of fuel needed to escape Earth's gravity well given the exhaust velocity of the fuel and the amount of mass to transport using the Tsiolkovsky rocket equation:
$$\Delta v = v_\text{exhaust}\ln\dfrac{m_\text{start}}{m_\text{end}}$$
where
\$\Delta v\$...
@mathcat the idea seems solid if a little easy. some of the phrasing is a bit weird, "An advantage with parity bits is, that they can't detect errors only when a multiple of n bits have been altered." seems like not an advantage? theres a couple other parts like this, im nitpicking though
Prime checksum
Given a message, append a checksum digit using prime numbers as weights.
A checksum digit is used as an error-detection method.
Take for example the error-detection method of the EAN-13 code:
The checksum digit is generated by:
Multiplying each digit in the message alternating by ...
Okay so, my golfing languages are going to have two number types, floats and ints
Any time they're used together, a float is returned
If an arithmetic operator is given no inputs, for example, add(), should it return a float or an int?
A float would make sense since that's the "main" number type, but an int would make sense since it's more of a recessive trait, and will keep the type of whatever it's added to (so it behaves more like a no-op)
Given a potentially recurring binary string, output the number it represents, as a fraction in lowest terms. The notation used in this challenge for recurring digits is non-standard. An ...
This is a fixed output challenge. It is similar to a standard Kolmogorov complexity challenge, except you get to choose your own fixed output. Given no input, output 55 fruits. You may choose an...