Python for Introductory Statistics: Lab WorkbookXYZ Homework Edition

⇩ Download ▾

1.3 Python Variables

Watch demo video

Lab 1.3.1

Given the ordered pairs (6,9) and (5,1), write a Python code to find the slope and midpoint.

view answer

Lab 1.3.2

To solve a quadratic equation of the form ax2+bx+c=0ax^2+bx+c=0, we can use the formula below:

x=−b−b2−4ac2ax=\frac{-b - \sqrt{b^2-4ac}}{2a} or x=−b+b2−4ac2ax=\frac{-b + \sqrt{b^2-4ac}}{2a}

Write a Python code to solve 2x2−3x−42x^2-3x-4 using the quadratic formula.

view answer

Lab 1.3.3

Evaluate 1+218\frac{1+2}{18} and round the result to one decimal place.

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 any other accessibility standard. Every page is built against an automated accessibility gate, and our target for the published editions is WCAG 2.2 Level AA. If something is unusable, please tell us.