from IPython.display import HTML
HTML('''
<script>
code_show=true;
function code_toggle() {
if (code_show){
$('div.input').hide();
} else {
$('div.input').show();
}
code_show = !code_show
}
$( document ).ready(code_toggle);
</script>
<form action="javascript:code_toggle()"><input type="submit" value="Click here to toggle on/off the raw code."></form>
''')
a=3
from numpy.random import rand
print rand(100)
[ 0.31916108 0.39701687 0.5967282 0.64583544 0.02124982 0.80490808 0.04340616 0.35311644 0.05821097 0.47571854 0.6590656 0.314476 0.5777225 0.71093712 0.81604326 0.09085176 0.31162273 0.64316939 0.20058215 0.55123052 0.34705905 0.70336194 0.19633233 0.97227567 0.68669515 0.15217083 0.48601673 0.54180237 0.51805936 0.21827278 0.49892316 0.95490949 0.24132192 0.72638442 0.21156469 0.27242749 0.53713662 0.66664844 0.59003574 0.24601949 0.95481792 0.85007817 0.79751008 0.67568072 0.07372284 0.41199798 0.5099751 0.14393445 0.52877005 0.27776123 0.41301011 0.22823555 0.38453316 0.2077547 0.87756559 0.04370568 0.35429081 0.54205949 0.24422436 0.83166788 0.41527739 0.74391052 0.05817921 0.75486989 0.81304611 0.96162636 0.40578862 0.75961276 0.63857446 0.80095503 0.17275512 0.55028586 0.97233429 0.56083287 0.34378111 0.64796224 0.76477336 0.60491234 0.34896295 0.2831909 0.17821642 0.66523935 0.6233214 0.68983859 0.65124514 0.53196719 0.03779833 0.87798482 0.029776 0.78557628 0.45434467 0.56203094 0.38264435 0.39234441 0.49483658 0.52249764 0.31585238 0.1870312 0.05122932 0.07411732]
for i in range(5):
print i
print i+1
0 1 1 2 2 3 3 4 4 5
a = 2.123
The variable a is {{a}} a = {{a}}
$\frac{1}{2}$
$\displaystyle\frac{1}{2}a$