In an interactive Python session you can type commands on the prompt
(>>>). On Dodona you get such a session by pressing To sandbox
underneath the editor; on your own computer you get one by starting
IDLE. Give the command print(7/4). You will see that
it prints the answer \(1.75\). Then give the command \(7/4\) (i.e., without
print). Observe that it also prints the answer \(1.75\).
>>> print(7/4)
1.75
>>> 7/4
1.75
The reason is that an interactive session will always display the result
of a command. The result of \(7/4\) is \(1.75\), and therefore it displays
\(1.75\). The result of a print command is nothing, so the session
displays nothing – however, the print command causes the display of
whatever is within the parentheses, which is the value resulting from
dividing \(7\) by \(4\), which is \(1.75\). Therefore, in both cases you see
\(1.75\), but one is the result of the use of the print command, while
the other is the result of the session showing you the evaluation of a
calculation.
Now write a Python program that contains only the command \(7/4\), and hand it in. Before you do, think about what you expect to happen. Will it display \(1.75\)? Will it display nothing? Or will you see an error?
Check if your expectation is correct.