Participation to the Coding Challenges series

(this topic was originally posted in #off-topic but people who couldn’t access that wanted to see it so I moved it here, the post will be removed or unlisted once a staff notices it)

So I’m sure some of you know the Coding Challenges series. I’ve been kinda slackin’ with it lately, mainly because my brain is too smol to come up with intriguing ideas, and I don’t find much time to make the challenges.

Which is why I’m happy to let anyone continue with the series and participate with his own challenges! There are currently 7 challenges, and you can continue with the rest with the 8th challenge being the next one! I think this way there would be a diversity and much more challenges.

So, how do you write the challenge? Well:

  1. A title and introdution to the challenge, the title would just be the “Coding Challenge #x” where x is the challenge’s number. The introduction is just a small 2-line paragraph saying somthing about the challenge, like if it’s easy, or different from what you’ve last seen, or maybe an update or a new change to the challenges you make. Say anything that you find fitting. Then, the rules, I’d recommend you enforce the 3 rules I do in each challenges, which are seen in the image below, but you are free to edit, remove, or add more rules!

  1. The challenge’s structure, usually I just give a small chunk of text that’s straight to the point and tl;dr friendly, in the form: Write a function f(x, y), that takes two numbers x and y (for example) where x>0 and y<0 (add some constraints if you need to), and return the sum of the two numbers (the challenge's main task). Of course this is an example, a challenge isn’t as simple as a sum up two numbers challenge!! The challenges vary in difficulty, you’re free to do a hard or basic challenge. For beginners, or experts, or anyone. You can go to some previous challenges to see how I word them. Then, I tend to explain further what the challenge wants you to do, especially for beginners and those who haven’t got the gist from the straight to the point chunk of text. Include images if you want! And finally, I add some examples to the challenge to see the expected output:
f(1, 2) --3
f(8, -5) --3
f(9, 10) --19
f(9, -18) -- -9

  1. The challenge’s closing sentence, I normally just say “Thank you for doing the challenge” or something like that, and I link a github version of the challenge (not really needed) and a link to the Coding Challenges list topic (this one). I also include my signature! It would really be cool if you do that as well if possible, just visit some website like this and you should have it (make the background transparent hehe!).

  1. The solution! First of all, make sure to wrap it with a “Hide Details” to not spoil anything, the solution can be just posting the piece of code, commented if you want, no problem, but if you wanna include an explanation, you’re free! The solution is required obviously.

That should be it! Thanks a bunch. If you feel like participating to the series, simply DM me in any way with the first challenge you wrote, just so I can give you advises and fixes to be sent afterwards, and from that point on, after the first one you wrote, you can freely post challenges without my permission!