Display Exercise 1

Imports

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


In [6]:
# YOUR CODE HERE
from IPython.display import display
from IPython.display import Image
from IPython.display import HTML

In [7]:
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 [8]:
# YOUR CODE HERE
Image(url ='http://i.imgur.com/Tp5q385.jpg', embed = True, width = 600, height = 600)
# I am delibratly pushing the limits because I am a sarcastic little stinker


Out[8]:

In [9]:
# YOUR CODE HERE
Image(url ='https://www.llnl.gov/sites/default/files/field/image/nif_hohlraum-sketch_big.jpg', embed = True, width = 600, height = 600)
# Here is a picture of the inside of the fusion reactor at Lawrence Livermore
# It is the first fusion reactor to output more energy than is put in, which is a huge advencement in nucler technology
# I am not stupid enough to risk my grade on a picture of Neil Degrasse Tyson making waffles
# But the galaxy beehind him pretty cool


Out[9]:

In [10]:
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 [1]:
%%html
<table>
    <tr>
    <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> + $2/3$
    </td>
    <td> 1.5-3.3
    </td>
    </tr>
    
    <tr>
    <td> top
    </td>
    <td> t
    </td>
    <td> $\bar{t}$
    </td>
    <td> + $2/3$
    </td>
    <td> 169,100173,300
    </td>
    </tr>
    
    <tr>
    <td> strange
    </td>
    <td> s
    </td>
    <td> $\bar{s}$
    </td>
    <td> - $1/3$
    </td>
    <td> 70-130
    </td>
    </tr>
    
    <tr>
    <td> down
    </td>
    <td> d
    </td>
    <td> $\bar{d}$
    </td>
    <td> - $1/3$
    </td>
    <td> 3.5-6.0
    </td>
    </tr>
    
    <tr>
    <td> charm
    </td>
    <td> c
    </td>
    <td> $\bar{c}$
    </td>
    <td> + $2/3$
    </td>
    <td> 1,160-1,340
    </td>
    </tr>
    
    <tr>
    <td> bottom
    </td>
    <td> b
    </td>
    <td> $\bar{b}$
    </td>
    <td> - $1/3$
    </td>
    <td> 4,1304,370
    </td>
    </tr>



    </table>


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

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