Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mooc-rr
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
84524221613d58c87acfb7d2d0777c72
mooc-rr
Commits
0c205381
Commit
0c205381
authored
Mar 28, 2020
by
84524221613d58c87acfb7d2d0777c72
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update fichier-markdown.md
parent
e391755a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
1 deletion
+52
-1
fichier-markdown.md
module1/exo2/fichier-markdown.md
+52
-1
No files found.
module1/exo2/fichier-markdown.md
View file @
0c205381
test
\ No newline at end of file
# Partie 1
## Sous-partie 1 : texte
Une phrase sans rien.
*Une phrase en italique.*
**Une phrase en gras.**
Un lien vers
[
fun-mooc
](
https://www.fun-mooc.fr/
)
Une ligne de
`code`
.
## Sous-partie 2 : listes
Liste à puces
-
item
-
sous-item
-
sous-item
-item
-item
Liste numérotée
1.
item
2.
item
3.
item
## Sous-partie 3 : code
```
python
# On repère une position sur un échiquier (\Fig{exo:08}) par une lettre (la colonne) et un nombre (la ligne).
# Entrer une position valide et déterminer la couleur de la case.
H
=
'abcdefgh'
# Repère horizontal
# Saisies filtrées de la position
lettre
=
input
(
"Position horizontale ['a'.. 'h'] : "
)
.
lower
()
while
lettre
not
in
H
:
lettre
=
input
(
"Position horizontale ['a'.. 'h'], S.V.P : "
)
.
lower
()
nombre
=
int
(
input
(
"Position verticale [1.. 8] : "
))
while
not
(
1
<=
nombre
<=
8
):
nombre
=
int
(
input
(
"Position verticale [1.. 8], S.V.P : "
))
# On postule que noir est vrai et blanc faux
coul_lettre
=
True
if
H
.
index
(
lettre
)
%
2
==
0
else
False
coul
=
coul_lettre
if
nombre
%
2
==
1
else
not
(
coul_lettre
)
print
(
f
"
\n
La position '{lettre}{nombre}' est une case {'noire' if coul else 'blanche'}."
)
```
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment