Asking a good question is half the battle. This will save time for both you and the person answering, and it will help you solve the problem as quickly as possible.
How to ask a question:
- Read our article "How to ask the right questions"
- Format the code; otherwise, it will be difficult, if not impossible, to read. Keep an eye on the indents, correct the linter's remarks
- Save your solution to the and insert a link to it in your post
- Say what you have already figured out during debugging. This will help the maintainer understand the reasons for the error, as well as showing that you tried to solve the problem yourself, which is very much appreciated among professionals and a makes them want to help :)
The code works locally or in another environment, but it won't work on Hexlet
There can be many reasons, but usually, the solution does not meet the conditions of the problem or does not take into account the corner cases (extreme cases).
A typical scenario is when you write code, run a standard case check, and it works in your environment, but it fails the automatic check after copying it into the Hexlet environment.
In this situation, you need to carefully reread the task. Most likely, the corner cases are described there. Also, you must examine the output on the OUTPUT tab, read the error message (google it if necessary), and look at the file with tests, seeing how your function is called and what arguments are passed to it.
Errors when running code outside of Hexlet
- Your environment uses other versions of the language or third-party libraries
- Your code contains inclusions of other files and/or libraries
- Your code does the wrong thing