Challenge #1: What does this relevance do? (answer provided)

This relevance takes a provided integer ?? and returns a different integer as a result.

What does this relevance do? I’m looking for what the integer represents that is returned.

(if (it = 2) then /* It is Complicated */ 0 else ( if (it < 8) then (30 + it mod 2) else (30 + (it + 1) mod 2 ) ) ) of ??

Hint: Try some numbers, like 0 through 20 in the debugger. Not all results from all numbers matter for this particular use case.


Click here to see the answer

The integer values for ?? is the number of the month of the year. The result of the relevance is the number of days in that month. February is not handled due to it being a complicated case.


Correct answers:

I’m not going to list any more correct answer submissions because I’m going to provide the answer collapsed above.


Other Challenges:

5 Likes

Hint: Try some numbers 1 through 20 in the debugger. Not all results from all numbers matter for this particular use case.

I’m a bit torn about giving the answer here. I’ll have to think about that, but definitely message me directly through the forum if you are interested in the answer.

Also, I have some ideas for the next challenge.

Would you consider putting the answer in a spoiler? Like this?

Click me to spoil the fun

Answer to question!

1 Like

Oh, I like that. I think that is a great option.

The answer is now available in the post.

Challenge #2: Challenge #2: Provide equivalent relevance using different inspector