python should evaluate and print back the value of each expression of course the first one does not require any calculation it appears that the shell just echoes back what you printed the python shell is an interactive interpreter as you can seeafter you press return (or enter)it is evaluating the expression you typed inand then printing the result automatically this is very handy environment to check out simple python syntax and get instant feedback for more elaborate programs that you want to savewe will switch to an editor window later multiplicationparenthesesand precedence try in the shell you should get your first syntax error the should have become highlightedindicating the location where the python interpreter discovered that it cannot understand youpython does not use for multiplication as you may have done in grade school the can be confused with the use of as variable (more on that laterinstead the symbol for multiplication is an asterisk enter each of the following you may include spaces or not the python interpreter can figure out what you mean either way (the space can make understanding quicker for human reader try in the shell * if you expected the last answer to be think againpython uses the normal precedence of arithmetic operationsmultiplications and divisions are done before addition and subtractionunless there are parentheses try ( + )* ( now try the following in the shellexactly as writtenfollowed by enterwith no closing parenthesis ( look carefully there is no answer given at the left margin of the next line and no prompt to start new expression if you are using idlethe cursor has gone to the next line and has only indented slightly python is waiting for you to finish your expression it is smart enough to know that opening parentheses are always followed by the same number of closing parentheses the cursor is on continuation line type just the matching close-parenthesis and enterand you should finally see the expression evaluated (in some versions of the python interpreterthe interpreter puts at the beginning of continuation linerather than just indenting negation also works try in the shell-( division and remainders if you think about ityou learned several ways to do division eventually you learned how to do division resulting in decimal try in the shell / / integer arithmetic