Commit 9254b6a7 authored by Romain Casati's avatar Romain Casati
Browse files

Adding a slideshow example.

parent 77d2f846
Pipeline #365966 passed with stages
in 3 minutes and 8 seconds
{"cells":[{"metadata":{"trusted":true,"slideshow":{"slide_type":"slide"}},"cell_type":"code","source":"def eratosthenes(nmax):\n \"\"\" Retourne la liste des nombres premiers inférieurs ou égaux à nmax > 1.\"\"\"\n table = set(range(2, nmax + 1))\n premiers = []\n while table:\n p = min(table)\n table -= set(range(p, nmax + 1, p))\n premiers.append(p)\n \n return premiers","execution_count":1,"outputs":[]},{"metadata":{"trusted":true,"slideshow":{"slide_type":"fragment"}},"cell_type":"code","source":"eratosthenes(100)","execution_count":2,"outputs":[{"output_type":"execute_result","execution_count":2,"data":{"text/plain":"[2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97]"},"metadata":{}}]}],"metadata":{"kernelspec":{"name":"python3","display_name":"Python 3","language":"python"},"celltoolbar":"Slideshow"},"nbformat":4,"nbformat_minor":2}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment