How to do it in Mathematica

This page will be used to accumulate short Mathematica notebooks with
examples that we encounter in Physics 834. It is not intended to be
exhaustive!
URL: http://www.physics.ohio-state.edu/~ntg/834/mathematica.php
The notebooks here were written assuming Mathematica version 7 or later (you may get an advisory with later versions).

A simple Mathematica notebook defining a function to calculate
the area of a circle, including forcing numerical output and
multiple definitions of a function with different numbers of
arguments. Also, making it into a program.

Mathematica notebook that simulates the rolling of dice,
where the outcome is a random integer from 1 to 6. Histograms
are generated for different numbers of "trials" (i.e., throws
of the dice), providing visualization of how the fluctuations
scale with the number of trials.