Think about what value each of the following expressions will return? Check your answers using the Python interpreter by typing each expression into the interpreter and pressing enter.
Did any of the results surprise you? If so, then you’ve probably run into a common point of confusion in Python 2 - Integer Division.
Now turn this set of expressions into a program that you can save by using the editor. For each expression add one line to the editor as part of a print statement to display the answer to the screen.
To tell someone reading the code what this section of the code is about,
add a comment line that says ‘Problem 1’ before the code that answers
the problem. Comments in Python are added by adding the #
sign.
Anything after a #
sign on the same line is ignored when the program is
run. So, the start of your program should look something like:
# Problem 1
print(2-10)