+ 4
Every time it's saying that the answer is wrong!
Run the code, (wait) click “Start game” btn, now try writing the correct atomic number of the given element. Whatever you write, either correct or wrong, it says that the answer is Wrong. Why? https://code.sololearn.com/WlF1pR0Y75gd/?ref=app
2 Réponses
+ 4
You set variables elementCount, randInt and elementNameInH1 in multiple places, apparently with the same objective. Why?
Some of them are set only in functions, others both in functions and globally. Why?
Running the code, I saw that it always wants the first value assigned to the global instance of randInt.
Organize your variables. Think about their scope, and also which ones should be set every loop.
BTW, the input field message is truncated - the user doesn't know what the program wants.
+ 1
Emerson Prado now see it. I have edited the input field.