True. If the OP has been instructed by their boss to do this kind of exercise then they are in a pickle. However, I don’t think that’s the case. A lot of professional jobs even startups have senior developers. They most certainly wouldn’t be telling junior developers to be doing this kind of exercise. It would be a strange thing to do if it was asked by a senior developer. So, I don’t think it’s the case of professionalism.
What we should really ask is what is this exercise for. Is it for school, work, or for fun.