0

Why are only two test cases unlocked?

After solving a problem, when I run the code only the first two test cases are unlocked. Many of them seem locked. What's the problem? Is it normal?

28th Jun 2025, 12:48 PM
Md Mehedi Hasan
Md Mehedi Hasan - avatar
2 Antworten
+ 7
It's very normal. Think of a real-life scenario, you don't know all the values which a user could enter. Your program needs to handle them. So, you need to learn as a programmer how to write good codes which solve or deal with all inputs for your problem. A comment from another user also wrote that it would be very easy for users here to simply program a series of if/else if/else cases to solve every solution. And that's not learning anything more in programming. Think outside of hard coded solutions and aim for good programming practises to solve the problem properly.
28th Jun 2025, 1:42 PM
Ausgrindtube
Ausgrindtube - avatar
+ 1
Md Mehedi Hasan , if you can share your code here, we may be able to help or give you some hints. don't forget to also share a task description.
28th Jun 2025, 8:00 PM
Lothar
Lothar - avatar