Professional Documents
Culture Documents
PF Exp 1
PF Exp 1
Fig. 1.1 IDLE Shell 3.9.10 command prompt interpreter and editor for moduler coding.
1.2 Using IDLE Shell Command Prompt Interpreter 2 1.2 Using IDLE
You can use the IDLE Shell Command Prompt Interpreter to directly execute the
coding staements as shown in Fig. 1.2.
For each of the following expressions, what value will the expression give?
Verify your answers by typing the expressions into Python.
a. 9 - 3
b. 8 * 2.5
c. 9 / 2
d. 9 / -2
e. 9 // -2
f. 9 % 2
g. 9.0 % 2
1.3 Using IDLE Shell Editor for Moduler Coding 3
h. 9 % 2.0
i. 9 % -2
j. -9 % 2
k. 9 / -2.0
l. 4 + 3 * 5
m. (4 + 3) * 5