Display Exercise 1

Imports

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


In [5]:
from IPython.display import HTML
from IPython.display import Image
from IPython.display import IFrame

In [6]:
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 [7]:
Image(url = "http://thumbs.dreamstime.com/z/biology-chemistry-physics-26975213.jpg", width = 600, height = 600)


Out[7]:

In [8]:
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 [9]:
%%html
<table>
<th>Name </th>
<th>Symbol</th>
<th>Antiparticle</th>
<th>Charge (e)</th>
<th>Mass(MeV/$c^2$)</th>


</tr>
<tr>
<td> up </td>
<td> u </td>
<td> $\bar{u}$ </td>
<td> +$\frac{2}{3}$ </td>
<td> 0.511 </td>

</tr>
<tr>
<td> down </td>
<td> d </td>
<td> $\bar{d}$ </td>
<td> -$\frac{1}{3}$ </td>
<td> 3.5-6.0 </td>


</tr>
<tr>
<td> charm </td>
<td> c </td>
<td> $\bar{c}$ </td>
<td> +$\frac{2}{3}$ </td>
<td> 1,160-1,340 </td>


</tr>
<tr>
<td> strange </td>
<td> s </td>
<td> $\bar{s}$ </td>
<td> -$\frac{1}{3}$ </td>
<td> 70-130 </td>


</tr>
<tr>
<td> top </td>
<td> t </td>
<td> $\bar{t}$ </td>
<td> +$\frac{2}{3}$ </td>
<td> 169,100-173,300 </td>

</tr>
<tr>
<td> bottom </td>
<td> b </td>
<td> $\bar{b}$ </td>
<td> -$\frac{1}{3}$ </td>
<td> 4,130-4,370 </td>


Name Symbol Antiparticle Charge (e) Mass(MeV/$c^2$)
up u $\bar{u}$ +$\frac{2}{3}$ 0.511
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 [ ]:
assert True # leave this here to grade the quark table