diff --git a/subjects/addprimesum.en.md b/subjects/addprimesum.en.md index baa1cf9a9..db4428e18 100644 --- a/subjects/addprimesum.en.md +++ b/subjects/addprimesum.en.md @@ -2,11 +2,11 @@ ### Instructions -Write a program that takes a positive integer as argument and displays the sum of all prime numbers inferior or equal to it followed by a newline. +Write a program that takes a positive integer as argument and displays the sum of all prime numbers inferior or equal to it followed by a newline(`'\n`'). -- If the number of arguments is not 1, or if the argument is not a positive number, the program displays 0 followed by a newline. +- If the number of arguments is different from 1, or if the argument is not a positive number, the program displays `0` followed by a newline. -Examples of outputs : +### Usage ```console student@ubuntu:~/piscine/test$ go build diff --git a/subjects/addprimesum.fr.md b/subjects/addprimesum.fr.md index baa1cf9a9..86c5d28bd 100644 --- a/subjects/addprimesum.fr.md +++ b/subjects/addprimesum.fr.md @@ -2,11 +2,11 @@ ### Instructions -Write a program that takes a positive integer as argument and displays the sum of all prime numbers inferior or equal to it followed by a newline. +Écrire un programme qui prend un entier positif comme argument et qui affiche la somme de tous les nombres premiers inférieurs ou égaux à celui-ci, suivie d'un newline(`'\n`'). -- If the number of arguments is not 1, or if the argument is not a positive number, the program displays 0 followed by a newline. +- Si le nombre d'arguments est différent de 1, ou si l'argument n'est pas un nombre positif, le programme affiche `0` suivi d'un newline. -Examples of outputs : +### Utilisation ```console student@ubuntu:~/piscine/test$ go build diff --git a/subjects/alphamirror.en.md b/subjects/alphamirror.en.md index 96058e434..ccac3f433 100644 --- a/subjects/alphamirror.en.md +++ b/subjects/alphamirror.en.md @@ -13,7 +13,7 @@ The case of the letter stays the same, for example : The final result will be followed by a newline(`'\n'`). -If the number of arguments is not 1, the program displays only a newline(`'\n'`). +If the number of arguments is different from 1, the program displays only a newline(`'\n'`). ### Usage diff --git a/subjects/alphamirror.fr.md b/subjects/alphamirror.fr.md index ed8f0cc65..21213e927 100644 --- a/subjects/alphamirror.fr.md +++ b/subjects/alphamirror.fr.md @@ -11,7 +11,7 @@ Les majuscules restent des majuscules, de même pour le minuscules, par exemple Le résultat final sera suivi d'un newline(`'\n'`). -Si le nombre d'arguments n'est pas 1, le programme affiche seulement un newline(`'\n'`). +Si le nombre d'arguments est différent de 1, le programme affiche seulement un newline(`'\n'`). ### Utilisation diff --git a/subjects/atoi.en.md b/subjects/atoi.en.md index 64271f6d3..f8d596156 100644 --- a/subjects/atoi.en.md +++ b/subjects/atoi.en.md @@ -4,13 +4,13 @@ - Write a [function](TODO-LINK) that simulates the behaviour of the `Atoi` function in Go. `Atoi` transforms a number represented as a `string` in a number represented as an `int`. -- Atoi returns `0` if the `string` is not considered as a valid number. For this exercise **non-valid `string` chains will be tested**. Some will contain non-digits characters. +- `Atoi` returns `0` if the `string` is not considered as a valid number. For this exercise **non-valid `string` chains will be tested**. Some will contain non-digits characters. - For this exercise the handling of the signs + or - **does have** to be taken into account. - This function will **only** have to return the `int` `nbr`. For this exercise the `error` return of atoi is not required. -### Format required +### Expected function ```go func Atoi(s string) int { diff --git a/subjects/atoi.fr.md b/subjects/atoi.fr.md index 4ccbff94c..f11586ed3 100644 --- a/subjects/atoi.fr.md +++ b/subjects/atoi.fr.md @@ -2,9 +2,9 @@ ### Instructions -- Écrire une fonction qui reproduit le comportement de la fonction atoi en Go. Atoi transforme un nombre représenté en `string` (chaîne de caractères) en `int` (entier). +- Écrire une fonction qui reproduit le comportement de la fonction `Atoi` en Go. `Atoi` transforme un nombre représenté en `string` (chaîne de caractères) en `int` (entier). -- Atoi retourne `0` si la `string` n'est pas considéré un nombre valide. Pour cet exercice des **`string` non valides seront testées!**. Certaines contiendront d'autres charactères que des chiffres. +- `Atoi` retourne `0` si la `string` n'est pas considéré un nombre valide. Pour cet exercice des **`string` non valides seront testées!**. Certaines contiendront d'autres caractères que des chiffres. - Pour cet exercice la gestion des signes + ou - **doit être** prise en compte. diff --git a/subjects/atoibase.fr.md b/subjects/atoibase.fr.md index a69605619..165115ade 100644 --- a/subjects/atoibase.fr.md +++ b/subjects/atoibase.fr.md @@ -2,15 +2,15 @@ ### Instructions -Écrire une fonction qui prend un nombre `string` et sa base `string` en paramètres et retournes sa convertion en `int`. +Écrire une fonction qui prend un nombre `string` et sa base `string` en paramètres et retourne sa conversion en `int`. -Si la base n'est pas valide elle retournes `0`: +Si la base n'est pas valide elle retourne `0`: -Régles de validité d'une base : +Règles de validité d'une base : -- Une base doit contenir au moins 2 charactères. -- Chaque charactère d'une base doit être unique. -- Une base ne doit pas contenir les charactères `+` ou `-`. +- Une base doit contenir au moins 2 caractères. +- Chaque caractère d'une base doit être unique. +- Une base ne doit pas contenir les caractères `+` ou `-`. Seuls des nombres en `string` valides seront testés. diff --git a/subjects/basicatoi2.fr.md b/subjects/basicatoi2.fr.md index 7c9e01136..e04d6f6a4 100644 --- a/subjects/basicatoi2.fr.md +++ b/subjects/basicatoi2.fr.md @@ -4,7 +4,7 @@ - Écrire une fonction qui reproduit le comportement de la fonction atoi en Go. Atoi transforme un nombre représenté en `string` (chaîne de caractères) en `int` (entier). -- Atoi retourne `0` si la `string` n'est pas considéré un nombre valide. Pour cet exercice des **`string` non valides seront testées!**. Certaines contiendront d'autres charactères que des chiffres. +- Atoi retourne `0` si la `string` n'est pas considérée comme un nombre valide. Pour cet exercice des **`string` non valides seront testées!**. Certaines contiendront d'autres caractères que des chiffres. - Pour cet exercice la gestion des signes + ou - ne doit pas être prise en compte. diff --git a/subjects/brackets.en.md b/subjects/brackets.en.md index 9b981d461..ac1d20995 100644 --- a/subjects/brackets.en.md +++ b/subjects/brackets.en.md @@ -2,23 +2,20 @@ ### Instructions -Write a program that takes an undefined number of strings in arguments. For each -argument, the program prints on the standard output "OK" followed by a newline -if the expression is correctly bracketed, otherwise it prints "Error" followed by +Write a program that takes an undefined number of `strings` in arguments. For each +argument, if the expression is correctly bracketed, the program prints on the standard output `OK` followed by a newline(`'\n'`), otherwise it prints "Error" followed by a newline. - -Symbols considered as `brackets` are brackets `(` and `)`, square brackets `[` -and `]`and braces `{` and `}`. Every other symbols are simply ignored. +Symbols considered as `brackets` are parentheses `(` and `)`, square brackets `[` +and `]` and curly braces `{` and `}`. Every other symbols are simply ignored. An opening bracket must always be closed by the good closing bracket in the -correct order. A string which do not contains any bracket is considered as a -correctly bracketed string. - -If there is no arguments, the program must print only a newline. +correct order. A `string` which does not contain any bracket is considered as a +correctly bracketed `string`. +If there is no argument, the program must print only a newline. -Examples of outputs : +### Usage ```console student@ubuntu:~/student/brackets$ go build diff --git a/subjects/brackets.fr.md b/subjects/brackets.fr.md index 9b981d461..d0fc3bd5d 100644 --- a/subjects/brackets.fr.md +++ b/subjects/brackets.fr.md @@ -2,23 +2,17 @@ ### Instructions -Write a program that takes an undefined number of strings in arguments. For each -argument, the program prints on the standard output "OK" followed by a newline -if the expression is correctly bracketed, otherwise it prints "Error" followed by -a newline. +Écrire un programme qui prend un nombre indéfini de `strings` en arguments. Pour chaque +argument, si l'expression est correctement "entre parenthèses" (bracketed), le programme affiche sur la sortie standard `OK` suivi d'un newline(`'\n'`), autrement il affiche `Error` suivi d'un newline. +Les symboles considérés comme des `parenthèses` sont les parenthèses `(` et `)`, les crochets `[` +et `]` et les accolades `{` et `}`. Tout autre symbole est simplement ignoré. -Symbols considered as `brackets` are brackets `(` and `)`, square brackets `[` -and `]`and braces `{` and `}`. Every other symbols are simply ignored. +Une parenthèse ouvrante doit toujours être fermée par la parenthèse correspondante dans l'ordre correct. Une `string` qui ne contient aucune parenthèse est considérée comme une `string` correctement "entre parenthèses". -An opening bracket must always be closed by the good closing bracket in the -correct order. A string which do not contains any bracket is considered as a -correctly bracketed string. +Si il n'y a pas d'argument, le programme affiche seulement un newline. -If there is no arguments, the program must print only a newline. - - -Examples of outputs : +### Utilisation ```console student@ubuntu:~/student/brackets$ go build diff --git a/subjects/brainfuck.en.md b/subjects/brainfuck.en.md index 8964585b5..a42af67a7 100644 --- a/subjects/brainfuck.en.md +++ b/subjects/brainfuck.en.md @@ -2,12 +2,12 @@ ### Instructions -Write a Brainfuck interpreter program. +Write a `Brainfuck` interpreter program. The source code will be given as first parameter. -The code will always be valid, with no more than 4096 operations. -Brainfuck is a minimalist language. It consists of an array of bytes -(in our case, let's say 2048 bytes) initialized to zero, -and a pointer to its first byte. +The code will always be valid, with less than 4096 operations. +`Brainfuck` is a minimalist language. It consists of an array of bytes +(in this exercice 2048 bytes) all initialized with zero, +and with a pointer to its first byte. Every operator consists of a single character : @@ -16,12 +16,12 @@ Every operator consists of a single character : - '+' increment the pointed byte ; - '-' decrement the pointed byte ; - '.' print the pointed byte on standard output ; -- '[' go to the matching ']' if the pointed byte is 0 (while start) ; -- ']' go to the matching '[' if the pointed byte is not 0 (while end). +- '[' go to the matching ']' if the pointed byte is 0 (loop start) ; +- ']' go to the matching '[' if the pointed byte is not 0 (loop end). Any other character is a comment. -Examples of outputs : +### Usage ```console student@ubuntu:~/student/brainfuck$ go build diff --git a/subjects/brainfuck.fr.md b/subjects/brainfuck.fr.md index 8964585b5..c69935bd5 100644 --- a/subjects/brainfuck.fr.md +++ b/subjects/brainfuck.fr.md @@ -2,26 +2,26 @@ ### Instructions -Write a Brainfuck interpreter program. -The source code will be given as first parameter. -The code will always be valid, with no more than 4096 operations. -Brainfuck is a minimalist language. It consists of an array of bytes -(in our case, let's say 2048 bytes) initialized to zero, -and a pointer to its first byte. +Écrire un program interpréteur du `Brainfuck`. +Le code source sera donné en premier paramètre. +Le code sera toujours valide, avec moins de 4096 operations. +Le `Brainfuck` est un langage minimaliste. Il consiste en un slice de bytes (octet) +(dans cet exercise 2048 bytes) tous initialisés à zéro, +et avec un pointeur sur le premier byte. -Every operator consists of a single character : +Chaque opérateur consiste en un seul caractère : -- '>' increment the pointer ; -- '<' decrement the pointer ; -- '+' increment the pointed byte ; -- '-' decrement the pointed byte ; -- '.' print the pointed byte on standard output ; -- '[' go to the matching ']' if the pointed byte is 0 (while start) ; -- ']' go to the matching '[' if the pointed byte is not 0 (while end). +- '>' incrémente le pointeur ; +- '<' décrémente le pointeur ; +- '+' incrémente le byte pointé ; +- '-' décrémente le byte pointé ; +- '.' affiche le byte pointé sur la sortie standard ; +- '[' se rend à son ']' correspondant si le byte pointé est 0 (début de la boucle) ; +- ']' se rend à son '[' correspondant si le byte pointé n'est pas 0 (fin de la boucle). -Any other character is a comment. +Tout autre caractère est un commentaire. -Examples of outputs : +### Utilisation ```console student@ubuntu:~/student/brainfuck$ go build diff --git a/subjects/capitalize.fr.md b/subjects/capitalize.fr.md index 526660aa7..1e1058e59 100644 --- a/subjects/capitalize.fr.md +++ b/subjects/capitalize.fr.md @@ -2,7 +2,7 @@ ### Instructions -Écrire une fonction qui met en majuscule la premiere lettre de chaque mot et en minuscule les autres lettres du reste du mot d'une `string`. +Écrire une fonction qui met en majuscule la première lettre de chaque mot et en minuscule les autres lettres du reste du mot d'une `string`. Un mot est une suite de caractères **alphanumériques**. diff --git a/subjects/createelem.fr.md b/subjects/createelem.fr.md index ecdb9ea7e..8fe85efd1 100644 --- a/subjects/createelem.fr.md +++ b/subjects/createelem.fr.md @@ -2,9 +2,9 @@ ### Instructions -Write a function `CreateElem` that creates a new element of type`Node`. +Écrire une fonction `CreateElem` qui crée un nouvel élément de type `Node`. -### Expected function and structure +### Fonction attendue et structure ```go type Node struct { @@ -16,9 +16,9 @@ func CreateElem(n *Node, value int) { } ``` -### Usage +### Utilisation -Here is a possible [program](TODO-LINK) to test your function : +Voici un éventuel [programme](TODO-LINK) pour tester votre fonction : ```go package main @@ -35,7 +35,7 @@ func main() { } ``` -And its output : +Et son résultat : ```console student@ubuntu:~/piscine/test$ go build diff --git a/subjects/doop.en.md b/subjects/doop.en.md index 1fdd5a9f8..d0c5a914f 100644 --- a/subjects/doop.en.md +++ b/subjects/doop.en.md @@ -14,11 +14,11 @@ In case of an invalid operator the programs prints `0`. In case of an invalid number of arguments the program prints nothing. -The program has to handle the modulo and division operations by 0 as shown on the output examples below. +The program has to handle the modulo and division operations by 0 as shown on the output examples below. `fmt.Print` is authorized. -Examples of outputs : +### Usage ```console student@ubuntu:~/piscine/test$ go build doop.go diff --git a/subjects/expandstr.en.md b/subjects/expandstr.en.md index 62be75bff..67717cfde 100644 --- a/subjects/expandstr.en.md +++ b/subjects/expandstr.en.md @@ -2,17 +2,17 @@ ### Instructions -Write a program that takes a string and displays it with exactly three spaces +Write a program that takes a `string` and displays it with exactly three spaces between each word, with no spaces or tabs at either the beginning nor the end. -The string will be followed by a newline. +The `string` will be followed by a newline(`'\n'`). A word is a sequence of alphanumerical characters. -If the number of parameters is not 1, or if there are no words, the program displays +If the number of parameters is not 1, or if there are no word, the program displays a newline. -Examples of outputs : +### Usage ```console student@ubuntu:~/student/expandstr$ go build diff --git a/subjects/expandstr.fr.md b/subjects/expandstr.fr.md index 62be75bff..3d13ae81a 100644 --- a/subjects/expandstr.fr.md +++ b/subjects/expandstr.fr.md @@ -2,17 +2,15 @@ ### Instructions -Write a program that takes a string and displays it with exactly three spaces -between each word, with no spaces or tabs at either the beginning nor the end. +Écrire un programme qui prend une `string` et qui l'affiche avec exactement 3 espaces entre chaque mot, sans espace ou tabulation ni au début ni à la fin. -The string will be followed by a newline. +La `string` sera suivie d'un newline(`'\n'`). -A word is a sequence of alphanumerical characters. +Un mot est une suite de caractères alphanumériques. -If the number of parameters is not 1, or if there are no words, the program displays -a newline. +Si le nombre de paramètres n'est pas 1, ou si il n'y a pas de mot, le programme affiche un newline. -Examples of outputs : +### Utilisation ```console student@ubuntu:~/student/expandstr$ go build diff --git a/subjects/fprime.en.md b/subjects/fprime.en.md index 3335cdd2e..7e3f65ebc 100644 --- a/subjects/fprime.en.md +++ b/subjects/fprime.en.md @@ -2,15 +2,15 @@ ### Instructions -Write a program that takes a positive `int` and displays its prime factors on the standard output, followed by a newline. +Write a program that takes a positive `int` and displays its prime factors, followed by a newline(`'\n'`). -- Factors must be displayed in ascending order and separated by `*`, so that the expression in the output gives the right result. +- Factors must be displayed in ascending order and separated by `*`. -- If the number of parameters is not 1, the program displays a newline. +- If the number of parameters is different from 1, the program displays a newline. - The input, when there is one, will always be valid. -Example of output : +### Usage ```console student@ubuntu:~/piscine/test$ go build diff --git a/subjects/fprime.fr.md b/subjects/fprime.fr.md index 3335cdd2e..28b11eb44 100644 --- a/subjects/fprime.fr.md +++ b/subjects/fprime.fr.md @@ -2,15 +2,15 @@ ### Instructions -Write a program that takes a positive `int` and displays its prime factors on the standard output, followed by a newline. +Écrire un programme qui prend un `int` positif et qui affiche ses facteurs premiers sur la sortie standard, suivi d'un newline(`'\n'`). -- Factors must be displayed in ascending order and separated by `*`, so that the expression in the output gives the right result. +- Les facteurs doivent être affichés en ordre croissant et séparés par `*`. -- If the number of parameters is not 1, the program displays a newline. +- Si le nombre de paramètres est différent de 1, le programme affiche un newline. -- The input, when there is one, will always be valid. +- L'input (l'entrée), quand il y en a un, sera toujours valide. -Example of output : +### Utilisation ```console student@ubuntu:~/piscine/test$ go build diff --git a/subjects/gcd.en.md b/subjects/gcd.en.md index b4080384e..64fe24d4f 100644 --- a/subjects/gcd.en.md +++ b/subjects/gcd.en.md @@ -2,17 +2,16 @@ ### Instructions -Write a program that takes two strings representing two strictly positive -integers that fit in an int. +Write a program that takes two `strings` representing two strictly positive +integers that fit in an `int`. -Display their greatest common divisor followed by a newline (It is always a -strictly positive integer). +The program displays their greatest common divisor followed by a newline('`\n`'). -If the number of parameters is not 2, display a newline. +If the number of parameters is different from 2, the program displays a newline. -All arguments tested will be valid positive `int` values. +All arguments tested will be positive `int` values. -Example of output : +### Usage ```console student@ubuntu:~/student/gcd$ go build diff --git a/subjects/gcd.fr.md b/subjects/gcd.fr.md index b4080384e..0fd724a4b 100644 --- a/subjects/gcd.fr.md +++ b/subjects/gcd.fr.md @@ -2,17 +2,15 @@ ### Instructions -Write a program that takes two strings representing two strictly positive -integers that fit in an int. +Écrire un programme qui prend deux `strings` représentant deux entiers strictement positifs qui rentrent dans un `int`. -Display their greatest common divisor followed by a newline (It is always a -strictly positive integer). +Afficher leur plus grand diviseur commun suivi d'un newline('`\n`'). -If the number of parameters is not 2, display a newline. +Si le nombre de paramètres est différent de 2, le programme affiche un newline. -All arguments tested will be valid positive `int` values. +Tous les arguments testés seront des `int` positifs. -Example of output : +### Utilisation ```console student@ubuntu:~/student/gcd$ go build diff --git a/subjects/hiddenp.en.md b/subjects/hiddenp.en.md index 7a71d84ee..4db88e82a 100644 --- a/subjects/hiddenp.en.md +++ b/subjects/hiddenp.en.md @@ -2,17 +2,17 @@ ### Instructions -Write a program named hiddenp that takes two strings and that, if the first string is hidden in the second one, displays 1 -followed by a newline, otherwise it displays 0 followed by a newline. +Write a program named `hiddenp` that takes two `strings` and that, if the first `string` is hidden in the second one, displays `1` +followed by a newline(`'\n'`), otherwise it displays `0` followed by a newline. -Let s1 and s2 be strings. It is considered that s1 is hidden in s2 if it is possible to +Let s1 and s2 be `strings`. It is considered that s1 is hidden in s2 if it is possible to find each character from s1 in s2, **in the same order as they appear in s1.** -If s1 is an empty string it is considered hidden in any string. +If s1 is an empty `string` it is considered hidden in any `string`. -If the number of parameters is not 2, the program displays a newline. +If the number of parameters is different from 2, the program displays a newline. -Example of output : +### Usage ```console student@ubuntu:~/student/hiddenp$ go build diff --git a/subjects/hiddenp.fr.md b/subjects/hiddenp.fr.md index 7a71d84ee..c563e3244 100644 --- a/subjects/hiddenp.fr.md +++ b/subjects/hiddenp.fr.md @@ -2,17 +2,16 @@ ### Instructions -Write a program named hiddenp that takes two strings and that, if the first string is hidden in the second one, displays 1 -followed by a newline, otherwise it displays 0 followed by a newline. +Écrire un programme nommé `hiddenp` qui prend deux `strings` et qui, si la première `string` est cachée dans la deuxième, affiche `1` +suivi d'un newline(`'\n'`), autrement il affiche `0` suivi d'un newline. -Let s1 and s2 be strings. It is considered that s1 is hidden in s2 if it is possible to -find each character from s1 in s2, **in the same order as they appear in s1.** +Considérons s1 et s2 comme étant des `strings`. Il est considéré que s1 est cachée dans s2 si il est possbile de trouver chaque caractère de s1 dans s2, **dans le même ordre d'apparence que s1.** -If s1 is an empty string it is considered hidden in any string. +Si s1 est une `string` vide elle est considérée cachée dans n'importe quelle `string`. -If the number of parameters is not 2, the program displays a newline. +Si le nombre de paramètres est différent de 2, le programme affiche un newline. -Example of output : +### Utilisation ```console student@ubuntu:~/student/hiddenp$ go build diff --git a/subjects/inter.en.md b/subjects/inter.en.md index 4a91443d7..f72a410d2 100644 --- a/subjects/inter.en.md +++ b/subjects/inter.en.md @@ -6,7 +6,7 @@ Write a program that takes two `strings` and displays, without doubles, the char - The display will be followed by a newline(`'\n'`). -- If the number of arguments is not 2, the program displays a newline(`'\n'`). +- If the number of arguments is different from 2, the program displays a newline(`'\n'`). ### Usage diff --git a/subjects/inter.fr.md b/subjects/inter.fr.md index 682f59f29..84b38c16d 100644 --- a/subjects/inter.fr.md +++ b/subjects/inter.fr.md @@ -6,7 +6,7 @@ - L'affichage sera suivi d'un newline(`'\n'`). -- Si le nombre d'arguments n'est pas 2, le programme affiche un newline(`'\n'`). +- Si le nombre d'arguments est différent de 2, le programme affiche un newline(`'\n'`). ### Utilisation diff --git a/subjects/ispowerof2.en.md b/subjects/ispowerof2.en.md index 9454cb39d..62ddde45f 100644 --- a/subjects/ispowerof2.en.md +++ b/subjects/ispowerof2.en.md @@ -4,9 +4,9 @@ Write a function that determines if a given number is a power of 2. -This function returns true if the given number is a power of 2, otherwise it returns false. +This function returns `true` if the given number is a power of 2, otherwise it returns `false`. -## Expected function +### Expected function ```go func IsPowerOf2(n uint) bool { diff --git a/subjects/ispowerof2.fr.md b/subjects/ispowerof2.fr.md index 9454cb39d..8147db777 100644 --- a/subjects/ispowerof2.fr.md +++ b/subjects/ispowerof2.fr.md @@ -2,11 +2,11 @@ ### Instructions -Write a function that determines if a given number is a power of 2. +Écrire une fonction qui détermine si un nombre donné est une puissance de 2. -This function returns true if the given number is a power of 2, otherwise it returns false. +Cette fonction retourne `true` si le nombre donné est une puissance de 2, autrement elle retourne `false`. -## Expected function +### Fonction attendue ```go func IsPowerOf2(n uint) bool { diff --git a/subjects/itoa.fr.md b/subjects/itoa.fr.md index f613beb43..e6e0bad6e 100644 --- a/subjects/itoa.fr.md +++ b/subjects/itoa.fr.md @@ -2,11 +2,11 @@ ### Instructions -- Write a function that simulates the behaviour of the `Itoa` function in Go. `Itoa` transforms a number represented as an`int` in a number represented as a `string`. +- Écrire une fonction qui reproduit le comportement de la fonction `Itoa` en Go. `Itoa` transforme un nombre représenté en `int` (entier) en `string` (chaîne de caractères). -- For this exercise the handling of the signs + or - **does have** to be taken into account. +- Pour cet exercice la gestion des signes + ou - **doit être** prise en compte. -## Expected function +## Fonction attendue ```go func Itoa(n int) string { diff --git a/subjects/itoabase.en.md b/subjects/itoabase.en.md index 2a1040edd..110054829 100644 --- a/subjects/itoabase.en.md +++ b/subjects/itoabase.en.md @@ -4,15 +4,15 @@ Write a function that: -- converts an integer value to a string using the specified base in the argument -- and then returns this string +- converts an `int` value to a `string` using the specified base in the argument +- and that returns this `string` -The base is expressed as an integer, from 2 to 16. The characters comprising +The base is expressed as an `int`, from 2 to 16. The characters comprising the base are the digits from 0 to 9, followed by uppercase letters from A to F. For example, the base `4` would be the equivalent of "0123" and the base `16` would be the equivalent of "0123456789ABCDEF". -If the value is negative, the resulting string has to be preceded with a +If the value is negative, the resulting `string` has to be preceded with a minus sign `-`. ### Expected function diff --git a/subjects/itoabase.fr.md b/subjects/itoabase.fr.md index 2a1040edd..d287831fb 100644 --- a/subjects/itoabase.fr.md +++ b/subjects/itoabase.fr.md @@ -2,20 +2,18 @@ ### Instructions -Write a function that: +Écrire une fonction qui: -- converts an integer value to a string using the specified base in the argument -- and then returns this string +- convertit une valeur `int` en `string` en utilisant la base spécifiée en argument +- et qui retourne cette `string` -The base is expressed as an integer, from 2 to 16. The characters comprising -the base are the digits from 0 to 9, followed by uppercase letters from A to F. +Cette base est exprimée comme un `int`, de 2 à 16. Les caractères compris dans la base sont les chiffres de 0 à 9, suivis des lettres majuscules de A à F. -For example, the base `4` would be the equivalent of "0123" and the base `16` would be the equivalent of "0123456789ABCDEF". +Par exemple, la base `4` sera équivalente à "0123" et la base `16` sera équivalente à "0123456789ABCDEF". -If the value is negative, the resulting string has to be preceded with a -minus sign `-`. +Si la valeur est négative, la `string` résultante doit être précédée d'un signe moins `-`. -### Expected function +### Fonction attendue ```go func ItoaBase(value, base int) string { diff --git a/subjects/lastword.en.md b/subjects/lastword.en.md index 0efe663cc..eedbc703d 100644 --- a/subjects/lastword.en.md +++ b/subjects/lastword.en.md @@ -8,7 +8,7 @@ Write a program that takes a `string` and displays its last word, followed by a - The output will be followed by a newline(`'\n'`). -- If the number of parameters is not 1, or if there are no words, the program displays a newline(`'\n'`). +- If the number of parameters is different from 1, or if there are no word, the program displays a newline(`'\n'`). ### Usage diff --git a/subjects/lastword.fr.md b/subjects/lastword.fr.md index d56a3a514..65b0a2c72 100644 --- a/subjects/lastword.fr.md +++ b/subjects/lastword.fr.md @@ -4,11 +4,11 @@ Écrire un programme qui prend une `string` et qui affiche son dernier mot, suivi d'un newline(`'\n'`). -- Un mot est une section de `string` délimité par des espace ou par le début/fin d'une `string`. +- Un mot est une section de `string` délimitée par des espaces ou par le début/fin d'une `string`. - L'output sera suivi d'un newline(`'\n'`). -- 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'`). +- Si le nombre de paramètres est différent de 1, ou si il n'y a pas de mot, le programme affiche un newline(`'\n'`). ### Utilisation diff --git a/subjects/listpushpara.fr.md b/subjects/listpushpara.fr.md deleted file mode 100644 index 08520796c..000000000 --- a/subjects/listpushpara.fr.md +++ /dev/null @@ -1,20 +0,0 @@ -## listpushpara - -### Instructions - -Write a program that creates a new linked list and includes each command-line argument in to the list. - -- The first argument should be at the end of the list - -And its output : - -```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./listpushparams choumi is the best cat -cat -best -the -is -choumi -student@ubuntu:~/piscine/test$ -``` diff --git a/subjects/listremoveif.en.md b/subjects/listremoveif.en.md index 5ed93d302..ba94e9933 100644 --- a/subjects/listremoveif.en.md +++ b/subjects/listremoveif.en.md @@ -2,7 +2,7 @@ ### Instructions -Write a function `ListRemoveIf` that removes all elements that are equal to the `data_ref` introduced in the argument of the function. +Write a function `ListRemoveIf` that removes all elements that are equal to the `data_ref` in the argument of the function. ### Expected function and structure diff --git a/subjects/options.en.md b/subjects/options.en.md index 0c7e426dd..4e0930753 100644 --- a/subjects/options.en.md +++ b/subjects/options.en.md @@ -2,21 +2,21 @@ ## Instructions -Write a program that takes an undefined number of arguments which could be considered as options and writes on the standard output a representation of those options as groups of bytes followed by a newline. +Write a program that takes an undefined number of arguments which could be considered as `options` and writes on the standard output a representation of those `options` as groups of `bytes` followed by a newline(`'\n'`). -- An option is an argument that begins by a `-` and have multiple characters which could be : - - abcdefghijklmnopqrstuvwxyz +- An `option` is an argument that begins with a `-` and that can have multiple characters which could be : + -abcdefghijklmnopqrstuvwxyz -- All options are stocked in a single int and each options represents a bit of that int, and should be stocked like this : +- All `options` are stocked in a single `int` and each `options` represents a bit of that `int`, and should be stocked like this : - - 00000000 00000000 00000000 00000000 - - ******zy xwvutsrq ponmlkji hgfedcba + - 00000000 00000000 00000000 00000000 + - ******zy xwvutsrq ponmlkji hgfedcba -- Launching the program without arguments or with the `-h` flag activated must print all the valid options on the standard output, as shown on one of the following examples. +- Launching the program without arguments or with the `-h` flag activated must print all the valid `options` on the standard output, as shown on one of the following examples. -- A wrong option must print "Invalid Option" followed by a newline. +- A wrong `option` must print `Invalid Option` followed by a newline. -## Expected output +## Usage ```console student@ubuntu:~/piscine/test$ go build diff --git a/subjects/options.fr.md b/subjects/options.fr.md index 0c7e426dd..dc49985f6 100644 --- a/subjects/options.fr.md +++ b/subjects/options.fr.md @@ -2,21 +2,21 @@ ## Instructions -Write a program that takes an undefined number of arguments which could be considered as options and writes on the standard output a representation of those options as groups of bytes followed by a newline. +Écrire un programme qui prend un nombre indéfini d'arguments qui peuvent être considérés comme des `options` et qui affiche sur la sortie standard une représentation de ces `options` comme groupes de `bytes`(octets) suivi d'un newline(`'\n'`). -- An option is an argument that begins by a `-` and have multiple characters which could be : - - abcdefghijklmnopqrstuvwxyz +- Une `option` est un argument qui commence avec un `-` et qui peux avoir de multiples caractères qui peuvent être : + -abcdefghijklmnopqrstuvwxyz -- All options are stocked in a single int and each options represents a bit of that int, and should be stocked like this : +- Toutes les `options` sont stockées dans un seul `int` et chaque `option` représente un bit de cet `int`, et doit être stocké comme ci-dessous : - - 00000000 00000000 00000000 00000000 - - ******zy xwvutsrq ponmlkji hgfedcba + - 00000000 00000000 00000000 00000000 + - ******zy xwvutsrq ponmlkji hgfedcba -- Launching the program without arguments or with the `-h` flag activated must print all the valid options on the standard output, as shown on one of the following examples. +- L'éxécution du programme sans argument ou avec l'option `-h` activée doit afficher toutes les `options` valides sur la sortie standard, comme montré dans un des exemples ci-dessous. -- A wrong option must print "Invalid Option" followed by a newline. +- Une mauvaise `option` doit afficher `Invalid Option` suivi d'un newline. -## Expected output +## Utilisation ```console student@ubuntu:~/piscine/test$ go build diff --git a/subjects/paramcount.en.md b/subjects/paramcount.en.md index c11c71718..8eb3a911c 100644 --- a/subjects/paramcount.en.md +++ b/subjects/paramcount.en.md @@ -3,11 +3,11 @@ ### Instructions Write a program that displays the number of arguments passed to it. This number will be followed by -a newline. +a newline(`'\n'`). -If there are no arguments, just display a 0 followed by a newline. +If there is no argument, the program displays `0` followed by a newline. -Examples of outputs : +### Usage ```console student@ubuntu:~/student/paramcount$ go build diff --git a/subjects/paramcount.fr.md b/subjects/paramcount.fr.md index c11c71718..438392a11 100644 --- a/subjects/paramcount.fr.md +++ b/subjects/paramcount.fr.md @@ -2,12 +2,11 @@ ### Instructions -Write a program that displays the number of arguments passed to it. This number will be followed by -a newline. +Écrire un programme qui affiche le nombre d'arguments passés à ce programme. Ce nombre sera suivi d'un newline(`'\n'`). -If there are no arguments, just display a 0 followed by a newline. +Si il n'y a pas d'argument, le programme affiche `0` suivi d'un newline. -Examples of outputs : +### Utilisation ```console student@ubuntu:~/student/paramcount$ go build diff --git a/subjects/printbits.en.md b/subjects/printbits.en.md index f27dfaee9..65be83a1b 100644 --- a/subjects/printbits.en.md +++ b/subjects/printbits.en.md @@ -16,4 +16,4 @@ func PrintBits(octe byte) { Example of output: -If 2 is passed to the function PrintBits, it will print "00000010". +If 2 is passed to the function `PrintBits`, it will print "00000010". diff --git a/subjects/printbits.fr.md b/subjects/printbits.fr.md index f27dfaee9..8e546ddd0 100644 --- a/subjects/printbits.fr.md +++ b/subjects/printbits.fr.md @@ -2,9 +2,9 @@ ### Instructions -Write a function that takes a byte, and prints it in binary value **without a newline at the end**. +Écrire une fonction qui prend un `byte`, et qui l'affiche en valeur binaire **sans newline à la fin**. -### Expected function +### Fonction attendue ```go func PrintBits(octe byte) { @@ -14,6 +14,6 @@ func PrintBits(octe byte) { ### Usage -Example of output: +Exemple d'output: -If 2 is passed to the function PrintBits, it will print "00000010". +Si 2 est passé à la fonction `PrintBits`, elle affichera "00000010". diff --git a/subjects/printhex.en.md b/subjects/printhex.en.md index efe74562c..b340b7faf 100644 --- a/subjects/printhex.en.md +++ b/subjects/printhex.en.md @@ -2,11 +2,11 @@ ### Instructions -Write a program that takes a positive (or zero) number expressed in base 10, and displays it in base 16 ( with lowercase letters) followed by a newline. +Write a program that takes a positive (or zero) number expressed in base 10, and displays it in base 16 (with lowercase letters) followed by a newline(`'\n'`). -- If the number of parameters is not 1, the program displays a newline. +- If the number of parameters is different from 1, the program displays a newline. -Examples of outputs : +### Usage ```console student@ubuntu:~/piscine/test$ go build diff --git a/subjects/printhex.fr.md b/subjects/printhex.fr.md index efe74562c..46b08d432 100644 --- a/subjects/printhex.fr.md +++ b/subjects/printhex.fr.md @@ -2,11 +2,11 @@ ### Instructions -Write a program that takes a positive (or zero) number expressed in base 10, and displays it in base 16 ( with lowercase letters) followed by a newline. +Écrire un programme qui prend un nombre positif (ou zéro) écrit en base 10, et qui l'affiche en base 16 (avec les lettres en minuscule) suivi d'un newline(`'\n`'). -- If the number of parameters is not 1, the program displays a newline. +- Si le nombre de paramètres est différent de 1, le programme affiche un newline. -Examples of outputs : +### Utilisation ```console student@ubuntu:~/piscine/test$ go build diff --git a/subjects/printmemory.fr.md b/subjects/printmemory.fr.md index 79631a414..2187dd39d 100644 --- a/subjects/printmemory.fr.md +++ b/subjects/printmemory.fr.md @@ -2,9 +2,9 @@ ### Instructions -Write a function that takes `(arr [10]int)`, and displays the memory as in the example. +Écrire une fonction qui prend `(arr [10]int)`, et qui affiche la mémoire comme dans l'exemple. -### Expected function +### Fonction attendue ```go func PrintMemory(arr [10]int) { @@ -12,9 +12,9 @@ func PrintMemory(arr [10]int) { } ``` -### Usage +### Utilisation -Here is a possible program to test your function : +Voici un éventuel [programme](TODO-LINK) pour tester votre fonction : ```go func main() { @@ -23,7 +23,7 @@ func main() { } ``` -And its output : +Et son résultat : ```console student@ubuntu:~/piscine/test$ go build diff --git a/subjects/printnbrbase.fr.md b/subjects/printnbrbase.fr.md index 73bb5fa86..e334b8261 100644 --- a/subjects/printnbrbase.fr.md +++ b/subjects/printnbrbase.fr.md @@ -6,13 +6,13 @@ Si la base n'est pas valide, la fonction affiche `NV` (Not Valid): -Régles de validité d'une base : +Règles de validité d'une base : -- Une base doit contenir au moins 2 charactères. -- Chaque charactère d'une base doit être unique. -- Une base ne doit pas contenir les charactères `+` ou `-`. +- Une base doit contenir au moins 2 caractères. +- Chaque caractère d'une base doit être unique. +- Une base ne doit pas contenir les caractères `+` ou `-`. -La fonction doit gérer les nombres négatifs. (comme montré sur l'exemple) +La fonction doit gérer les nombres négatifs (comme montré sur l'exemple). ### Fonction attendue diff --git a/subjects/range.en.md b/subjects/range.en.md index babd2cfc2..c1daa7493 100644 --- a/subjects/range.en.md +++ b/subjects/range.en.md @@ -2,11 +2,11 @@ ### Instructions -Write the function Range which must: +Write the function `Range` which must: - allocate (with make()) an array of integers. - fill it with consecutive values that begin at `start` and end at `end` (Including `start` and `end` !) -- finally return that array. +- and that returns that array. ### Expected function @@ -16,7 +16,7 @@ func Range(start, end int) []int { } ``` -Examples of outputs : +### Usage - With (1, 3) you will return an array containing 1, 2 and 3. - With (-1, 2) you will return an array containing -1, 0, 1 and 2. diff --git a/subjects/range.fr.md b/subjects/range.fr.md index babd2cfc2..3dccdc993 100644 --- a/subjects/range.fr.md +++ b/subjects/range.fr.md @@ -2,13 +2,13 @@ ### Instructions -Write the function Range which must: +Écrire la fonction `Range` qui doit: -- allocate (with make()) an array of integers. -- fill it with consecutive values that begin at `start` and end at `end` (Including `start` and `end` !) -- finally return that array. +- allouer (avec make()) une slice d'entiers. +- le remplir avec des valeurs consécutives qui commencent à `start` et qui finissent à `end` (En incluant `start` et `end` !) +- et qui retourne cette slice. -### Expected function +### Fonction attendue ```go func Range(start, end int) []int { @@ -16,9 +16,9 @@ func Range(start, end int) []int { } ``` -Examples of outputs : +### Utilisation -- With (1, 3) you will return an array containing 1, 2 and 3. -- With (-1, 2) you will return an array containing -1, 0, 1 and 2. -- With (0, 0) you will return an array containing 0. -- With (0, -3) you will return an array containing 0, -1, -2 and -3. +- Avec (1, 3) la fonction devra retourner une slice contenant 1, 2 et 3. +- Avec (-1, 2) la fonction devra retourner une slice contenant -1, 0, 1 et 2. +- Avec (0, 0) la fonction devra retourner une slice contenant 0. +- Avec (0, -3) la fonction devra retourner une slice contenant 0, -1, -2 et -3. diff --git a/subjects/repeatalpha.en.md b/subjects/repeatalpha.en.md index ad4a4964d..033e91e0f 100644 --- a/subjects/repeatalpha.en.md +++ b/subjects/repeatalpha.en.md @@ -11,7 +11,7 @@ The result must be followed by a newline(`'\n'`). The case remains unchanged. -If the number of arguments is not 1, the program displays a newline(`'\n'`). +If the number of arguments is different from 1, the program displays a newline(`'\n'`). ### Usage diff --git a/subjects/repeatalpha.fr.md b/subjects/repeatalpha.fr.md index 5413bcc14..256cf03de 100644 --- a/subjects/repeatalpha.fr.md +++ b/subjects/repeatalpha.fr.md @@ -6,11 +6,11 @@ Le résultat doit être suivi d'un newline(`'\n'`). -`'a'` deviens `'a'`, `'b'` deviens `'bb'`, `'e'` deviens `'eeeee'`, etc... +`'a'` devient `'a'`, `'b'` devient `'bb'`, `'e'` devient `'eeeee'`, etc... -Si une lettre est majuscule, elle reste majuscule, de même si elle est minuscule. +Si une lettre est en majuscule, elle reste en majuscule, de même si elle est en minuscule. -Si le nombre d'arguments n'est pas 1, le programme affiche un newline(`'\n'`). +Si le nombre d'arguments est différent de 1, le programme affiche un newline(`'\n'`). ### Utilisation diff --git a/subjects/reversebits.en.md b/subjects/reversebits.en.md index d812f1cf8..891812220 100644 --- a/subjects/reversebits.en.md +++ b/subjects/reversebits.en.md @@ -2,8 +2,8 @@ ### Instructions -Write a function that takes a `byte`, reverses it `bit` by `bit` (like the -example) and returns the result. +Write a function that takes a `byte`, that reverses it `bit` by `bit` (like the +example) and that returns the result. ### Expected function diff --git a/subjects/reversebits.fr.md b/subjects/reversebits.fr.md index a22d6a85e..5277611e7 100644 --- a/subjects/reversebits.fr.md +++ b/subjects/reversebits.fr.md @@ -2,7 +2,7 @@ ### Instructions -Écrire une fonction qui prend un `byte`, l'inverse `bit` par `bit` (comme sur l'exemple) et retourne le résultat. +Écrire une fonction qui prend un `byte`, qui l'inverse `bit` par `bit` (comme sur l'exemple) et qui retourne le résultat. ### Fonction attendue diff --git a/subjects/reverserange.en.md b/subjects/reverserange.en.md index 6e3a92b4f..489fa9a83 100644 --- a/subjects/reverserange.en.md +++ b/subjects/reverserange.en.md @@ -2,11 +2,11 @@ ### Instructions -Write the function ReverseRange which must: +Write the function `ReverseRange` which must: - allocate (with make()) an array of integers. - fill it with consecutive values that begin at `end` and end at `start` (Including `start` and `end` !) -- finally return that array. +- and that returns that array. ### Expected function @@ -16,7 +16,7 @@ func ReverseRange(start, end int) []int { } ``` -Examples of output : +### Usage : - With (1, 3) the function will return an array containing 3, 2 and 1. - With (-1, 2) the function will return an array containing 2, 1, 0 and -1. diff --git a/subjects/reverserange.fr.md b/subjects/reverserange.fr.md index 6e3a92b4f..bb65691d1 100644 --- a/subjects/reverserange.fr.md +++ b/subjects/reverserange.fr.md @@ -2,13 +2,13 @@ ### Instructions -Write the function ReverseRange which must: +Écrire la fonction `ReverseRange` qui doit: -- allocate (with make()) an array of integers. -- fill it with consecutive values that begin at `end` and end at `start` (Including `start` and `end` !) -- finally return that array. +- allouer (avec make()) une slice d'entiers. +- le remplir avec des valeurs consécutives qui commencent à `end` et qui finissent à `start` (En incluant `start` et `end` !) +- et qui retourne cette slice. -### Expected function +### Fonction attendue ```go func ReverseRange(start, end int) []int { @@ -16,9 +16,9 @@ func ReverseRange(start, end int) []int { } ``` -Examples of output : +### Utilisation : -- With (1, 3) the function will return an array containing 3, 2 and 1. -- With (-1, 2) the function will return an array containing 2, 1, 0 and -1. -- With (0, 0) the function will return an array containing 0. -- With (0, -3) the function will return an array containing -3, -2, -1 and 0. +- Avec (1, 3) la fonction devra retourner une slice contenant 3, 2 et 1. +- Avec (-1, 2) la fonction devra retourner une slice contenant 2, 1, 0 et -1. +- Avec (0, 0) la fonction devra retourner une slice contenant 0. +- Avec (0, -3) la fonction devra retourner une slice contenant -3, -2, -1 et 0. diff --git a/subjects/reversestrcap.en.md b/subjects/reversestrcap.en.md index 3dc04544d..da5a0c6a0 100644 --- a/subjects/reversestrcap.en.md +++ b/subjects/reversestrcap.en.md @@ -2,16 +2,16 @@ ### Instructions -Write a program that takes one or more strings and that, **for each argument**: +Write a program that takes one or more `strings` as arguments and that, **for each argument**: -puts the last character of each word (if it is a letter) in uppercase and the rest in lowercase --then it displays the result followed by a `\n`. +-then it displays the result followed by a newline(`'\n'`). A word is a sequence of alphanumerical characters. -If there are no parameters, the program displays a `\n`. +If there are no parameter, the program displays a newline. -Examples of outputs : +### Usage ```console student@ubuntu:~/student/reversestrcap$ go build diff --git a/subjects/reversestrcap.fr.md b/subjects/reversestrcap.fr.md index 3dc04544d..b8f5f349a 100644 --- a/subjects/reversestrcap.fr.md +++ b/subjects/reversestrcap.fr.md @@ -2,16 +2,15 @@ ### Instructions -Write a program that takes one or more strings and that, **for each argument**: --puts the last character of each word (if it is a letter) in uppercase and the rest -in lowercase --then it displays the result followed by a `\n`. +Écrire un programme avec une ou plusieurs `strings` comme arguments et qui, **pour chaque argument**: +-place le dernier caractère de chaque mot (si c'est une lettre) en majuscule et le reste en minuscule. +-affiche ensuite le résultat suivi d'un newline(`'\n'`). -A word is a sequence of alphanumerical characters. +Un mot est une suite de caractères alphanumériques. -If there are no parameters, the program displays a `\n`. +Si il n'y a pas de paramètre, le programme affiche un newline. -Examples of outputs : +### Utilisation ```console student@ubuntu:~/student/reversestrcap$ go build diff --git a/subjects/revwstr.en.md b/subjects/revwstr.en.md index a59eb631b..5542e7429 100644 --- a/subjects/revwstr.en.md +++ b/subjects/revwstr.en.md @@ -2,15 +2,15 @@ ### Instructions -Write a program that takes a string as a parameter, and prints its words in reverse. +Write a program that takes a `string` as a parameter, and prints its words in reverse. - A word is a sequence of **alphanumerical** characters. -- If the number of parameters is different from 1, the program will display `\n`. +- If the number of parameters is different from 1, the program will display newline(`'\n'`). -- In the parameters that are going to be tested, there will not be any additional spaces. (meaning that there will not be additionnal spaces at the beginning or at the end of the string, and words will always be separated by exactly one space). +- In the parameters that are going to be tested, there will not be any extra spaces. (meaning that there will not be additionnal spaces at the beginning or at the end of the `string`and that words will always be separated by exactly one space). -Examples of outputs : +### Usage ```console student@ubuntu:~/piscine/test$ go build diff --git a/subjects/revwstr.fr.md b/subjects/revwstr.fr.md index a59eb631b..084dc334e 100644 --- a/subjects/revwstr.fr.md +++ b/subjects/revwstr.fr.md @@ -2,15 +2,15 @@ ### Instructions -Write a program that takes a string as a parameter, and prints its words in reverse. +Écrire un programme qui prend une `string` comme paramètre, et affiche ses mots en sens inverse. -- A word is a sequence of **alphanumerical** characters. +- Un mot est une suite de caractères **alphanumériques.** -- If the number of parameters is different from 1, the program will display `\n`. +- Si le nombre de paramètres est différent de 1, le programme affiche un newline(`'\n'`). -- In the parameters that are going to be tested, there will not be any additional spaces. (meaning that there will not be additionnal spaces at the beginning or at the end of the string, and words will always be separated by exactly one space). +- Dans les paramètres qui seront testés, il n'y aura pas d'espaces extra. (ce qui signifie qu'il n'y aura pas d'espaces additionnels, ni au début, ni à la fin de la `string` et que les mots seront toujours séparés par un seul espace). -Examples of outputs : +### Utilisation ```console student@ubuntu:~/piscine/test$ go build diff --git a/subjects/rostring.en.md b/subjects/rostring.en.md index 36c559b18..59f555b2c 100644 --- a/subjects/rostring.en.md +++ b/subjects/rostring.en.md @@ -2,7 +2,7 @@ ### Instructions -Write a program that takes a string and displays this string after rotating it +Write a program that takes a `string` and displays this `string` after rotating it one word to the left. Thus, the first word becomes the last, and others stay in the same order. @@ -11,16 +11,16 @@ A word is a sequence of **alphanumerical** characters. Words will be separated by only one space in the output. -If the number of arguments is not one, the program displays a newline. +If the number of arguments is different from 1, the program displays a newline. -Examples of outputs : +### Usage ```console student@ubuntu:~/piscine/rostring$ go build student@ubuntu:~/piscine/rostring$ ./rostring "abc " | cat -e abc$ student@ubuntu:~/piscine/rostring$ ./rostring "Let there be light" -there be light There +there be light Let student@ubuntu:~/piscine/rostring$ ./rostring " AkjhZ zLKIJz , 23y" zLKIJz , 23y AkjhZ student@ubuntu:~/piscine/rostring$ ./rostring | cat -e diff --git a/subjects/rostring.fr.md b/subjects/rostring.fr.md index 36c559b18..d357c7c2e 100644 --- a/subjects/rostring.fr.md +++ b/subjects/rostring.fr.md @@ -2,25 +2,24 @@ ### Instructions -Write a program that takes a string and displays this string after rotating it -one word to the left. +Écrire un programme qui prend une `string` et affiche cette `string` après avoir déplacé un mot vers la gauche. -Thus, the first word becomes the last, and others stay in the same order. +Le premier mot devient donc le dernier, et le reste des mots reste dans le même ordre. -A word is a sequence of **alphanumerical** characters. +Un mot est une suite de caractères **alphanumériques.** -Words will be separated by only one space in the output. +Les mots devront être séparés par un seul espace dans l'output. -If the number of arguments is not one, the program displays a newline. +Si le nombre d'arguments est différent de 1, le programme affiche un newline. -Examples of outputs : +### Utilisation ```console student@ubuntu:~/piscine/rostring$ go build student@ubuntu:~/piscine/rostring$ ./rostring "abc " | cat -e abc$ student@ubuntu:~/piscine/rostring$ ./rostring "Let there be light" -there be light There +there be light Let student@ubuntu:~/piscine/rostring$ ./rostring " AkjhZ zLKIJz , 23y" zLKIJz , 23y AkjhZ student@ubuntu:~/piscine/rostring$ ./rostring | cat -e diff --git a/subjects/rot13.en.md b/subjects/rot13.en.md index 7cee82cde..489c37e68 100644 --- a/subjects/rot13.en.md +++ b/subjects/rot13.en.md @@ -9,7 +9,7 @@ letters by the letter 13 spaces ahead in alphabetical order. - The output will be followed by a newline(`'\n'`). -- If the number of arguments is not 1, the program displays a newline(`'\n'`). +- If the number of arguments is different from 1, the program displays a newline(`'\n'`). ### Usage diff --git a/subjects/rot13.fr.md b/subjects/rot13.fr.md index b33d27e52..81b33b19f 100644 --- a/subjects/rot13.fr.md +++ b/subjects/rot13.fr.md @@ -2,13 +2,13 @@ ### Instructions -É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. +Écrire un programme qui prend une `string` et qui l'affiche, en remplaçant chacune de ses lettres par la lettre qui est 13 positions plus loin dans l'ordre alphabétique. - 'z' devient 'm' et 'Z' devient 'M'. Les majuscules restent des majuscules, de même pour les minuscules. - l'output sera suivi d'un newline(`'\n'`). -- Si le nombre d'arguments n'est pas 1, le programme affiche un newline(`'\n'`). +- Si le nombre d'arguments est différent de 1, le programme affiche un newline(`'\n'`). ### Utilisation diff --git a/subjects/rot14.en.md b/subjects/rot14.en.md index 1a185d661..ed7f9bc93 100644 --- a/subjects/rot14.en.md +++ b/subjects/rot14.en.md @@ -4,7 +4,7 @@ Write a function `rot14` that returns the `string` within the parameter transformed into a `rot14 string`. -- For more information look what `rot13` stands for. +- There is the need to know what `rot13` stands for. ### Expected function diff --git a/subjects/rot14.fr.md b/subjects/rot14.fr.md index 44f5698e7..64379313f 100644 --- a/subjects/rot14.fr.md +++ b/subjects/rot14.fr.md @@ -2,9 +2,9 @@ ### Instructions -Écrire une fonction `rot14` qui retournes la `string` en paramètre transformée en `string rot14`. +Écrire une fonction `rot14` qui retourne la `string` en paramètre transformée en `string rot14`. -- Pour plus d'informations chercher ce que `rot13` signifie. +- Il faut savoir ce que `rot13` signifie. ### Fonction attendue diff --git a/subjects/rpncalc.en.md b/subjects/rpncalc.en.md index a174d5057..1b0720b34 100644 --- a/subjects/rpncalc.en.md +++ b/subjects/rpncalc.en.md @@ -2,11 +2,11 @@ ### Instructions -Write a program that takes a string which contains an equation written in -Reverse Polish notation (RPN) as its first argument, evaluates the equation, and -prints the result on the standard output followed by a newline. +Write a program that takes a `string` which contains an equation written in +`Reverse Polish Notation` (RPN) as its first argument, that evaluates the equation, and that +prints the result on the standard output followed by a newline(`'\n'`). -Reverse Polish Notation is a mathematical notation in which every operator +`Reverse Polish Notation` is a mathematical notation in which every operator follows all of its operands. In RPN, every operator encountered evaluates the previous 2 operands, and the result of this operation then becomes the first of the two operands for the subsequent operator. Operands and operators must be @@ -14,17 +14,17 @@ spaced by at least one space. The following operators must be implemented : `+`, `-`, `*`, `/`, and `%`. -If the string is not valid or if there is not exactly one argument, `Error` must be printed +If the `string` is not valid or if there is not exactly one argument, `Error` must be printed on the standard output followed by a newline. -If the string has extra spaces it is still valid. +If the `string` has extra spaces it is still considered valid. All the given operands must fit in a `int`. Examples of formulas converted in RPN: -3 + 4 >> 3 4 + -((1 * 2) * 3) - 4 >> 1 2 * 3 * 4 - ou 3 1 2 * * 4 - -50 * (5 - (10 / 9)) >> 5 10 9 / - 50 * +3 + 4 >> 3 4 + +((1 _ 2) _ 3) - 4 >> 1 2 _ 3 _ 4 - ou 3 1 2 \* _ 4 - +50 _ (5 - (10 / 9)) >> 5 10 9 / - 50 \* Here is how to evaluate a formula in RPN: @@ -34,6 +34,7 @@ Here is how to evaluate a formula in RPN: 6 4 - 2 ``` + Or: ``` @@ -42,7 +43,8 @@ Or: 6 4 - 2 ``` -Examples of outputs : + +### Usage ```console student@ubuntu:~/student/rpncalc$ go build diff --git a/subjects/rpncalc.fr.md b/subjects/rpncalc.fr.md index a174d5057..8c4ad18ca 100644 --- a/subjects/rpncalc.fr.md +++ b/subjects/rpncalc.fr.md @@ -2,31 +2,26 @@ ### Instructions -Write a program that takes a string which contains an equation written in -Reverse Polish notation (RPN) as its first argument, evaluates the equation, and -prints the result on the standard output followed by a newline. +Écrire un programme qui prend une `string` qui contient une équation écrite en `Reverse Polish Notation` (RPN) comme premier argument, qui évalue l'équation, et qui affiche le résultat sur la sortie standard suivi d'un newline(`'\n'`). -Reverse Polish Notation is a mathematical notation in which every operator -follows all of its operands. In RPN, every operator encountered evaluates the -previous 2 operands, and the result of this operation then becomes the first of -the two operands for the subsequent operator. Operands and operators must be -spaced by at least one space. +La `Reverse Polish Notation` est une notation mathématique dans laquelle chaque opérateur devance les valeurs qu'il va opérer. +En RPN, chaque opérateur évalue les deux précédentes valeurs, et le résultat de cette opération devient ensuite la première des valeurs de l'opérateur. Les valeurs et les opérateurs doivent être espacés d'au moins un espace. -The following operators must be implemented : `+`, `-`, `*`, `/`, and `%`. +Les opérateurs suivants doivent être implémentés : `+`, `-`, `*`, `/`, et `%`. -If the string is not valid or if there is not exactly one argument, `Error` must be printed -on the standard output followed by a newline. -If the string has extra spaces it is still valid. +Si la `string` n'est pas valide ou si il n'y pas exactement un argument, le mot `Error` doit être affiché +sur la sortie standard suivi d'un newline. +Si la `string` a des espaces extra elle est toujours considérée valide. -All the given operands must fit in a `int`. +Toutes les valeurs données doivent rentrer dans un `int`. -Examples of formulas converted in RPN: +Exemples de formules converties en RPN: -3 + 4 >> 3 4 + -((1 * 2) * 3) - 4 >> 1 2 * 3 * 4 - ou 3 1 2 * * 4 - -50 * (5 - (10 / 9)) >> 5 10 9 / - 50 * +3 + 4 >> 3 4 + +((1 _ 2) _ 3) - 4 >> 1 2 _ 3 _ 4 - ou 3 1 2 \* _ 4 - +50 _ (5 - (10 / 9)) >> 5 10 9 / - 50 \* -Here is how to evaluate a formula in RPN: +Voici comment évaluer une formule en RPN: ``` 1 2 * 3 * 4 - @@ -34,7 +29,8 @@ Here is how to evaluate a formula in RPN: 6 4 - 2 ``` -Or: + +ou: ``` 3 1 2 * * 4 - @@ -42,7 +38,8 @@ Or: 6 4 - 2 ``` -Examples of outputs : + +### Utilisation ```console student@ubuntu:~/student/rpncalc$ go build diff --git a/subjects/searchreplace.en.md b/subjects/searchreplace.en.md index 7b426b9be..26e3696ef 100644 --- a/subjects/searchreplace.en.md +++ b/subjects/searchreplace.en.md @@ -4,7 +4,7 @@ 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, the program displays a newline(`'\n'`). +- If the number of arguments is different from 3, the program displays a newline(`'\n'`). - If the second argument is not contained in the first one (the string) then the program rewrites the `string` followed by a newline(`'\n'`). diff --git a/subjects/sortlist.fr.md b/subjects/sortlist.fr.md index 57ce66e18..c7b52e18f 100644 --- a/subjects/sortlist.fr.md +++ b/subjects/sortlist.fr.md @@ -2,21 +2,21 @@ ### Instructions -Write a function that must: +Écrire une fonction qui doit : -- Sort the list given as a parameter, using the function cmp to select the order to apply, +- Trier la liste donnée en paramètre en utilisant la fonction cmp pour sélectionner l'ordre à appliquer, -- Return a pointer to the first element of the sorted list. +- Retourner un pointeur au premier élément de la liste triée. -Duplications must remain. +Les duplications doivent rester. -Inputs will always be consistent. +Les inputs seront toujours valides. -The `type NodeList` must be used. +Le `type NodeList` doit être utilisé. -Functions passed as `cmp` will always return `true` if `a` and `b` are in the right order, otherwise it will return `false`. +Les fonctions passées comme `cmp` retourneront toujours `true` si `a` et `b` sont dans le bon ordre, sinon elles retourneront `false`. -### Expected function +### Fonction et structure attendues ```go type Nodelist struct { @@ -29,7 +29,7 @@ func SortList (l *NodeList, cmp func(a,b int) bool) *NodeList{ } ``` -- For example, the following function used as `cmp` will sort the list in ascending order : +- Par exemple, la fonction suivante utilisée comme `cmp` triera la liste dans l'ordre croissant : ```go func ascending(a, b int) bool{ diff --git a/subjects/split.en.md b/subjects/split.en.md index f1c3366c0..cc5f31baa 100644 --- a/subjects/split.en.md +++ b/subjects/split.en.md @@ -2,9 +2,9 @@ ### Instructions -Write a function that seperates the words of a `string` and puts them in a `string` array. +Write a function that separates the words of a `string` and puts them in a `string` array. -The separators are the characters of the charset `string` given in parameter. +The separators are the characters of the `charset string` given in parameter. ### Expected function diff --git a/subjects/split.fr.md b/subjects/split.fr.md index efa7f9d47..641ca5fb1 100644 --- a/subjects/split.fr.md +++ b/subjects/split.fr.md @@ -4,7 +4,7 @@ Écrire une fonction qui sépare les mots d'une `string` et les met dans un tableau de `string`. -Les séparateurs sont les charactéres de la `string` charset donnée en paramétre. +Les séparateurs sont les caractères de la `string charset` donnée en paramétre. ### Fonction attendue diff --git a/subjects/switchcase.en.md b/subjects/switchcase.en.md index 3cd4addb4..405461640 100644 --- a/subjects/switchcase.en.md +++ b/subjects/switchcase.en.md @@ -8,7 +8,7 @@ Write a program that takes a `string` and reverses the case of all its letters. - The result must be followed by a newline(`'\n'`). -- If the number of arguments is not 1, the program displays a newline(`'\n'`). +- If the number of arguments is different from 1, the program displays a newline(`'\n'`). ### Usage diff --git a/subjects/switchcase.fr.md b/subjects/switchcase.fr.md index 64ee85d27..9dfec1c22 100644 --- a/subjects/switchcase.fr.md +++ b/subjects/switchcase.fr.md @@ -8,7 +8,7 @@ - Le résultat doit être suivi d'un newline(`'\n'`). -- Si le nombre d'arguments n'est pas 1, le programme affiche program un newline(`'\n'`). +- Si le nombre d'arguments est différent de 1, le programme affiche un newline(`'\n'`). ### Utilisation diff --git a/subjects/tabmult.md b/subjects/tabmult.en.md similarity index 86% rename from subjects/tabmult.md rename to subjects/tabmult.en.md index ae738db61..fe78d999b 100644 --- a/subjects/tabmult.md +++ b/subjects/tabmult.en.md @@ -4,9 +4,9 @@ Write a program that displays a number's multiplication table. -- The parameter will always be a strictly positive number that fits in an int, and said number times 9 will also fit in an int. +- The parameter will always be a strictly positive number that fits in an `int`. Said number multiplied by 9 will also fit in an `int`. -Examples of outputs : +### Usage ```console student@ubuntu:~/piscine/test$ go build diff --git a/subjects/tabmult.fr.md b/subjects/tabmult.fr.md new file mode 100644 index 000000000..309f5d656 --- /dev/null +++ b/subjects/tabmult.fr.md @@ -0,0 +1,36 @@ +## tabmult + +### Instructions + +Écrire un programme qui affiche la table de multiplication d'un nombre. + +- Le paramètre sera toujours un nombre strictement positif qui rentre dans un `int`. Ce paramètre multiplié par 9 rentrera aussi dans un `int`. + +### Utilisation + +```console +student@ubuntu:~/piscine/test$ go build +student@ubuntu:~/piscine/test$ ./test 9 +1 x 9 = 9 +2 x 9 = 18 +3 x 9 = 27 +4 x 9 = 36 +5 x 9 = 45 +6 x 9 = 54 +7 x 9 = 63 +8 x 9 = 72 +9 x 9 = 81 +student@ubuntu:~/piscine/test$ ./test 19 +1 x 19 = 19 +2 x 19 = 38 +3 x 19 = 57 +4 x 19 = 76 +5 x 19 = 95 +6 x 19 = 114 +7 x 19 = 133 +8 x 19 = 152 +9 x 19 = 171 +student@ubuntu:~/piscine/test$ + +student@ubuntu:~/piscine/ +``` diff --git a/subjects/union.en.md b/subjects/union.en.md index 278835d90..7f91e2520 100644 --- a/subjects/union.en.md +++ b/subjects/union.en.md @@ -8,7 +8,7 @@ characters that appear in either one of the `strings`. The display will be in the order characters appear in the command line, and will be followed by a newline(`'\n'`). -If the number of arguments is not 2, the program displays newline(`'\n'`). +If the number of arguments is different from 2, the program displays newline(`'\n'`). ### Usage diff --git a/subjects/union.fr.md b/subjects/union.fr.md index cbc35ef24..e0af0af75 100644 --- a/subjects/union.fr.md +++ b/subjects/union.fr.md @@ -6,7 +6,7 @@ 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'`). -Si le nombre d'arguments n'est pas 2, le programme affiche un newline(`'\n'`). +Si le nombre d'arguments est différent de 2, le programme affiche un newline(`'\n'`). ### Utilisation diff --git a/subjects/wdmatch.en.md b/subjects/wdmatch.en.md index 8eb821c59..a9f272456 100644 --- a/subjects/wdmatch.en.md +++ b/subjects/wdmatch.en.md @@ -1,14 +1,14 @@ -# wdmatch +## wdmatch -## Instructions +### Instructions -Write a program that takes two strings and checks whether it is possible to write the first string with characters from the second string, while respecting the order in which these characters appear in the second string. +Write a program that takes two `strings` and checks whether it is possible to write the first `string` with characters from the second `string`, while respecting the order in which these characters appear in the second `string`. -- If it is possible, the program displays the string followed by a `\n`, otherwise it simply displays a `\n`. +- If it is possible, the program displays the `string` followed by a newline(`'\n'`), otherwise it simply displays a newline. -- If the number of arguments is not 2, the program displays `\n`. +- If the number of arguments is different from 2, the program displays a newline. -Example of output : +### Usage ```console student@ubuntu:~/piscine/test$ go build diff --git a/subjects/wdmatch.fr.md b/subjects/wdmatch.fr.md index 8eb821c59..dec8346e6 100644 --- a/subjects/wdmatch.fr.md +++ b/subjects/wdmatch.fr.md @@ -1,14 +1,14 @@ -# wdmatch +## wdmatch -## Instructions +### Instructions -Write a program that takes two strings and checks whether it is possible to write the first string with characters from the second string, while respecting the order in which these characters appear in the second string. +Écrire un programme qui prend deux `strings` et vérifie si il est possible d'écrire la première `string` avec des caractères de la deuxième `string`, tout en respectant l'ordre dans lequel ces caractères apparaissent dans la deuxième `string`. -- If it is possible, the program displays the string followed by a `\n`, otherwise it simply displays a `\n`. +- Si cela est possible, le programme affiche la `string` suivie par un newline(`'\n'`), autrement le programme affiche un newline. -- If the number of arguments is not 2, the program displays `\n`. +- Si le nombre d'arguments est différent de 2, le programme affiche un newline. -Example of output : +### Utilisation ```console student@ubuntu:~/piscine/test$ go build