+ 1
Problem in the code is not solved After changes!
Could you help me find the problem in this code? I tried to organize the intendation but no result. Sample input: dannie:H.lat-nom Sample output : Hydrogenium https://code.sololearn.com/ckOeIy01cH04/?ref=app
3 Réponses
+ 9
Ben Hamida Mohamed Amine ,
python has detected a *SyntaxError: invalid non-printable character U+00A0* . this character is a so called *NO-BREAK SPACE*.
this character is frequently used in websites to prevent line breaks. it can occur multiple times, so you have to remove them all.
+ 3
I think the problem is with **re** module, as you trying to match something with "^" which might represent something different (I'm not a fan of regex module).
Also, do you have periodic table elements in if statements?
If variable == "Au":
and so on ... ?
Instead, you can put element symbols as keys in dictionary and their atomic mass as values. I have made a similar program few weeks ago.
https://code.sololearn.com/c3i1CDAM8Vva/?ref=app
+ 2
Lamron , Hi sir , i don't think that the problem is in the regex module , and yes , i have periodic table elements , but the code i provided is a basic one , because the complete code is too long (600 line)