diff --git a/module2/module2/exo1/Lynda-markdown.md b/module2/module2/exo1/Lynda-markdown.md index 4e5b8c1f16a7034145faddb6818d2a8684091e93..ca11064d6f9606332e7f26f43ddbcc9b8e89ab0c 100644 --- a/module2/module2/exo1/Lynda-markdown.md +++ b/module2/module2/exo1/Lynda-markdown.md @@ -36,7 +36,7 @@ N = 1000 df = data.frame(X = runif(N), Y = runif(N)) df$Accept = (df$X**2 + df$Y**2 <=1) library(ggplot2) -ggplot(df, aes(x=X,y=Y,color=Accept)) + geom_point(alpha=.2) + coord_fixed() + theme_bw() +ggplot(df, aes(x=X,y=Y,color=Accept)) + geom_point(alpha=.2 ) + coord_fixed() + theme_bw() ``` Il est alors aisé d’obtenir une approximation (pas terrible) de π en comptant combien de fois, en moyenne, X2+Y2 est inférieur à 1: