Random number generation - Your turn

Random number generation - Your turn#

Important!

If you’re completely new to Python, you may want to go through the exercises in the Python fundamentals notebook first!

Note

Click the and open this notebook in Colab to enable interactivity.

Note

To save your progress, make a copy of this notebook in Colab File > Save a copy in Drive and you’ll find it in My Drive > Colab Notebooks.

A point is selected at random inside a circle. Find the probability that the point is closer to the center of the circle than to its circumference.

Hint: Generate a random vector of \(x\) and \(y\) coordinates first, then consider only those points which are inside the circle.

# TODO: Write your solution below

Exporting your work#

When you’re ready, the easiest way to export the notebook is to File > Print it and save it as a PDF. Remove any excessively long, unrelated outputs first by clicking the arrow → next to the output box and then Show/hide output. Obviously don’t obscure any necessary output or graphs!