print(3 + 2, "dog" + "cat")
The print statement above consists of
print
(
the expression 3 + 2
a comma
the expression "dog" + "cat"
)
Important: The word print must be typed in lower case letters.
For the problems below use the Python Shell:
Each line below consists of a number, a period, then
a single Python statement.
Type each statement below into the Python Shell and then press the enter key.
TYPE IN ONLY THE STATEMENT!
Do NOT type in the number and period preceeding the statement.
When you press the enter key Python executes (carries out) the command. For each statement record the result that Python displays.
Homework H1. (Homework one). Once you have recorded the results, logon to your blackboard account. Click on Homework, then click on Homework H1. In the submission window enter five lines. The first line should start with a 1, then a space, then the result of the first statement above. The second line should start with a 2, then a space, then the result of the second statement above. Continue with this pattern. Then click Submit.
Homework H2. In the last command above what does the // operator do? What does the % operator do? Logon to blackboard. Click on Homework, then click on Homework H2. Write what // does in the submission window. Write what % does in the submission window. Click on Submit.
Next: Python Values and Types