Can you help me please? I'm a beginner in Python

My website is giving an error when running that says: syntax: invalid decimal literal

Repl link:

code snippet
1 Like

Hey, @spyxcontato welcome to the forums!

Can you please provide a link to the repl? This way it is easier for staff and members of the community to help you!

Also see this guide on how to share your code:


This error states that you used a number at the beginning of the variable name. This is not allowed in Python. Change the name of your variable so that there is no number at the beginning of it.

When you write a number followed by an underscore character _, Python considers that the character _ is a decimal separator in a number. That is, the number 100_000 will be equal to the number 100000.

When you write, for example, 100_years, Python tries to combine it into the number `100years’.

1 Like

(OP’s repl link for reference:

Hi @spyxcontato, it seems that you have put a mixture of HTML and CSS in a Python repl in the file. This will cause errors.

If you are trying to program HTML and CSS to make a website, you might want to use the HTML template.

Hope this helps.