From 3baf96738275c83da9f01fdcca791d7c48f14e09 Mon Sep 17 00:00:00 2001 From: Tommy Rushton Date: Tue, 9 Apr 2024 16:55:22 +0200 Subject: [PATCH] Start reproducing target notebook. --- .../exo1/toy_document_orgmode_python_en.org | 28 ++++++++++++++++--- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/module2/exo1/toy_document_orgmode_python_en.org b/module2/exo1/toy_document_orgmode_python_en.org index 5782f49..2098a42 100644 --- a/module2/exo1/toy_document_orgmode_python_en.org +++ b/module2/exo1/toy_document_orgmode_python_en.org @@ -1,8 +1,5 @@ -#+TITLE: Your title -#+AUTHOR: Your name -#+DATE: Today's date +#+TITLE: On the computation of pi #+LANGUAGE: en -# #+PROPERTY: header-args :eval never-export #+HTML_HEAD: #+HTML_HEAD: @@ -11,6 +8,29 @@ #+HTML_HEAD: #+HTML_HEAD: +# #+PROPERTY: header-args :eval never-export + +* Table of Contents + +* Asking the math library +My computer tells me that \pi is /approximatively/ + +#+begin_src python :results value :session :exports both +from math import * +pi +#+end_src + +#+RESULTS: +: 3.141592653589793 + +* * Buffon's needle +Applying the method of +[[https://en.wikipedia.org/wiki/Buffon%2527s_needle_problem][Buffon's needle]] we get the *approximation* + +#+begin_src python :results value :session :exports both +import numpy as np +#+end_src + * Some explanations This is an org-mode document with code examples in R. Once opened in -- 2.18.1