It seems to be the community's fault that we give the readers an impression that you can ask anything and get answered, yet arbitrarily treat new users really bad.
I think the title of the former doesn't help.
We say we don't want "do this for me" questions, and this effectively has "do this for me" in the title. There isn't even a link like https://en.wikipedia.org/wiki/Ziggurat_algorithm to tell us what's going on.
At the same time the questions' scores are too extreme IMO. I don't downvote questions (in practice, it's not a decision). I flag/closevote if necessary and comment if I think the question isn't up to much. If I remember to come back after commenting and the question doesn't look like it's going to get better, it's probably worth a VTC as unclear/too broad/off topic. I just checked, and I've cast exactly one downvote here (on an answer that didn't answer the question). I'm quite sparing with my upvotes on questions too -- neither of these would be interesting enough.
Zarko's answer to the second listed question was posted in less than two hours (1h 34m, to be precise). Torbjorn's took about 25 minutes.
It's true that the question is of the “do-it-for-me” kind, but this should not restrain anybody to give an answer if they find the question interesting in itself, particularly if it doesn't require extensive research.
The first listed question was closed after one day (about 29 hours). This makes the difference, I believe.
About the votes: I agree that -3 for the first listed question is too much and the same is +13 for the other one.