Python for Introductory Statistics: Lab WorkbookXYZ Homework Edition

⇩ Download ▾

1.2 Python Arithmetic Operators

NameOperatorExampleResult
Addition + 5+6 11
Subtraction - 5-6 -1
Multiplication * 5*6 30
Division / 5/6 0.83333
Exponentiation ** 5**2 525^2 =25

Lab 1.2.1

Add a code-cell, type 10 + 10, and click the play button to the left of 10 + 10.

view answer

10+10

Lab 1.2.2

Write a Python code to find the value of 10088100-88.

view answer

Lab 1.2.3

Write a Python code to perform the operation 12+7.110×3\frac{1}{2}+ 7.1 - 10\times3. On a code-cell type 1/2 + 7.1 - 10*3 and run (execute) the code by pressing the Ctrl+Enter or click the play button.

view answer

Lab 1.2.4

Write a Python code to perform the operation 5+7100+0.0510-5+7-\frac{100+0.05}{10}.

view answer

Lab 1.2.5

Write a Python code to perform the operation 1671000000\frac{1}{671000000}.

view answer

Lab 1.2.6

For the year 2021, the Illinois state tax is 6.25%. How much state tax will one pay for a car priced at $16,000? Write a Python code to calculate the tax.

view answer

Lab 1.2.7

Write a Python code to evaluate: 28/4×228/4\times2.

view answer

Watch demo video

Lab 1.2.8

Write a Python code to perform the operation: 72+127^2+\frac{1}{\sqrt2}.

view answer

Lab 1.2.9

Write a code for: 7287^2-\sqrt 8

view answer

Lab 1.2.10

Write a code to evaluate: 72825\frac{7^2-\sqrt 8}{25}

view answer

Adapted from Python for Introductory Statistics: Student's Lab Workbook, by Simon Aman (Truman College, City Colleges of Chicago), licensed under CC BY 4.0. Changes were made: reformatted as an accessible XYZ web edition with live in-browser code cells. License: CC-BY-4.0.

These eBooks are a prerelease and are not yet certified conformant with WCAG 2.1 AA or ADA Title II. Every page is built against an automated accessibility gate, and the published editions will meet ADA Title II requirements when they release in late September 2026. If something is unusable, please tell us.