In the IDLE shell you can type commands on the
IDLE prompt (>>>
). Give the command print(7/4)
. You will see that it
prints the answer print
). Observe that it also prints the answer
The reason is that the IDLE shell will always display the result of a
command. The result of print
command is nothing, so the shell
displays nothing – however, the print
command causes the display of
whatever is within the parentheses, which is the value resulting from
dividing print
command, while
the other is the result of the shell showing you the evaluation of a
calculation.
Now write a Python program that contains only the command
Check if your expectation is correct.