Display Exercise 1


Put any needed imports needed to display rich output the following cell:

In [25]:
import IPython.display as ipynb

In [26]:
assert True # leave this to grade the import statements

Basic rich display

Find a Physics related image on the internet and display it in this notebook using the Image object.

  • Load it using the url argument to Image (don't upload the image to this server).
  • Make sure the set the embed flag so the image is embedded in the notebook data.
  • Set the width and height to 600px.

In [27]:
i = ipynb.Image(url="http://www.gh-records.com/499-646-thickbox/scumearth-atomic-physics.jpg", embed=True, width="600px", height="600px", retina=False)

In [28]:
assert True # leave this to grade the image display

Use the HTML object to display HTML in the notebook that reproduces the table of Quarks on this page. This will require you to learn about how to create HTML tables and then pass that to the HTML object for display. Don't worry about styling and formatting the table, but you should use LaTeX where appropriate.

In [32]:
quark = r"""<table>

Name Symbol Antiparticle Charge($e$) Mass($\frac{MeV}{c^2}$)
up u $\bar{u}$ +$\frac{2}{3}$ 1.5-3.3
down d $\bar{d}$ -$\frac{1}{3}$ 3.5-6.0
charm c $\bar{c}$ +$\frac{2}{3}$ 1,160-1,340
strange s $\bar{s}$ -$\frac{1}{3}$ 70-130
top t $\bar{t}$ +$\frac{2}{3}$ 169,100-173,300
bottom b $\bar{b}$ -$\frac{1}{3}$ 4,130-4,370

In [33]:
assert True # leave this here to grade the quark table

In [ ]: