Steve911
(Steve)
March 3, 2024, 12:16am
1
Hi there just started my python tutorial
I keep getting invalid decimal literal
I enter var = 3.142
I understand it mustn’t start with a number before the var
And no letters in the numeric
But I keep getting invalid decimal literal
As an aside I get a red highlight in the code above my program
Kind regards Steve
MegaIng
(Cornelius Krupp)
March 3, 2024, 12:29am
2
Please provide a full error traceback, otherwise we have a hard time telling what exactly is going wrong.
kknechtel
(Karl Knechtel)
March 3, 2024, 2:23am
3
This does not make sense. There is no code above your program.
If you tried to copy and paste from an interpreter window into a .py
file, that does not work properly.
Steve911
(Steve)
March 3, 2024, 11:21am
4
Hi Karl
Thanks for reply have screen shot of issue
Just started learning
Stefan2
(Stefan)
March 3, 2024, 12:45pm
5
See this from three days ago.
1 Like
tjreedy
(Terry Jan Reedy)
March 4, 2024, 12:38am
6
You tried to execute exactly what you see in the IDLE editor window, starting with “Python 3.12.2 (tags…”, which is not valid Python code.
1 Like
Steve911
(Steve)
March 4, 2024, 9:27am
7
Hi Terry thanks for help
Went back and read the instructions properly all ok now
Regards Steve