Getting an 'invalid decimal literal' error in my code—what am I missing?

18 Replies, 1693 Views

Oh man, the *invalid decimal literal* error got me too when I was starting out.

The issue is the `09.5`. Python doesn’t like leading zeros in decimal numbers. Just write `9.5` instead.

If you’re looking for a tool to help debug, [Codecademy’s Python course](https://www.codecademy.com/learn/learn-python-3) is super beginner-friendly and explains stuff like this really well.

Messages In This Thread



Users browsing this thread: 1 Guest(s)