Browse Source

translation to french for ex of exam2

content-update
Christopher Fremond 5 years ago committed by Clément
parent
commit
01c475b7f4
  1. 8
      subjects/alphamirror.en.md
  2. 16
      subjects/alphamirror.fr.md
  3. 4
      subjects/displayfirstparam.en.md
  4. 4
      subjects/displayfirstparam.fr.md
  5. 2
      subjects/displaylastparam.en.md
  6. 2
      subjects/displaylastparam.fr.md
  7. 10
      subjects/firstword.en.md
  8. 10
      subjects/firstword.fr.md
  9. 10
      subjects/inter.en.md
  10. 10
      subjects/inter.fr.md
  11. 13
      subjects/lastword.en.md
  12. 13
      subjects/lastword.fr.md
  13. 13
      subjects/repeatalpha.en.md
  14. 14
      subjects/repeatalpha.fr.md
  15. 4
      subjects/reversebits.en.md
  16. 7
      subjects/reversebits.fr.md
  17. 8
      subjects/rot13.en.md
  18. 11
      subjects/rot13.fr.md
  19. 8
      subjects/searchreplace.en.md
  20. 8
      subjects/searchreplace.fr.md
  21. 6
      subjects/swapbits.en.md
  22. 7
      subjects/swapbits.fr.md
  23. 8
      subjects/switchcase.en.md
  24. 10
      subjects/switchcase.fr.md
  25. 10
      subjects/union.en.md
  26. 10
      subjects/union.fr.md

8
subjects/alphamirror.en.md

@ -2,7 +2,7 @@
### Instructions ### Instructions
Write a program called alphamirror that takes a string as argument and displays this string Write a program called `alphamirror` that takes a `string` as argument and displays this `string`
after replacing each alphabetical character with the opposite alphabetical after replacing each alphabetical character with the opposite alphabetical
character. character.
@ -11,11 +11,11 @@ The case of the letter stays the same, for example :
'a' becomes 'z', 'Z' becomes 'A' 'a' becomes 'z', 'Z' becomes 'A'
'd' becomes 'w', 'M' becomes 'N' 'd' becomes 'w', 'M' becomes 'N'
The final result will be followed by a newline. The final result will be followed by a newline(`'\n'`).
If the number of arguments is not 1, the program will display only a newline. If the number of arguments is not 1, the program displays only a newline(`'\n'`).
Example of output : ### Usage
```console ```console
student@ubuntu:~/student/alphamirror$ go build student@ubuntu:~/student/alphamirror$ go build

16
subjects/alphamirror.fr.md

@ -2,20 +2,18 @@
### Instructions ### Instructions
Write a program called alphamirror that takes a string as argument and displays this string Écrire un programme nommé `alphamirror` qui prend une `string` come argument et qui affiche cette `string` après remplacement de chaque charactère alphabétique avec son opposé.
after replacing each alphabetical character with the opposite alphabetical
character.
The case of the letter stays the same, for example : Les majuscules restent des majuscules, de même pour le minuscules, par exemple :
'a' becomes 'z', 'Z' becomes 'A' 'a' devient 'z', 'Z' devient 'A'
'd' becomes 'w', 'M' becomes 'N' 'd' devient 'w', 'M' devient 'N'
The final result will be followed by a newline. Le résultat final sera suivi d'un newline(`'\n'`).
If the number of arguments is not 1, the program will display only a newline. Si le nombre d'arguments n'est pas 1, le programme affiche seulement un newline(`'\n'`).
Example of output : ### Utilisation
```console ```console
student@ubuntu:~/student/alphamirror$ go build student@ubuntu:~/student/alphamirror$ go build

4
subjects/displayfirstparam.en.md

@ -2,9 +2,9 @@
### Instructions ### Instructions
Write a program that takes strings as arguments, and displays its first argument. Write a program that takes `strings` as arguments, and displays its first argument.
### Expected output ### Usage
```console ```console
student@ubuntu:~/piscine/test$ go build student@ubuntu:~/piscine/test$ go build

4
subjects/displayfirstparam.fr.md

@ -2,9 +2,9 @@
### Instructions ### Instructions
Write a program that takes strings as arguments, and displays its first argument. Écrire un programme qui prend des `strings` comme arguments, et qui affiche le premier argument.
### Expected output ### Utilisation
```console ```console
student@ubuntu:~/piscine/test$ go build student@ubuntu:~/piscine/test$ go build

2
subjects/displaylastparam.en.md

@ -2,7 +2,7 @@
### Instructions ### Instructions
Write a program that takes strings as arguments, and displays its last argument. Write a program that takes `strings` as arguments, and displays its last argument.
### Expected output ### Expected output

2
subjects/displaylastparam.fr.md

@ -2,7 +2,7 @@
### Instructions ### Instructions
Write a program that takes strings as arguments, and displays its last argument. Écrire un programme qui prend des `strings` comme arguments, et qui affiche le dernier argument.
### Expected output ### Expected output

10
subjects/firstword.en.md

@ -2,15 +2,15 @@
### Instructions ### Instructions
Write a program that takes a string and displays its first word, followed by a newline. Write a program that takes a `string` and displays its first word, followed by a newline(`'\n'`).
- A word is a section of string delimited by spaces or by the start/end of the string. - A word is a section of `string` delimited by spaces or by the start/end of the `string`.
- The output will be followed by a newline. - The output will be followed by a newline(`'\n'`).
- If the number of parameters is not 1, or if there are no words, simply display a newline. - If the number of parameters is not 1, or if there are no words, the program displays a newline(`'\n'`).
### Expected output ### Usage
```console ```console
student@ubuntu:~/piscine/test$ go build student@ubuntu:~/piscine/test$ go build

10
subjects/firstword.fr.md

@ -2,15 +2,15 @@
### Instructions ### Instructions
Write a program that takes a string and displays its first word, followed by a newline. Écrire un programme qui prend une `string` et qui affiche son premier mot, suivi d'un newline(`'\n'`).
- A word is a section of string delimited by spaces or by the start/end of the string. - Un mot est une section de `string` délimité par des espace ou par le début/fin d'une `string`.
- The output will be followed by a newline. - L'output sera suivi d'un newline(`'\n'`).
- If the number of parameters is not 1, or if there are no words, simply display a newline. - Si le nombre de paramètres n'est pas 1, ou si il n'y a pas de mots, le programme affiche un newline(`'\n'`).
### Expected output ### Utilisation
```console ```console
student@ubuntu:~/piscine/test$ go build student@ubuntu:~/piscine/test$ go build

10
subjects/inter.en.md

@ -1,14 +1,14 @@
## switchcase ## inter
### Instructions ### Instructions
Write a program that takes two strings and displays, without doubles, the characters that appear in both strings, in the order they appear in the first one. Write a program that takes two `strings` and displays, without doubles, the characters that appear in both `strings`, in the order they appear in the first one.
- The display will be followed by a `\n`. - The display will be followed by a newline(`'\n'`).
- If the number of arguments is not 2, the program displays `\n`. - If the number of arguments is not 2, the program displays a newline(`'\n'`).
### Expected output ### Usage
```console ```console
student@ubuntu:~/piscine/test$ go build student@ubuntu:~/piscine/test$ go build

10
subjects/inter.fr.md

@ -1,14 +1,14 @@
## switchcase ## inter
### Instructions ### Instructions
Write a program that takes two strings and displays, without doubles, the characters that appear in both strings, in the order they appear in the first one. Écrire un programme qui prend deux `strings` et qui affiche, sans doublons, les caractères qui apparaissent dans les deux `strings`, dans l'ordre dans lequel ils apparaissent dans la première.
- The display will be followed by a `\n`. - L'affichage sera suivi d'un newline(`'\n'`).
- If the number of arguments is not 2, the program displays `\n`. - Si le nombre d'arguments n'est pas 2, le programme affiche un newline(`'\n'`).
### Expected output ### Utilisation
```console ```console
student@ubuntu:~/piscine/test$ go build student@ubuntu:~/piscine/test$ go build

13
subjects/lastword.en.md

@ -2,16 +2,15 @@
### Instructions ### Instructions
Write a program that takes a string and displays its last word, followed by a Write a program that takes a `string` and displays its last word, followed by a newline(`'\n'`).
newline.
A word is a section of string delimited by spaces/tabs or by the start/end of - A word is a section of `string` delimited by spaces or by the start/end of the `string`.
the string.
If the number of parameters is not 1, or if there are no words, simply display - The output will be followed by a newline(`'\n'`).
a newline.
Example : - If the number of parameters is not 1, or if there are no words, the program displays a newline(`'\n'`).
### Usage
```console ```console
student@ubuntu:~/student/lastword$ go build student@ubuntu:~/student/lastword$ go build

13
subjects/lastword.fr.md

@ -2,16 +2,15 @@
### Instructions ### Instructions
Write a program that takes a string and displays its last word, followed by a Écrire un programme qui prend une `string` et qui affiche son dernier mot, suivi d'un newline(`'\n'`).
newline.
A word is a section of string delimited by spaces/tabs or by the start/end of - Un mot est une section de `string` délimité par des espace ou par le début/fin d'une `string`.
the string.
If the number of parameters is not 1, or if there are no words, simply display - L'output sera suivi d'un newline(`'\n'`).
a newline.
Example : - Si le nombre de paramètres n'est pas 1, ou si il n'y a pas de mots, le programme affiche un newline(`'\n'`).
### Utilisation
```console ```console
student@ubuntu:~/student/lastword$ go build student@ubuntu:~/student/lastword$ go build

13
subjects/repeatalpha.en.md

@ -2,17 +2,18 @@
### Instructions ### Instructions
Write a program called repeat_alpha that takes a string and display it Write a program called `repeat_alpha` that takes a `string` and displays it
repeating each alphabetical character as many times as its alphabetical index, repeating each alphabetical character as many times as its alphabetical index.
followed by a newline.
The result must be followed by a newline(`'\n'`).
`'a'` becomes `'a'`, `'b'` becomes `'bb'`, `'e'` becomes `'eeeee'`, etc... `'a'` becomes `'a'`, `'b'` becomes `'bb'`, `'e'` becomes `'eeeee'`, etc...
Case remains unchanged. The case remains unchanged.
If the number of arguments is not 1, just display a newline. If the number of arguments is not 1, the program displays a newline(`'\n'`).
Examples: ### Usage
```console ```console
student@ubuntu:~/student/repeatalpha$ go build student@ubuntu:~/student/repeatalpha$ go build

14
subjects/repeatalpha.fr.md

@ -2,17 +2,17 @@
### Instructions ### Instructions
Write a program called repeat_alpha that takes a string and display it Écrire un programme `repeat_alpha` qui prend une `string` et qui affiche la répétition de chaque charactère de l'alpabet autant de fois que l'index de cette lettre.
repeating each alphabetical character as many times as its alphabetical index,
followed by a newline.
`'a'` becomes `'a'`, `'b'` becomes `'bb'`, `'e'` becomes `'eeeee'`, etc... Le résultat doit être suivi d'un newline(`'\n'`).
Case remains unchanged. `'a'` deviens `'a'`, `'b'` deviens `'bb'`, `'e'` deviens `'eeeee'`, etc...
If the number of arguments is not 1, just display a newline. Si une lettre est majuscule, elle reste majuscule, de même si elle est minuscule.
Examples: Si le nombre d'arguments n'est pas 1, le programme affiche un newline(`'\n'`).
### Utilisation
```console ```console
student@ubuntu:~/student/repeatalpha$ go build student@ubuntu:~/student/repeatalpha$ go build

4
subjects/reversebits.en.md

@ -2,10 +2,10 @@
### Instructions ### Instructions
Write a function that takes a byte, reverses it, bit by bit (like the Write a function that takes a `byte`, reverses it `bit` by `bit` (like the
example) and returns the result. example) and returns the result.
Your function must be declared as follows: ### Expected function
```go ```go
func ReverseBits(octet byte) byte { func ReverseBits(octet byte) byte {

7
subjects/reversebits.fr.md

@ -2,10 +2,9 @@
### Instructions ### Instructions
Write a function that takes a byte, reverses it, bit by bit (like the Écrire une fonction qui prend un `byte`, l'inverse `bit` par `bit` (comme sur l'exemple) et retourne le résultat.
example) and returns the result.
Your function must be declared as follows: ### Fonction attendue
```go ```go
func ReverseBits(octet byte) byte { func ReverseBits(octet byte) byte {
@ -13,7 +12,7 @@ func ReverseBits(octet byte) byte {
} }
``` ```
Example: Exemple:
1 byte 1 byte

8
subjects/rot13.en.md

@ -2,16 +2,16 @@
### Instructions ### Instructions
Write a program that takes a string and displays it, replacing each of its Write a program that takes a `string` and displays it, replacing each of its
letters by the letter 13 spaces ahead in alphabetical order. letters by the letter 13 spaces ahead in alphabetical order.
- 'z' becomes 'm' and 'Z' becomes 'M'. Case remains unaffected. - 'z' becomes 'm' and 'Z' becomes 'M'. Case remains unaffected.
- The output will be followed by a newline. - The output will be followed by a newline(`'\n'`).
- If the number of arguments is not 1, the program displays a newline. - If the number of arguments is not 1, the program displays a newline(`'\n'`).
### Expected output ### Usage
```console ```console
student@ubuntu:~/piscine/test$ go build student@ubuntu:~/piscine/test$ go build

11
subjects/rot13.fr.md

@ -2,16 +2,15 @@
### Instructions ### Instructions
Write a program that takes a string and displays it, replacing each of its Écrire un programme qui prend une `string` et qui l'affiche, en remplaçant chacune de ses lettres par la lettre 13 positions après dans l'ordre alphabétique.
letters by the letter 13 spaces ahead in alphabetical order.
- 'z' becomes 'm' and 'Z' becomes 'M'. Case remains unaffected. - 'z' devient 'm' et 'Z' devient 'M'. Les majuscules restent des majuscules, de même pour les minuscules.
- The output will be followed by a newline. - l'output sera suivi d'un newline(`'\n'`).
- If the number of arguments is not 1, the program displays a newline. - Si le nombre d'arguments n'est pas 1, le programme affiche un newline(`'\n'`).
### Expected output ### Utilisation
```console ```console
student@ubuntu:~/piscine/test$ go build student@ubuntu:~/piscine/test$ go build

8
subjects/searchreplace.en.md

@ -2,13 +2,13 @@
### Instructions ### Instructions
Write a program that takes 3 arguments, the first arguments is a string in which to replace a letter (2nd argument) by another one (3rd argument). Write a program that takes 3 arguments, the first argument is a `string` in which to replace a letter (the 2nd argument) by another one (the 3rd argument).
- If the number of arguments is not 3, just display a newline. - If the number of arguments is not 3, the program displays a newline(`'\n'`).
- If the second argument is not contained in the first one (the string) then the program simply rewrites the string followed by a newline. - If the second argument is not contained in the first one (the string) then the program rewrites the `string` followed by a newline(`'\n'`).
### Expected output ### Usage
```console ```console
student@ubuntu:~/piscine/test$ go build student@ubuntu:~/piscine/test$ go build

8
subjects/searchreplace.fr.md

@ -2,13 +2,13 @@
### Instructions ### Instructions
Write a program that takes 3 arguments, the first arguments is a string in which to replace a letter (2nd argument) by another one (3rd argument). Écrire un programme qui prends 3 arguments, le premier argument est une `string` dans laquelle une lettre (le 2éme argument) est remplacée par une autre (3éme argument).
- If the number of arguments is not 3, just display a newline. - Si le nombre d'aruments n'est pas 3, le programme affiche un newline(`'\n'`).
- If the second argument is not contained in the first one (the string) then the program simply rewrites the string followed by a newline. - Si le second argument n'est pas contenu dans le premier (la `string`) alors le programme réécris la `string` suivi d'un newline(`'\n'`).
### Expected output ### Utilisation
```console ```console
student@ubuntu:~/piscine/test$ go build student@ubuntu:~/piscine/test$ go build

6
subjects/swapbits.en.md

@ -2,10 +2,10 @@
### Instructions ### Instructions
Write a function that takes a byte, swaps its halves (like the example) and Write a function that takes a `byte`, swaps its halfs (like the
returns the result. example) and returns the result.
Your function must be declared as follows: ### Expected function
```go ```go
func SwapBits(octet byte) byte { func SwapBits(octet byte) byte {

7
subjects/swapbits.fr.md

@ -2,10 +2,9 @@
### Instructions ### Instructions
Write a function that takes a byte, swaps its halves (like the example) and Écrire une fonction qui prend un `byte`, échange ses moitiés (comme sur l'exemple) et retourne le résultat.
returns the result.
Your function must be declared as follows: ### Fonction attendue
```go ```go
func SwapBits(octet byte) byte { func SwapBits(octet byte) byte {
@ -13,7 +12,7 @@ func SwapBits(octet byte) byte {
} }
``` ```
Example: Exemple:
1 byte 1 byte

8
subjects/switchcase.en.md

@ -2,15 +2,15 @@
### Instructions ### Instructions
Write a program that takes a string and reverses the case of all its letters. Write a program that takes a `string` and reverses the case of all its letters.
- Other characters remain unchanged. - Other characters remain unchanged.
- You must display the result followed by a '\n'. - The result must be followed by a newline(`'\n'`).
- If the number of arguments is not 1, the program displays '\n'. - If the number of arguments is not 1, the program displays a newline(`'\n'`).
### Expected output ### Usage
```console ```console
student@ubuntu:~/piscine/test$ go build student@ubuntu:~/piscine/test$ go build

10
subjects/switchcase.fr.md

@ -2,15 +2,15 @@
### Instructions ### Instructions
Write a program that takes a string and reverses the case of all its letters. Écrire un programme qui prend une `string` et qui inverses les majuscules en minuscules et vice-versa.
- Other characters remain unchanged. - Tout autre charactère reste inchangé.
- You must display the result followed by a '\n'. - Le résultat doit être suivi d'un newline(`'\n'`).
- If the number of arguments is not 1, the program displays '\n'. - Si le nombre d'arguments n'est pas 1, le programme affiche program un newline(`'\n'`).
### Expected output ### Utilisation
```console ```console
student@ubuntu:~/piscine/test$ go build student@ubuntu:~/piscine/test$ go build

10
subjects/union.en.md

@ -2,15 +2,15 @@
### Instructions ### Instructions
Write a program that takes two strings and displays, without doubles, the Write a program that takes two `strings` and displays, without doubles, the
characters that appear in either one of the strings. characters that appear in either one of the `strings`.
The display will be in the order characters appear in the command line, and The display will be in the order characters appear in the command line, and
will be followed by a \n. will be followed by a newline(`'\n'`).
If the number of arguments is not 2, the program displays \n. If the number of arguments is not 2, the program displays newline(`'\n'`).
Example : ### Usage
```console ```console
student@ubuntu:~/student/union$ go build student@ubuntu:~/student/union$ go build

10
subjects/union.fr.md

@ -2,15 +2,13 @@
### Instructions ### Instructions
Write a program that takes two strings and displays, without doubles, the Écrire un programme qui prend deux `strings` et affiche, sans doublons, les caractères qui apparaissent dans l'une ou l'autre des `strings`.
characters that appear in either one of the strings.
The display will be in the order characters appear in the command line, and L'affichage se fera dans l'ordre d'apparition des caractères de la ligne de commande, et il sera suivi d'un newline(`'\n'`).
will be followed by a \n.
If the number of arguments is not 2, the program displays \n. Si le nombre d'arguments n'est pas 2, le programme affiche un newline(`'\n'`).
Example : ### Utilisation
```console ```console
student@ubuntu:~/student/union$ go build student@ubuntu:~/student/union$ go build

Loading…
Cancel
Save