Question: Type 1 2 and then hit return. Python tries to evaluate the expression, but it cant because theexpression is not syntactically legal. Instead, it shows
Type and then hit return. Python tries to evaluate the expression, but it cant because theexpression is not syntactically legal. Instead, it shows the error message:In many cases, Python indicates where the syntax error occurred, but it is not always right, andit doesnt give you much information about what is wrong.So for the most part, the burden is on you to learn the syntax rules.In this case, Python is complaining because there is no operator between the numbers.See if you can find a few more examples of things that will produce error messages when youenter them at the Python prompt. Write down what you enter at the prompt and the last line ofthe error message that Python reports back to you.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
