diff --git a/docs/pc-requirements.md b/docs/pc-requirements.md new file mode 100644 index 000000000..cd6bc4a14 --- /dev/null +++ b/docs/pc-requirements.md @@ -0,0 +1,18 @@ +# PC requirements + +**Linux compatible only** + +| Component | Minimum specifications | +| ----------- | ----------------------- | +| Processor | x86-64 (64 bits) | +| Memory | 8 GB | +| Disk | 120 GB SSD | +| Monitor | Full HD resolution | +| Motherboard | UEFI & PXE boot support | + +## Other considerations + +- The monitor must be flicker-free (no PWM) to preserve the student's attention & eye health. +- To avoid damaging the PC ports, all cables (USB, Audio) must be connected to cheaper and easier to replace extension cables. +- Energy consumption is an important criterion to be taken into account. +- It is better to buy the computers without a Windows licence, as it is an unnecessary extra cost. diff --git a/subjects/atoibase.en.md b/subjects/atoibase.en.md index 94fa2534c..f770f0aec 100644 --- a/subjects/atoibase.en.md +++ b/subjects/atoibase.en.md @@ -41,7 +41,7 @@ func main() { fmt.Println(piscine.AtoiBase("1111101", "01")) fmt.Println(piscine.AtoiBase("7D", "0123456789ABCDEF")) fmt.Println(piscine.AtoiBase("uoi", "choumi")) - fmt.Println(piscine.AtoiBase("bbbbbab", "-ab") + fmt.Println(piscine.AtoiBase("bbbbbab", "-ab")) } ``` diff --git a/subjects/atoibase.fr.md b/subjects/atoibase.fr.md index 3d67678ef..57f9b9aa1 100644 --- a/subjects/atoibase.fr.md +++ b/subjects/atoibase.fr.md @@ -41,7 +41,7 @@ func main() { fmt.Println(piscine.AtoiBase("1111101", "01")) fmt.Println(piscine.AtoiBase("7D", "0123456789ABCDEF")) fmt.Println(piscine.AtoiBase("uoi", "choumi")) - fmt.Println(piscine.AtoiBase("bbbbbab", "-ab") + fmt.Println(piscine.AtoiBase("bbbbbab", "-ab")) } ``` diff --git a/subjects/capitalizeprog.en.md b/subjects/capitalizeprog.en.md new file mode 100644 index 000000000..0151c867d --- /dev/null +++ b/subjects/capitalizeprog.en.md @@ -0,0 +1,24 @@ +## capitalizeprog + +### Instructions + +Write a program that capitalizes the first letter of each word **and** lowercases the rest of each word of a `string`. + +- A word is a sequence of **alphanumerical** characters. + +- If there is more than one argument the program should print `Too many arguments`. + +- If there is no arguments given the program should print a newline ("`\n`"). + +### Usage : + +```console +student@ubuntu:~/capitalizeprog$ go build +student@ubuntu:~/capitalizeprog$ ./capitalizeprog "Hello! How are you? How+are+things+4you?" | cat -e +Hello! How Are You? How+Are+Things+4you?$ +student@ubuntu:~/capitalizeprog$ ./capitalizeprog Hello! How are you? | cat -e +Too many arguments$ +student@ubuntu:~/capitalizeprog$ ./capitalizeprog + +student@ubuntu:~/capitalizeprog$ +``` diff --git a/subjects/capitalizeprog.fr.md b/subjects/capitalizeprog.fr.md new file mode 100644 index 000000000..301dc19ba --- /dev/null +++ b/subjects/capitalizeprog.fr.md @@ -0,0 +1,24 @@ +## capitalizeprog + +### Instructions + +Écrire un programme 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**. + +- Si il y a plus d'un argument le programme doit afficher `Too many arguments`. + +- Si il n'y a pas d'arguments le programme doit afficher un newline ("`\n`"). + +### Utilisation : + +```console +student@ubuntu:~/capitalizeprog$ go build +student@ubuntu:~/capitalizeprog$ ./capitalizeprog "Hello! How are you? How+are+things+4you?" | cat -e +Hello! How Are You? How+Are+Things+4you?$ +student@ubuntu:~/capitalizeprog$ ./capitalizeprog Hello! How are you? | cat -e +Too many arguments$ +student@ubuntu:~/capitalizeprog$ ./capitalizeprog + +student@ubuntu:~/capitalizeprog$ +``` diff --git a/subjects/collatzcountdown.en.md b/subjects/collatzcountdown.en.md index 85dbc8df3..fd380d7d3 100644 --- a/subjects/collatzcountdown.en.md +++ b/subjects/collatzcountdown.en.md @@ -4,6 +4,8 @@ Write a function, `CollatzCountdown`, that returns the number of steps necessary to reach 1 using the collatz countdown. +- It must return `-1` if `start` is equal to `0` or negative. + ### Expected function ```go diff --git a/subjects/collatzcountdown.fr.md b/subjects/collatzcountdown.fr.md index 9d150d82d..38682cf79 100644 --- a/subjects/collatzcountdown.fr.md +++ b/subjects/collatzcountdown.fr.md @@ -4,7 +4,9 @@ Écrire une fonction, `CollatzCountdown`, qui retournes le nombre d'étapes nécéssaires pour atteindre 1 en utilisant le comptage de collatz. -### FOnction attendue +- Elle doit renvoyer `-1` si `start` est égal à 0 ou négatif. + +### Fonction attendue ```go func CollatzCountdown(start int) int { @@ -33,8 +35,8 @@ func main() { Et son résultat : ```console -student@ubuntu:~/student/test$ go build -student@ubuntu:~/student/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 10 -student@ubuntu:~/student/test$ +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/compareprog.en.md b/subjects/compareprog.en.md new file mode 100644 index 000000000..0d648f309 --- /dev/null +++ b/subjects/compareprog.en.md @@ -0,0 +1,24 @@ +## compareprog + +### Instructions + +Write a program that behaves like the `Compare` function. + +This program prints a number after comparing two `strings` lexicographically. + +### Usage : + +```console +student@ubuntu:~/compareprog$ go build +student@ubuntu:~/compareprog$ ./compareprog a b | cat -e +-1$ +student@ubuntu:~/compareprog$ ./compareprog a a | cat -e +0$ +student@ubuntu:~/compareprog$ ./compareprog b a | cat -e +1$ +student@ubuntu:~/compareprog$ ./compareprog b a d | cat -e +$ +student@ubuntu:~/compareprog$ ./compareprog | cat -e +$ +student@ubuntu:~/compareprog$ +``` diff --git a/subjects/compareprog.fr.md b/subjects/compareprog.fr.md new file mode 100644 index 000000000..ebdaf7345 --- /dev/null +++ b/subjects/compareprog.fr.md @@ -0,0 +1,24 @@ +## compareprog + +### Instructions + +Écrire un programme qui se comporte comme la fonction `Compare`. + +Ce programme affiche un nombre après avoir comparé deux `strings` lexicalement. + +### Utilisation : + +```console +student@ubuntu:~/compareprog$ go build +student@ubuntu:~/compareprog$ ./compareprog a b | cat -e +-1$ +student@ubuntu:~/compareprog$ ./compareprog a a | cat -e +0$ +student@ubuntu:~/compareprog$ ./compareprog b a | cat -e +1$ +student@ubuntu:~/compareprog$ ./compareprog b a d | cat -e +$ +student@ubuntu:~/compareprog$ ./compareprog | cat -e +$ +student@ubuntu:~/compareprog$ +``` diff --git a/subjects/concatparams.en.md b/subjects/concatparams.en.md index de48463ec..5bdbbb9c3 100644 --- a/subjects/concatparams.en.md +++ b/subjects/concatparams.en.md @@ -2,7 +2,7 @@ ### Instructions -Write a function that takes the arguments reveived in parameters and returns them as a `string`. +Write a function that takes the arguments received in parameters and returns them as a `string`. The arguments must be **separated** by a `\n`. @@ -10,6 +10,7 @@ The arguments must be **separated** by a `\n`. ```go func ConcatParams(args []string) string { + } ``` diff --git a/subjects/displayfile.en.md b/subjects/displayfile.en.md index 97153fc1f..525b835a9 100644 --- a/subjects/displayfile.en.md +++ b/subjects/displayfile.en.md @@ -4,7 +4,7 @@ Write a program that displays, on the standard output, the content of a file given as argument. -- Create a file `quest8.txt` and write nito it the sentence `Almost there!!` +- Create a file `quest8.txt` and write into it the sentence `Almost there!!` - The argument of the program in this case should be, `quest8.txt`. @@ -12,7 +12,7 @@ Write a program that displays, on the standard output, the content of a file giv - `File name missing`. - `Too many arguments`. -### Usage: +### Usage : ```console student@ubuntu:~/student/displayfile$ go build diff --git a/subjects/doop.en.md b/subjects/doop.en.md index 58ac5b07f..1e55cfd8e 100644 --- a/subjects/doop.en.md +++ b/subjects/doop.en.md @@ -23,14 +23,12 @@ The program has to handle the modulo and division operations by 0 as shown on th ```console student@ubuntu:~/piscine-go/test$ go build doop.go student@ubuntu:~/piscine-go/test$ ./doop -student@ubuntu:~/piscine-go/test$ ./doop 1 + 1 -2 +student@ubuntu:~/piscine-go/test$ ./doop 1 + 1 | cat -e +2$ student@ubuntu:~/piscine-go/test$ ./doop hello + 1 | cat -e 0$ -student@ubuntu:~/piscine-go/test$ ./doop 1 p 1 -0 -student@ubuntu:~/piscine-go/test$ ./doop 1 + 1 -2 +student@ubuntu:~/piscine-go/test$ ./doop 1 p 1 | cat -e +0$ student@ubuntu:~/piscine-go/test$ ./doop 1 / 0 | cat -e No division by 0$ student@ubuntu:~/piscine-go/test$ ./doop 1 % 0 | cat -e diff --git a/subjects/doop.fr.md b/subjects/doop.fr.md index 8f799ea1c..b9201030d 100644 --- a/subjects/doop.fr.md +++ b/subjects/doop.fr.md @@ -10,12 +10,11 @@ Le programme doit être utilisé avec trois arguments: - Un opérateur - Une autre valeur - En cas d'opérateur invalide le programme affiche `0`. En cas de nombre invalide d'arguments le programme affiche rien. -Le programme doit géré les opérations modulo et division par 0 comme dans les examples ci-dessous. +Le programme doit géré les opérations modulo et division par 0 comme dans les examples ci-dessous. `fmt.Print` est autorisé. @@ -24,19 +23,16 @@ Le programme doit géré les opérations modulo et division par 0 comme dans les ```console student@ubuntu:~/piscine-go/test$ go build doop.go student@ubuntu:~/piscine-go/test$ ./doop -student@ubuntu:~/piscine-go/test$ ./doop 1 + 1 -2 +student@ubuntu:~/piscine-go/test$ ./doop 1 + 1 | cat -e +2$ student@ubuntu:~/piscine-go/test$ ./doop hello + 1 | cat -e 0$ -student@ubuntu:~/piscine-go/test$ ./doop 1 p 1 -0 -student@ubuntu:~/piscine-go/test$ ./doop 1 + 1 -2 -student@ubuntu:~/piscine-go/test$ ./doop 1 / 0 -No division by 0 -student@ubuntu:~/piscine-go/test$ ./doop 1 % 0 -No modulo by 0 -student@ubuntu:~/piscine-go/test$ ./doop 1 * 1 +student@ubuntu:~/piscine-go/test$ ./doop 1 p 1 | cat -e +0$ +student@ubuntu:~/piscine-go/test$ ./doop 1 / 0 | cat -e +No division by 0$ +student@ubuntu:~/piscine-go/test$ ./doop 1 % 0 | cat -e +No modulo by 0$ +student@ubuntu:~/piscine-go/test$ ./doop 1 "*" 1 1 - ``` diff --git a/subjects/firstruneprog.en.md b/subjects/firstruneprog.en.md new file mode 100644 index 000000000..41005f008 --- /dev/null +++ b/subjects/firstruneprog.en.md @@ -0,0 +1,19 @@ +## firstruneprog + +### Instructions + +Write a program that receives a `string` and returns the first `rune` of that `string`. + +### Expected output : + +```console +student@ubuntu:~/piscine-go/firstruneprog$ go build +student@ubuntu:~/piscine-go/firstruneprog$ ./firstruneprog "this is not happening" +t +student@ubuntu:~/piscine-go/firstruneprog$ ./firstruneprog "hello" | cat-e +h$ +student@ubuntu:~/piscine-go/firstruneprog$ ./firstruneprog "this" "is" "not" "happening" +student@ubuntu:~/piscine-go/firstruneprog$ +student@ubuntu:~/piscine-go/firstruneprog$ ./firstruneprog +student@ubuntu:~/piscine-go/firstruneprog$ +``` diff --git a/subjects/firstruneprog.fr.md b/subjects/firstruneprog.fr.md new file mode 100644 index 000000000..771d35e30 --- /dev/null +++ b/subjects/firstruneprog.fr.md @@ -0,0 +1,19 @@ +## firstruneprog + +### Instructions + +Écrire un programme qui reçoit une `string` et qui retourne la première `rune` de cette `string`. + +### Utilisation : + +```console +student@ubuntu:~/piscine-go/firstruneprog$ go build +student@ubuntu:~/piscine-go/firstruneprog$ ./firstruneprog "this is not happening" +t +student@ubuntu:~/piscine-go/firstruneprog$ ./firstruneprog "hello" | cat-e +h$ +student@ubuntu:~/piscine-go/firstruneprog$ ./firstruneprog "this" "is" "not" "happening" +student@ubuntu:~/piscine-go/firstruneprog$ +student@ubuntu:~/piscine-go/firstruneprog$ ./firstruneprog +student@ubuntu:~/piscine-go/firstruneprog$ +``` diff --git a/subjects/ispowerof2.en.md b/subjects/ispowerof2.en.md index 62ddde45f..b9d8ead24 100644 --- a/subjects/ispowerof2.en.md +++ b/subjects/ispowerof2.en.md @@ -2,14 +2,29 @@ ### Instructions -Write a function that determines if a given number is a power of 2. +Write a program 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 program must print `true` if the given number is a power of 2, otherwise it prints `false`. -### Expected function +- If there is more than one or no argument the program should print a newline ("`\n`"). -```go -func IsPowerOf2(n uint) bool { +- Error cases have to be handled. -} +### Usage : + +```console +student@ubuntu:~/ispowerof2$ go build +student@ubuntu:~/ispowerof2$ ./ispowerof2 2 | cat -e +true$ +student@ubuntu:~/ispowerof2$ ./ispowerof2 64 | cat -e +true$ +student@ubuntu:~/ispowerof2$ ./ispowerof2 513 | cat -e +false$ +student@ubuntu:~/ispowerof2$ ./ispowerof2 + +student@ubuntu:~/ispowerof2$ ./ispowerof2 64 1024 + +student@ubuntu:~/ispowerof2$ ./ispowerof2 notanumber | cat -e +strconv.Atoi: parsing "a": invalid syntax$ +student@ubuntu:~/ispowerof2$ ``` diff --git a/subjects/ispowerof2.fr.md b/subjects/ispowerof2.fr.md index 8147db777..9a266779d 100644 --- a/subjects/ispowerof2.fr.md +++ b/subjects/ispowerof2.fr.md @@ -2,14 +2,29 @@ ### Instructions -Écrire une fonction qui détermine si un nombre donné est une puissance de 2. +Écrire un programme qui détermine si un nombre donné est une puissance de 2. -Cette fonction retourne `true` si le nombre donné est une puissance de 2, autrement elle retourne `false`. +Ce programme doit afficher `true` si le nombre donné est une puissance de 2, autrement il affiche `false`. -### Fonction attendue +- Si il y a plus d'un ou aucun argument le programme doit afficher un newline ("`\n`"). -```go -func IsPowerOf2(n uint) bool { +- Les cas d'erreurs doivent être gérés. -} +### Utilisation : + +```console +student@ubuntu:~/ispowerof2$ go build +student@ubuntu:~/ispowerof2$ ./ispowerof2 2 | cat -e +true$ +student@ubuntu:~/ispowerof2$ ./ispowerof2 64 | cat -e +true$ +student@ubuntu:~/ispowerof2$ ./ispowerof2 513 | cat -e +false$ +student@ubuntu:~/ispowerof2$ ./ispowerof2 + +student@ubuntu:~/ispowerof2$ ./ispowerof2 64 1024 + +student@ubuntu:~/ispowerof2$ ./ispowerof2 notanumber | cat -e +strconv.Atoi: parsing "a": invalid syntax$ +student@ubuntu:~/ispowerof2$ ``` diff --git a/subjects/lastruneprog.en.md b/subjects/lastruneprog.en.md new file mode 100644 index 000000000..f9d7e2cde --- /dev/null +++ b/subjects/lastruneprog.en.md @@ -0,0 +1,19 @@ +## lastruneprog + +### Instructions + +Write a program that receives a `string` and returns the last `rune` of a `string`. + +### Expected output : + +```console +student@ubuntu:~/piscine-go/firstruneprog$ go build +student@ubuntu:~/piscine-go/firstruneprog$ ./firstruneprog "this is not happening" +g +student@ubuntu:~/piscine-go/firstruneprog$ ./firstruneprog "hello" | cat -e +o$ +student@ubuntu:~/piscine-go/firstruneprog$ ./firstruneprog "this" "is" "not" "happening" +student@ubuntu:~/piscine-go/firstruneprog$ +student@ubuntu:~/piscine-go/firstruneprog$ ./firstruneprog +student@ubuntu:~/piscine-go/firstruneprog$ +``` diff --git a/subjects/lastruneprog.fr.md b/subjects/lastruneprog.fr.md new file mode 100644 index 000000000..e37225270 --- /dev/null +++ b/subjects/lastruneprog.fr.md @@ -0,0 +1,19 @@ +## lastruneprog + +### Instructions + +Écrire un programme qui reçoit une `string` en paramètre et qui retourne la dernière `rune` de la `string`. + +### Utilisation : + +```console +student@ubuntu:~/piscine-go/firstruneprog$ go build +student@ubuntu:~/piscine-go/firstruneprog$ ./firstruneprog "this is not happening" +g +student@ubuntu:~/piscine-go/firstruneprog$ ./firstruneprog "hello" | cat -e +o$ +student@ubuntu:~/piscine-go/firstruneprog$ ./firstruneprog "this" "is" "not" "happening" +student@ubuntu:~/piscine-go/firstruneprog$ +student@ubuntu:~/piscine-go/firstruneprog$ ./firstruneprog +student@ubuntu:~/piscine-go/firstruneprog$ +``` diff --git a/subjects/nruneprog.en.md b/subjects/nruneprog.en.md new file mode 100644 index 000000000..460537820 --- /dev/null +++ b/subjects/nruneprog.en.md @@ -0,0 +1,22 @@ +## nruneprog + +### Instructions + +Write a function that returns the nth `rune` of a `string`. + +### Expected output : + +```console +student@ubuntu:~/piscine-go/nruneprog$ ./nruneprog "hello" 2 +e +student@ubuntu:~/piscine-go/nruneprog$ ./nruneprog "hello" 4 | cat -e +l$ +student@ubuntu:~/piscine-go/nruneprog$ ./nruneprog "hello" 5 +o +student@ubuntu:~/piscine-go/nruneprog$ ./nruneprog "hello" +student@ubuntu:~/piscine-go/nruneprog$ ./nruneprog "hello" f | cat -e +"f" is not an integer value$ +student@ubuntu:~/piscine-go/nruneprog$ ./nruneprog "hello" 9 +Invalid position: "9" in "hello" +student@ubuntu:~/piscine-go/nruneprog$ +``` diff --git a/subjects/nruneprog.fr.md b/subjects/nruneprog.fr.md new file mode 100644 index 000000000..c664eb704 --- /dev/null +++ b/subjects/nruneprog.fr.md @@ -0,0 +1,22 @@ +## nruneprog + +### Instructions + +Écrire un programme qui reçoit une `string` en paramètre et qui retourne la énième `rune` de la `string`. + +### Utilisation : + +```console +student@ubuntu:~/piscine-go/nruneprog$ ./nruneprog "hello" 2 +e +student@ubuntu:~/piscine-go/nruneprog$ ./nruneprog "hello" 4 | cat -e +l$ +student@ubuntu:~/piscine-go/nruneprog$ ./nruneprog "hello" 5 +o +student@ubuntu:~/piscine-go/nruneprog$ ./nruneprog "hello" +student@ubuntu:~/piscine-go/nruneprog$ ./nruneprog "hello" f | cat -e +"f" is not an integer value$ +student@ubuntu:~/piscine-go/nruneprog$ ./nruneprog "hello" 9 +Invalid position: "9" in "hello" +student@ubuntu:~/piscine-go/nruneprog$ +``` diff --git a/subjects/printbits.en.md b/subjects/printbits.en.md index 65be83a1b..259e21861 100644 --- a/subjects/printbits.en.md +++ b/subjects/printbits.en.md @@ -2,18 +2,21 @@ ### Instructions -Write a function that takes a byte, and prints it in binary value **without a newline at the end**. - -### Expected function - -```go -func PrintBits(octe byte) { - -} +Write a program that takes a number as argument, and prints it in binary value **without a newline at the end**. + +- If the the argument is not a number the program should print `00000000`. + +### Expected output : + +```console +student@ubuntu:~/printbits$ go build +student@ubuntu:~/printbits$ ./printbits 1 +00000001student@ubuntu:~/printbits$ +student@ubuntu:~/printbits$ ./printbits 192 +11000000student@ubuntu:~/printbits$ +student@ubuntu:~/printbits$ ./printbits a +00000000student@ubuntu:~/printbits$ +student@ubuntu:~/printbits$ ./printbits 1 1 +student@ubuntu:~/printbits$ ./printbits +student@ubuntu:~/printbits$ ``` - -### Usage - -Example of output: - -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 8e546ddd0..724a1c24f 100644 --- a/subjects/printbits.fr.md +++ b/subjects/printbits.fr.md @@ -2,18 +2,21 @@ ### Instructions -Écrire une fonction qui prend un `byte`, et qui l'affiche en valeur binaire **sans newline à la fin**. - -### Fonction attendue - -```go -func PrintBits(octe byte) { - -} +Écrire un programme qui prend un nombre en argument, et qui l'affiche en valeur binaire **sans newline à la fin**. + +- Si l'argument n'est pas un nombre le programme doit afficher `00000000`. + +### Expected output : + +```console +student@ubuntu:~/printbits$ go build +student@ubuntu:~/printbits$ ./printbits 1 +00000001student@ubuntu:~/printbits$ +student@ubuntu:~/printbits$ ./printbits 192 +11000000student@ubuntu:~/printbits$ +student@ubuntu:~/printbits$ ./printbits a +00000000student@ubuntu:~/printbits$ +student@ubuntu:~/printbits$ ./printbits 1 1 +student@ubuntu:~/printbits$ ./printbits +student@ubuntu:~/printbits$ ``` - -### Usage - -Exemple d'output: - -Si 2 est passé à la fonction `PrintBits`, elle affichera "00000010". diff --git a/subjects/printcombn.fr.md b/subjects/printcombn.fr.md index 4712d665f..8f0a1c9f3 100644 --- a/subjects/printcombn.fr.md +++ b/subjects/printcombn.fr.md @@ -39,10 +39,10 @@ func main() { Et son résultat : ```console -student@ubuntu:~/piscine/test$ go build -student@ubuntu:~/piscine/test$ ./test +student@ubuntu:~/piscine-go/test$ go build +student@ubuntu:~/piscine-go/test$ ./test 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 -01, 02, 03, 04, 05, 06, 07, 08, 09, 12, 13, 14, 15, 16, 17, 18, 19, 23, 24, 25, 26, 27, 28, 29, 34, 35, 36, 37, 38, 39, 45, 46, 47, 48, 49, 56, 57, 58, 59, 67, 68, 69, 78, 79, 89 -012, 013, 014, 015, 016, 017, 018, 019, 023, 024, 025, 026, 027, 028, 029, 034, 035, 036, 037, 038, 039, 045, 046, 047, 048, 049, 056, 057, 058, 059, 067, 068, 069, 078, 079, 089, 123, 124, 125, 126, 127, 128, 129, 134, 135, 136, 137, 138, 139, 145, 146, 147, 148, 149, 156, 157, 158, 159, 167, 168, 169, 178, 179, 189, 234, 235, 236, 237, 238, 239, 245, 246, 247, 248, 249, 256, 257, 258, 259, 267, 268, 269, 278, 279, 289, 345, 346, 347, 348, 349, 356, 357, 358, 359, 367, 368, 369, 378, 379, 389, 456, 457, 458, 459, 467, 468, 469, 478, 479, 489, 567, 568, 569, 578, 579, 589, 678, 679, 689, 789 -student@ubuntu:~/piscine/test$ +012, 013, 014, 015, 016, 017, 018, ... 679, 689, 789 +012345678, 012345679, ..., 123456789 +student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/printstr.en.md b/subjects/printstr.en.md index 2c59d3792..a50a22b6d 100644 --- a/subjects/printstr.en.md +++ b/subjects/printstr.en.md @@ -2,7 +2,7 @@ ### Instructions -- Write a function that prints one by one the characters of a string on the screen. +- Write a function that prints one by one the characters of a `string` on the screen. ### Expected function @@ -31,7 +31,7 @@ And its output : ```console student@ubuntu:~/piscine-go/test$ go build -student@ubuntu:~/piscine-go/test$ ./test +student@ubuntu:~/piscine-go/test$ ./test | cat -e Hello World!% student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/printstr.fr.md b/subjects/printstr.fr.md index 29ceb6311..5900ba01e 100644 --- a/subjects/printstr.fr.md +++ b/subjects/printstr.fr.md @@ -2,7 +2,7 @@ ### Instructions -- Écrire une fonction qui affiche un à un les caractères d'une chaîne à l'écran. +- Écrire une fonction qui affiche un à un les caractères d'une `string` à l'écran. ### Fonction attendue @@ -31,7 +31,7 @@ Et son résultat : ```console student@ubuntu:~/piscine-go/test$ go build -student@ubuntu:~/piscine-go/test$ ./test +student@ubuntu:~/piscine-go/test$ ./test | cat -e Hello World!% student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/printstrprog.en.md b/subjects/printstrprog.en.md new file mode 100644 index 000000000..8cf79be26 --- /dev/null +++ b/subjects/printstrprog.en.md @@ -0,0 +1,17 @@ +## printstrprog + +### Instructions + +- Write a program that prints one by one the characters of a `string` passed as an argument of the program. + +### Expected output : + +```console +student@ubuntu:~/piscine-go/printstrprog$ go build +student@ubuntu:~/piscine-go/printstrprog$ ./printstrprog "Hello World!" | cat -e +Hello World!$ +student@ubuntu:~/piscine-go/printstrprog$ ./printstrprog +student@ubuntu:~/piscine-go/printstrprog$ +student@ubuntu:~/piscine-go/printstrprog$ ./printstrprog "Hello" "World" +student@ubuntu:~/piscine-go/printstrprog$ +``` diff --git a/subjects/printstrprog.fr.md b/subjects/printstrprog.fr.md new file mode 100644 index 000000000..bed639582 --- /dev/null +++ b/subjects/printstrprog.fr.md @@ -0,0 +1,17 @@ +## printstrprog + +### Instructions + +- Écrire un programme qui affiche un à un les caractères d'une `string` passée en argument du programme. + +### Utilisation : + +```console +student@ubuntu:~/piscine-go/printstrprog$ go build +student@ubuntu:~/piscine-go/printstrprog$ ./printstrprog "Hello World!" | cat -e +Hello World!$ +student@ubuntu:~/piscine-go/printstrprog$ ./printstrprog +student@ubuntu:~/piscine-go/printstrprog$ +student@ubuntu:~/piscine-go/printstrprog$ ./printstrprog "Hello" "World" +student@ubuntu:~/piscine-go/printstrprog$ +``` diff --git a/subjects/range.en.md b/subjects/range.en.md index c1daa7493..116525ef5 100644 --- a/subjects/range.en.md +++ b/subjects/range.en.md @@ -2,23 +2,29 @@ ### Instructions -Write the function `Range` which must: +Write a program 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` !) -- and that returns that array. +- **Allocate (with make())** an array of integers. -### Expected function +- Fill it with consecutive values that begins at the first argument and end at the second argument (Including the values of thoses arguments !). -```go -func Range(start, end int) []int { +- That prints the array. -} -``` +Errors should be handled. + +If the number of arguments is different from 2 the program prints a newline ("`\n`"). -### Usage +### Expected output : -- 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. +```console +student@ubuntu:~/range$ go build +student@ubuntu:~/range$ ./range 1 3 +[1 2 3] +student@ubuntu:~/range$ ./range -1 2 | cat -e +[-1 0 1 2]$ +student@ubuntu:~/range$ ./range 0 0 +[0] +student@ubuntu:~/reverserange$ ./reverserange 0 nan | cat -e +strconv.Atoi: parsing "nan": invalid syntax$ +student@ubuntu:~/range$ +``` diff --git a/subjects/range.fr.md b/subjects/range.fr.md index 3dccdc993..bf219d81c 100644 --- a/subjects/range.fr.md +++ b/subjects/range.fr.md @@ -2,23 +2,29 @@ ### Instructions -Écrire la fonction `Range` qui doit: +Écrire un programme qui doit: -- 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. +- Allouer (avec make()) une slice d'entiers. -### Fonction attendue +- Le remplir avec des valeurs consécutives qui commencent au premier argument et qui finissent au deuxième (En incluant les valeurs des deux arguments !) -```go -func Range(start, end int) []int { +- Et qui affiche cette slice. -} -``` +Les erreurs doivent être gérées. + +Si le nombre d'arguments est différent de 2 le programme affiche un newline ("`\n`"). ### Utilisation -- 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. +```console +student@ubuntu:~/range$ go build +student@ubuntu:~/range$ ./range 1 3 +[1 2 3] +student@ubuntu:~/range$ ./range -1 2 | cat -e +[-1 0 1 2]$ +student@ubuntu:~/range$ ./range 0 0 +[0] +student@ubuntu:~/reverserange$ ./reverserange 0 nan | cat -e +strconv.Atoi: parsing "nan": invalid syntax$ +student@ubuntu:~/range$ +``` diff --git a/subjects/rectangle.en.md b/subjects/rectangle.en.md index 7fb3197cd..bee1bf2ff 100644 --- a/subjects/rectangle.en.md +++ b/subjects/rectangle.en.md @@ -11,11 +11,9 @@ is defined by the points of the upper left and lower right corners. - The struct `rectangle` has to have two variables, `upLeft` and `downRight` type `point`. -- Our main task is to make a program that: - - - Given a slice of points of size `n` returns the smallest rectangle that contains all the points in the vector of points. The name of that function is `defineRectangle` - - - And calculates and prints the area of that rectangle you define. +- The goal is to make a program that: + - Given a slice of points of size `n` returns the smallest rectangle that contains all the points in the vector of points. The name of that function is `defineRectangle`. + - And which calculates and prints the area of that rectangle you define. ### Expected main and function for the program diff --git a/subjects/rectangle.fr.md b/subjects/rectangle.fr.md index 7fb3197cd..33dea8f03 100644 --- a/subjects/rectangle.fr.md +++ b/subjects/rectangle.fr.md @@ -2,22 +2,19 @@ ### Instructions -Consider that a point is defined by its coordinates and that a rectangle -is defined by the points of the upper left and lower right corners. +Considérer qu'un point est défini par ses coordonnées et qu'un rectangle est défini par les points de son coin du haut à gauche et son coin du bas à droite. -- Define two structures named, `point` and `rectangle`. +- Définir deux structures nommées, `point` et `rectangle`. -- The struct `point` has to have two variables, `x` and `y`, type `int`. +- La structure `point` doit avoir deux variables, `x` et `y`, de type `int`. -- The struct `rectangle` has to have two variables, `upLeft` and `downRight` type `point`. +- La structure `rectangle` doit avoir deux variables, `upLeft` et `downRight` de type `point`. -- Our main task is to make a program that: +- Le but est de faire un programme qui: + - Avec une slice de points donnée de taille `n` retournes le plus petit rectangle qui contient tous les points dans le vecteur de points0. Le nom de cette fonction est `defineRectangle`. + - Et qui calcules et affiche l'airethe de ce rectangle défini. - - Given a slice of points of size `n` returns the smallest rectangle that contains all the points in the vector of points. The name of that function is `defineRectangle` - - - And calculates and prints the area of that rectangle you define. - -### Expected main and function for the program +### Main et fonctions attendues pour ce programme ```go func defineRectangle(ptr *point, n int) *rectangle { diff --git a/subjects/reversebits.en.md b/subjects/reversebits.en.md index 891812220..433e3258c 100644 --- a/subjects/reversebits.en.md +++ b/subjects/reversebits.en.md @@ -2,26 +2,20 @@ ### Instructions -Write a function that takes a `byte`, that reverses it `bit` by `bit` (like the -example) and that returns the result. - -### Expected function - -```go -func ReverseBits(octet byte) byte { - -} -``` - -Example: - -1 byte - ---- - -``` -00100110 - || - \/ -01100100 +Write a program that takes a `byte` in binary format, that reverses it `bit` by `bit` (as shown in the +example) and that prints the result. + +### Expected output + +```console +student@ubuntu:~/piscine-go/reversebits$ go build +student@ubuntu:~/piscine-go/reversebits$ ./reversebits +Not enough arguments. +student@ubuntu:~/piscine-go/reversebits$ ./reversebits 00100110 | cat -e +01100100$ +student@ubuntu:~/piscine-go/reversebits$ ./reversebits "djs" +The argument "djs" does not represent a byte +student@ubuntu:~/piscine-go/reversebits$ ./reversebits "0102039s" | cat -e +The argument "0102039s" does not represent a byte$ +student@ubuntu:~/piscine-go/reversebits$ ``` diff --git a/subjects/reversebits.fr.md b/subjects/reversebits.fr.md index 5277611e7..50126970b 100644 --- a/subjects/reversebits.fr.md +++ b/subjects/reversebits.fr.md @@ -2,25 +2,19 @@ ### Instructions -É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 - -```go -func ReverseBits(octet byte) byte { - -} -``` - -Exemple: - -1 byte - ---- - -``` -00100110 - || - \/ -01100100 +Écrire un programme qui prend un `byte`, qui l'inverse `bit` par `bit` (comme montré sur l'exemple) et qui affiche le résultat. + +### Utilisation + +```console +student@ubuntu:~/piscine-go/reversebits$ go build +student@ubuntu:~/piscine-go/reversebits$ ./reversebits +Not enough arguments. +student@ubuntu:~/piscine-go/reversebits$ ./reversebits 00100110 | cat -e +01100100$ +student@ubuntu:~/piscine-go/reversebits$ ./reversebits "djs" +The argument "djs" does not represent a byte +student@ubuntu:~/piscine-go/reversebits$ ./reversebits "0102039s" | cat -e +The argument "0102039s" does not represent a byte$ +student@ubuntu:~/piscine-go/reversebits$ ``` diff --git a/subjects/reverserange.en.md b/subjects/reverserange.en.md index 489fa9a83..5eb8e79d7 100644 --- a/subjects/reverserange.en.md +++ b/subjects/reverserange.en.md @@ -2,23 +2,31 @@ ### Instructions -Write the function `ReverseRange` which must: +Write a program 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` !) -- and that returns that array. +- **Allocate (with make())** an array of integers. -### Expected function +- Fill it with consecutive values that begins at the second argument and end at the first argument (Including the values of thoses arguments !). -```go -func ReverseRange(start, end int) []int { +- That prints the array. -} -``` +Errors should be handled. + +If the number of arguments is different from 2 the program prints a newline ("`\n`"). ### 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. -- 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. +```console +student@ubuntu:~/reverserange$ go build +student@ubuntu:~/reverserange$ ./reverserange 1 3 +[3 2 1] +student@ubuntu:~/reverserange$ ./reverserange -1 2 | cat -e +[2 1 0 -1]$ +student@ubuntu:~/reverserange$ ./reverserange 0 0 +[0] +student@ubuntu:~/reverserange$ ./reverserange 0 -3 +[-3 -2 -1 0] +student@ubuntu:~/reverserange$ ./reverserange 0 nan | cat -e +strconv.Atoi: parsing "nan": invalid syntax$ +student@ubuntu:~/reverserange$ +``` diff --git a/subjects/reverserange.fr.md b/subjects/reverserange.fr.md index bb65691d1..2acf2f6f4 100644 --- a/subjects/reverserange.fr.md +++ b/subjects/reverserange.fr.md @@ -2,23 +2,31 @@ ### Instructions -Écrire la fonction `ReverseRange` qui doit: +Écrire un programme qui doit: -- 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. +- Allouer (avec make()) une slice d'entiers. -### Fonction attendue +- Le remplir avec des valeurs consécutives qui commencent au deuxième argument et qui finissent au premier (En incluant les valeurs des deux arguments !) -```go -func ReverseRange(start, end int) []int { +- Et qui affiche cette slice. -} -``` +Les erreurs doivent être gérées. + +Si le nombre d'arguments est différent de 2 le programme affiche un newline ("`\n`"). ### Utilisation : -- 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. +```console +student@ubuntu:~/reverserange$ go build +student@ubuntu:~/reverserange$ ./reverserange 1 3 +[3 2 1] +student@ubuntu:~/reverserange$ ./reverserange -1 2 | cat -e +[2 1 0 -1]$ +student@ubuntu:~/reverserange$ ./reverserange 0 0 +[0] +student@ubuntu:~/reverserange$ ./reverserange 0 -3 +[-3 -2 -1 0] +student@ubuntu:~/reverserange$ ./reverserange 0 nan | cat -e +strconv.Atoi: parsing "nan": invalid syntax$ +student@ubuntu:~/reverserange$ +``` diff --git a/subjects/rot14prog.en.md b/subjects/rot14prog.en.md new file mode 100644 index 000000000..c421a1f71 --- /dev/null +++ b/subjects/rot14prog.en.md @@ -0,0 +1,18 @@ +## rot14 + +### Instructions + +Write a program that prints the `string` passed as argument, transformed into a `rot14 string`. + +### Usage + +```console +student@ubuntu:~/rot14prog$ go build +student@ubuntu:~/rot14prog$ ./rot14prog "Hello How are You" | cat -e +Vszzc Vck ofs Mci$ +student@ubuntu:~/rot14prog$ ./rot14prog Hello How are You + +student@ubuntu:~/rot14prog$ ./rot14prog + +student@ubuntu:~/rot14prog$ +``` diff --git a/subjects/rot14prog.fr.md b/subjects/rot14prog.fr.md new file mode 100644 index 000000000..5d3b27365 --- /dev/null +++ b/subjects/rot14prog.fr.md @@ -0,0 +1,18 @@ +## rot14 + +### Instructions + +Écrire un programme qui retourne la `string` en paramètre transformée en `string rot14`.. + +### Utilisation + +```console +student@ubuntu:~/rot14prog$ go build +student@ubuntu:~/rot14prog$ ./rot14prog "Hello How are You" | cat -e +Vszzc Vck ofs Mci$ +student@ubuntu:~/rot14prog$ ./rot14prog Hello How are You + +student@ubuntu:~/rot14prog$ ./rot14prog + +student@ubuntu:~/rot14prog$ +``` diff --git a/subjects/split.en.md b/subjects/split.en.md index 3ef02c340..b5b8941fd 100644 --- a/subjects/split.en.md +++ b/subjects/split.en.md @@ -10,6 +10,7 @@ The separators are the characters of the `charset string` given in parameter. ```go func Split(str, charset string) []string { + } ``` @@ -27,7 +28,8 @@ import ( func main() { str := "HelloHAhowHAareHAyou?" - fmt.Println(piscine.Split(str, charset, "HA")} + fmt.Println(piscine.Split(str, "HA")) +} ``` And its output : diff --git a/subjects/split.fr.md b/subjects/split.fr.md index 32ea7586f..1d1544181 100644 --- a/subjects/split.fr.md +++ b/subjects/split.fr.md @@ -4,12 +4,13 @@ Écrire une fonction qui sépare les mots d'une `string` et les met dans un tableau de `string`. -Les séparateurs sont les caractè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 ```go func Split(str, charset string) []string { + } ``` @@ -27,7 +28,8 @@ import ( func main() { str := "HelloHAhowHAareHAyou?" - fmt.Println(piscine.Split(str, "HA")} + fmt.Println(piscine.Split(str, "HA")) +} ``` Et son résultat : diff --git a/subjects/splitprog.en.md b/subjects/splitprog.en.md new file mode 100644 index 000000000..ef563b644 --- /dev/null +++ b/subjects/splitprog.en.md @@ -0,0 +1,24 @@ +## splitprog + +### Instructions + +Write a program which separates the words of a `string`, which puts them in a `string` array and which then prints it to standard output. + +The program receives two parameters: + +- The first is the `string` +- The second is the separator + +### Usage : + +```console +student@ubuntu:~/piscine-go/splitprog$ go build +student@ubuntu:~/piscine-go/splitprog$ ./splitprog "HelloHAhowHAareHAyou?" HA | cat -e +[Hello how are you?]$ +student@ubuntu:~/piscine-go/splitprog$ ./splitprog "Hello,how,are,you?" "," +[Hello how are you?] +student@ubuntu:~/piscine-go/splitprog$ ./splitprog "HelloHAhowHAareHAyou?" +student@ubuntu:~/piscine-go/splitprog$ +student@ubuntu:~/piscine-go/splitprog$ ./splitprog +student@ubuntu:~/piscine-go/splitprog$ +``` diff --git a/subjects/splitprog.fr.md b/subjects/splitprog.fr.md new file mode 100644 index 000000000..3ac1d5628 --- /dev/null +++ b/subjects/splitprog.fr.md @@ -0,0 +1,24 @@ +## splitprog + +### Instructions + +Écrire une fonction qui sépare les mots d'une `string`, qui les met dans un tableau de `string` et qui les affichent sur la sortie standard. + +Le programme reçoit deux paramètres: + +- Le premier est la `string` +- Le deuxième est le séparateur + +### Utilisation : + +```console +student@ubuntu:~/piscine-go/splitprog$ go build +student@ubuntu:~/piscine-go/splitprog$ ./splitprog "HelloHAhowHAareHAyou?" HA | cat -e +[Hello how are you?]$ +student@ubuntu:~/piscine-go/splitprog$ ./splitprog "Hello,how,are,you?" "," +[Hello how are you?] +student@ubuntu:~/piscine-go/splitprog$ ./splitprog "HelloHAhowHAareHAyou?" +student@ubuntu:~/piscine-go/splitprog$ +student@ubuntu:~/piscine-go/splitprog$ ./splitprog +student@ubuntu:~/piscine-go/splitprog$ +``` diff --git a/subjects/splitwhitespaces.en.md b/subjects/splitwhitespaces.en.md index 02253732c..9e7f4f163 100644 --- a/subjects/splitwhitespaces.en.md +++ b/subjects/splitwhitespaces.en.md @@ -10,6 +10,7 @@ The separators are spaces, tabs and newlines. ```go func SplitWhiteSpaces(str string) []string { + } ``` @@ -27,7 +28,8 @@ import ( func main() { str := "Hello how are you?" - fmt.Println(piscine.SplitWhiteSpaces(str)} + fmt.Println(piscine.SplitWhiteSpaces(str)) +} ``` And its output : diff --git a/subjects/splitwhitespaces.fr.md b/subjects/splitwhitespaces.fr.md index 527b709a4..6364066be 100644 --- a/subjects/splitwhitespaces.fr.md +++ b/subjects/splitwhitespaces.fr.md @@ -10,6 +10,7 @@ Les séparateurs sont les espaces, les tabulations et les retours à la ligne. ```go func SplitWhiteSpaces(str string) []string { + } ``` @@ -27,7 +28,8 @@ import ( func main() { str := "Hello how are you?" - fmt.Println(piscine.SplitWhiteSpaces(str)} + fmt.Println(piscine.SplitWhiteSpaces(str)) +} ``` Et son résultat : diff --git a/subjects/strlen.en.md b/subjects/strlen.en.md index 68618fc9f..7f9e2b2c0 100644 --- a/subjects/strlen.en.md +++ b/subjects/strlen.en.md @@ -2,7 +2,7 @@ ### Instructions -- Write a function that counts the characters of a string and that returns that count. +- Write a function that counts the characters of a `string` and that returns that count. ### Expected function diff --git a/subjects/strlen.fr.md b/subjects/strlen.fr.md index de4de21f4..183355ce9 100644 --- a/subjects/strlen.fr.md +++ b/subjects/strlen.fr.md @@ -2,7 +2,7 @@ ### Instructions -- Écrire une fonction qui compte le nombre de caractères d'une chaîne et qui retourne le nombre trouvé. +- Écrire une fonction qui compte le nombre de caractères d'une `string` et qui retourne le nombre trouvé. ### Fonction attendue diff --git a/subjects/strlenprog.en.md b/subjects/strlenprog.en.md new file mode 100644 index 000000000..9899252cd --- /dev/null +++ b/subjects/strlenprog.en.md @@ -0,0 +1,19 @@ +## strlenprog + +### Instructions + +- Write a program that counts the characters of a `string` and that returns that value. + +- If the program receives more than one or no arguments it must not print anything. + +### Expected output : + +```console +student@ubuntu:~/piscine-go/strlenprog$ go build +student@ubuntu:~/piscine-go/strlenprog$ ./strlenprog "hello" | cat -e +5$ +student@ubuntu:~/piscine-go/strlenprog$ ./strlenprog +student@ubuntu:~/piscine-go/strlenprog$ +student@ubuntu:~/piscine-go/strlenprog$ ./strlenprog "hello" "how are you" +student@ubuntu:~/piscine-go/strlenprog$ +``` diff --git a/subjects/strlenprog.fr.md b/subjects/strlenprog.fr.md new file mode 100644 index 000000000..38e44e776 --- /dev/null +++ b/subjects/strlenprog.fr.md @@ -0,0 +1,19 @@ +## strlenprog + +### Instructions + +- Écrire un programme qui compte le nombre de caractères d'une `string` et qui retourne le nombre trouvé. + +- Si le programme reçoit plusieurs ou aucun arguments il ne doit rien afficher. + +### Utilisation : + +```console +student@ubuntu:~/piscine-go/strlenprog$ go build +student@ubuntu:~/piscine-go/strlenprog$ ./strlenprog "hello" | cat -e +5$ +student@ubuntu:~/piscine-go/strlenprog$ ./strlenprog +student@ubuntu:~/piscine-go/strlenprog$ +student@ubuntu:~/piscine-go/strlenprog$ ./strlenprog "hello" "how are you" +student@ubuntu:~/piscine-go/strlenprog$ +``` diff --git a/subjects/strrevprog.en.md b/subjects/strrevprog.en.md new file mode 100644 index 000000000..ebda9a442 --- /dev/null +++ b/subjects/strrevprog.en.md @@ -0,0 +1,15 @@ +## strrevprog + +### Instructions + +- Write a program that reverses a `string` and prints it in the standard output. + +### Expected output : + +```console +student@ubuntu:~/piscine-go/strrevprog$ go build +student@ubuntu:~/piscine-go/strrevprog$ ./strrevprog "Hello World!" | cat -e +!dlroW olleH$ +student@ubuntu:~/piscine-go/strrevprog$ ./strrevprog +student@ubuntu:~/piscine-go/strrevprog$ +``` diff --git a/subjects/strrevprog.fr.md b/subjects/strrevprog.fr.md new file mode 100644 index 000000000..4a1f62411 --- /dev/null +++ b/subjects/strrevprog.fr.md @@ -0,0 +1,15 @@ +## strrevprog + +### Instructions + +- Écrire un programme qui inverse une `string` et qui l'affiche dans la sortie standard. + +### Utilisation : + +```console +student@ubuntu:~/piscine-go/strrevprog$ go build +student@ubuntu:~/piscine-go/strrevprog$ ./strrevprog "Hello World!" | cat -e +!dlroW olleH$ +student@ubuntu:~/piscine-go/strrevprog$ ./strrevprog +student@ubuntu:~/piscine-go/strrevprog$ +``` diff --git a/subjects/to-git-or-not-to-git.en.md b/subjects/to-git-or-not-to-git.en.md index c312c4109..6970632c7 100644 --- a/subjects/to-git-or-not-to-git.en.md +++ b/subjects/to-git-or-not-to-git.en.md @@ -3,7 +3,7 @@ ### Instructions Write in a file `to-git-or-not-to-git.sh` the command that isolates your `gitHub id`. -Only the numbers will appears. +Only the numbers will appear. ### Usage