Skip to content

Commit 5e4f512

Browse files
author
arnaud
committed
pour livre
1 parent 8b80780 commit 5e4f512

4 files changed

Lines changed: 239 additions & 3 deletions

File tree

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252

5353
# certains resultats pdf
5454
#-----------------------
55-
55+
livre-python1-print.pdf
5656

5757
# Autres
5858
# ----------------------

divers/4eme_couverture.txt

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
2+
# Quatrième de couverture
3+
4+
* Python au lycée
5+
* Python langage puissant,
6+
* Python facile à débuter
7+
* Guider pas à pas
8+
* Orienté mathématiques
9+
* Niveau math <= seconde
10+
* Activités originales
11+
* Algorithme et programmation
12+
13+
14+
Python est le langage idéal pour apprendre la programmation.
15+
C'est un langage puissant qui vous permettra de plonger dans le monde des algorithmes.
16+
17+
Ce livre vous guide pas à pas à travers des activités mathématiques et informatiques originales adaptées au lycée. Il se complète par des ressources en ligne : des vidéos et des fiches en couleurs.
18+
Vous avez tout en main pour réussir !
19+
20+
21+
Premiers pas
22+
Tortue (Scratch avec Python)
23+
Si ... alors ...
24+
Fonctions
25+
Arithmétique -- Boucle tant que -- I
26+
Chaînes de caractères -- Analyse d’un texte
27+
Listes I
28+
Statistique -- Visualisation de données
29+
Fichiers
30+
Arithmétique -- Boucle tant que -- II
31+
Binaire I
32+
Listes II
33+
Binaire II
34+
Probabilités – Paradoxe de Parrondo
35+
Chercher et remplacer
36+
Calculatrice polonaise -- Piles
37+
Visualiseur de texte -- Markdown
38+
L-système
39+
Images dynamiques
40+
Jeu de la vie
41+
Graphes et combinatoire de Ramsey
42+
Bitcoin
43+
Constructions aléatoires
44+

livre-python1-print.tex

Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
1+
%\documentclass[11pt]{report}
2+
\documentclass[11pt,twoside,openright]{report}
3+
4+
%\usepackage[screen]{python}
5+
\usepackage[print]{python}
6+
7+
\begin{document}
8+
9+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10+
% Titre + préface + sommaire
11+
\renewcommand{\contentsname}{Sommaire}
12+
13+
% Préface
14+
\pagenumbering{roman}
15+
\import{divers/}{preface_livre_python.tex}
16+
\debutchapitres
17+
\pagenumbering{arabic}
18+
19+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
20+
% Les feuilles
21+
22+
\clearemptydoublepage
23+
24+
25+
%======================================
26+
% Introduction
27+
%======================================
28+
29+
\part{Mise en route}
30+
31+
% 1 - Hello world!
32+
\import{premiers_pas/}{premiers_pas.tex}
33+
34+
% 2 - Tortue (Scratch avec Python)
35+
\import{tortue/}{tortue.tex}
36+
37+
38+
%======================================
39+
% Fondamentaux
40+
%======================================
41+
42+
\part{Fondamentaux}
43+
44+
% 1 - Si-alors
45+
\import{sialors/}{sialors.tex}
46+
47+
% 2 - Fonctions
48+
\import{fonctions/}{fonctions.tex}
49+
50+
% 3 - Tant que - Arithmétique - I
51+
\import{tantque/}{tantque-1.tex}
52+
53+
% 4 - Chaînes de caractères
54+
\import{chaines/}{chaines.tex}
55+
56+
% 5 - Listes I
57+
\import{listes/}{listes-1.tex}
58+
59+
60+
%======================================
61+
% Avancé
62+
%======================================
63+
64+
\part{Notions avancées}
65+
66+
% 1 - Statistique
67+
\import{statistique/}{statistique.tex}
68+
69+
% 2 - Fichiers
70+
\import{fichiers/}{fichiers.tex}
71+
72+
% 3 - Tant que - Arithmétique - II
73+
\import{tantque/}{tantque-2.tex}
74+
75+
% 4 - Binaire I
76+
\import{binaire/}{binaire-1.tex}
77+
78+
% 5 - Listes II
79+
\import{listes/}{listes-2.tex}
80+
81+
% 6 - Binaire II
82+
\import{binaire/}{binaire-2.tex}
83+
84+
85+
%======================================
86+
% Projets
87+
%======================================
88+
89+
\part{Projets}
90+
91+
% 1 - Probabilités
92+
\import{proba/}{proba.tex}
93+
94+
% 2 - Chercher
95+
\import{chercher/}{chercher.tex}
96+
97+
% 3 - Piles
98+
\import{piles/}{piles.tex}
99+
100+
% 4 - Markdown
101+
\import{markdown/}{markdown.tex}
102+
103+
% 5 - L-systèmes
104+
\import{lsysteme/}{lsysteme.tex}
105+
106+
% 6 - Images dynamiques
107+
\import{images/}{images.tex}
108+
109+
% 7 - Jeu de la vie
110+
\import{vie/}{vie.tex}
111+
112+
% 8 - Graphes et combinatoire de Ramsey
113+
\import{ramsey/}{ramsey.tex}
114+
115+
% 9 - Bitcoin
116+
\import{bitcoin/}{bitcoin.tex}
117+
118+
% 10 - Constructionss aléatoires
119+
\import{aleatoire/}{aleatoire.tex}
120+
121+
122+
123+
%======================================
124+
% Codes
125+
%======================================
126+
% \part{Codes}
127+
128+
% Codes de toutes les activités
129+
% \import{code/}{code.tex}
130+
131+
132+
%======================================
133+
% Guide de survie
134+
%======================================
135+
\part{Guides}
136+
137+
% 1 - Python
138+
\import{guide/}{guide-python.tex}
139+
140+
% 2 - Principales fonctions
141+
\import{guide/}{guide-fonctions.tex}
142+
143+
% 2 - Notes et références
144+
\import{guide/}{guide-biblio.tex}
145+
146+
147+
148+
\clearemptydoublepage
149+
150+
%======================================
151+
% Postface et index
152+
%======================================
153+
154+
\import{divers/}{postface_livre_python.tex}
155+
156+
\vfill
157+
\bigskip
158+
\bigskip
159+
160+
\centerline{Version 0.06 -- Février 2018}
161+
162+
163+
164+
\end{document}
165+

python-print.sty

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,32 @@
166166
}
167167
% ----------------------------------------------------------------------
168168
% Les chapitres
169+
170+
% Pour figure titre \part python1
171+
\usetikzlibrary{lindenmayersystems}
172+
\usetikzlibrary[shadings]
173+
\pgfdeclarelindenmayersystem{Hilbert curve}{
174+
\rule{L -> +RF-LFL-FR+}
175+
\rule{R -> -LF+RFR+FL-}}
176+
\newcommand{\mylsystem}[1]{
177+
\begin{center}
178+
\begin{tikzpicture}
179+
\def\monordre{#1}
180+
\def\monechelle{2^(4-\monordre)}
181+
\begin{scope}[scale=\monechelle,scale=0.7]
182+
\shadedraw [bottom color=red!80, top color=red!10, draw=red!80!black]
183+
[l-system={Hilbert curve, axiom=L, order={\monordre+1}, step=8pt, angle=90}]
184+
lindenmayer system;
185+
\end{scope}
186+
\end{tikzpicture}
187+
\end{center}
188+
}
189+
% Fin figure \part python1
190+
191+
192+
193+
194+
169195
\newcommand{\debutchapitres}{\clearpage\pagestyle{main}\thispagestyle{empty}\setcounter{page}{1}}
170196

171197
%\usepackage[explicit,pagestyles]{titlesec} %-> Baculer dans scratch-common.sty-
@@ -178,10 +204,11 @@
178204
\titleformat{\part}[display]
179205
{\Huge\center\scshape}% format
180206
{\titlerule[3pt]\vspace{3pt}\titlerule[1pt]\vspace{20pt}%
181-
\partname~\thepart\\[10pt]%
207+
\partname~\thepart\\[25pt]%
208+
\mylsystem{\value{part}}
182209
%\includegraphics[width = 6cm]{divers/logoScratchAuCollege}\\
183210
\MakeLowercase{#1}}% label
184-
{20pt}% sep
211+
{15pt}% sep
185212
{% the title
186213
\titlerule[1pt]\vspace{3pt}\titlerule[3pt]\vspace{4pc}
187214
}

0 commit comments

Comments
 (0)