Help with first String Lesson - 'Log Levels' C#

I don’t know if i’m doing something wrong, however, the instructions seem to be completely different to what the Community Solutions are showing.

For example, these are the tasks for the exercise:

And this is an example of one of the solutions:

I have been learning C# for around a month now and I’m quite familiar with strings, however, the solutions are completely foreign to me and are definitely not for beginners. I feel they are completely different to what the Exercise is asking.

Any help/explanation would be appreciated!

Introduction for this exercise can be viewed here:

Don’t tell anyone I said so, but I’ve found that for a lot of exercises, the instructions are not very useful. (Occasionaly they are downright misleading!) The requirements are in the tests, and the tests are the sole authority.

@Tychi What is your confusion about? String object and its built-in methods? Or the way the solution you linked uses another notation for the methods to implement? The later is no requirement, there is simply a lot of ways to write the code. Functionally the linked solution solves the exercise, exactly as it is written in the instructions.

You will have to read C# documentation about strings. Have you seen the Help section? There are links to helpful places.

This isn’t true for Learning Exercises, of which Log Levels is one. In Learning Exercises all the information you need should be provided in the introduction and/or the hints.

@Tychi Let’s look at spauch's solution for Log Levels in C# on Exercism - what is it that you think the three methods here are doing, and how does that differ from what you feel the task is asking you to do? :slight_smile:

I s

I stand corrected. I wasn’t making that distinction. It might still be true that looking at the failing tests can help clarify their expectations.

1 Like


You can’t actually see the tests for Learning Exercises in the online editor though - they’re specifically hidden so that students solve by following the exercises rather than trying to read code that might be too advanced for them at this stage.

Maybe I can say as a beginner, I concur that the explanation of the tasks are horrible, but that is also the point I guess.

However, just push through first 5 and you start to understand how the system works. Open up a Visual Studio or C# online compiler and play with the code there. Same practices work here as on normal code, test your code often that it works.

Got any issues that you might need help?

Our courses are made by the community who work together to improve the content. If something is horrible, maybe you could contribute by opening forum posts for each exercise with suggested improvements?