I have a different soluttion to 15/15


#1

I wrote my answer to the last exercise of this topic, and my answer on the right was what I needed to get. However, it still said I did it wrong. I checked the solution, and the code indeed was different, with my being more complex for no reason. But the output was the same. Shouldn’t a right answer be correct even if it wasn’t the right exact way of doing it.

I will gladly share the code, just ask. I’m not putting it in here because i don’t think it’s important in this case.


#2

In the domestic kitchen there are one hundred ways to cook an egg. So too in the programming kitchen are they bountiful ways to perform the same task. However, in a lesson environment there will naturally be constraints and limitations imposed on us simply because it would be far too wieldly to anticipate every result. These lessons have limited scope and are confined to a handful of code patterns to match with the user’s code. If the match is not found, the code will not pass.

Bottom line, try to ascertain what it is the lesson checker is expecting (namely follow the instructions as closely as possible). We cannot expect the SCT (submission correctness test) to bend to our whims.


#3

Thank you for the answer!


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.