Reputation: 29
I don't know what is wrong with this code. I am getting a syntax error, but I don't know why. Here is the code in Python:
1st_miles = 102
Need your help.
Upvotes: 1
Views: 105
Reputation: 301
In this case, you are assigning 1st_miles the value of 102. This is syntactically wrong. In Python the variable (whom to which we assign values) should:
So in order to declare variables, you should start its name with the alphabet, not a digit. Example: first_miles = 102.
Hope this might helps.
Upvotes: 0
Reputation: 622
Your variables cannot start with a number.
Just try to use the following:
first_miles = 102
Upvotes: 1
Reputation: 311143
Identifiers in Python can't start with a digit. They must start with a letter or an underscore. E.g.:
first_miles = 102
Upvotes: 2