0
Could you help me find the problem in this code?
Could You help me to find the problem in this code. Sample input: dannie:H.lat-nom Sample output : Hydrogenium https://code.sololearn.com/ckOeIy01cH04/?ref=app
7 Respostas
+ 7
The problem in the code is the presence of non-breaking spaces (Unicode character 160) before some of the lines. These characters can cause issues with the Python interpreter because they are not recognized as spaces. To fix this issue, you need to remove these non-breaking spaces and replace them with regular spaces.
Fix the indentation of the code. In Python, indentation is important and must be consistent to avoid syntax errors. The code had inconsistent indentation which caused the error message. Also make some minor formatting changes to improve the readability of the code.
+ 5
I think your problem with line 15 and then it occurs further down is due to poor indentation.
Either use 2x spaces or a tab or 4x spaces per indentation.
It could be due to a copy and paste. Fix all those indentations, update the code and write what happens.
+ 2
Yes as said before the yellow squares and improper indentation is causing the problem.
+ 1
Ben Hamida Mohamed Amine I tried running your code and it runs perfectly on the provided sample input.
0
I changed the code but the problem still , Can you give me an example? May be i misunderstood you.
0
Ben Hamida Mohamed Amine So do you have a problem with your code or not?
0
No problem , thanks very much 👌