Why in the code coach the last three test cases are hidden? | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
+ 4

Why in the code coach the last three test cases are hidden?

10th Mar 2020, 7:32 PM
Jhonatan Álvarez Ordosgoitia
Jhonatan Álvarez Ordosgoitia - avatar
4 Antworten
+ 7
Because if no test cases were hidden, one could simply hardcode the solutions for all the inputs, which is not the point of the code coach problems.
10th Mar 2020, 7:33 PM
Shadow
Shadow - avatar
+ 6
In the real world, your code needs to be flexible to all the atrocious forms of input that your clients might provide. As a practice for that, not all the inputs are shown to you. This allows you to formulate a generally-foolproof algorithm without hard coding all the answers. Tl;dr So that you won't hardcode and because it's good practice for real life.
10th Mar 2020, 11:45 PM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
+ 1
Oh fine! Then it's so for that one cannot manipulate the code according the problem shown. Hey many thanks! 😊
10th Mar 2020, 7:49 PM
Jhonatan Álvarez Ordosgoitia
Jhonatan Álvarez Ordosgoitia - avatar
+ 1
Great! Thanks my friend! 👍👍👍
11th Mar 2020, 7:47 PM
Jhonatan Álvarez Ordosgoitia
Jhonatan Álvarez Ordosgoitia - avatar