diff --git a/subjects/ispowerof2/README.md b/subjects/ispowerof2/README.md index 39c06c6f..cb85f0d7 100644 --- a/subjects/ispowerof2/README.md +++ b/subjects/ispowerof2/README.md @@ -4,11 +4,11 @@ Write a program that determines if a given number is a power of 2. -This program must print `true` if the given number is a power of 2, otherwise it prints `false`. +This program must print `true` if the given number is a power of 2, otherwise it has to print `false`. - If there is more than one or no argument the program should print nothing. -- When there is only one argument, it will always be a positive valid int. +- When there is only one argument, it will always be a positive valid `int`. ### Usage : diff --git a/subjects/max/README.md b/subjects/max/README.md index d3b71e4b..8cb667dd 100644 --- a/subjects/max/README.md +++ b/subjects/max/README.md @@ -2,7 +2,7 @@ ### Instructions -Write a function, `Max`, that returns the maximum value in a slice of integers. If the slice is empty, returns 0. +Write a function `Max` that will return the maximum value in a slice of integers. If the slice is empty it will return 0. ### Expected function diff --git a/subjects/rot13/README.md b/subjects/rot13/README.md index 6e2b38f4..a8aa3549 100644 --- a/subjects/rot13/README.md +++ b/subjects/rot13/README.md @@ -3,7 +3,7 @@ ### Instructions Write a program that takes a `string` and displays it, replacing each of its -letters by the letter 13 spaces ahead in alphabetical order. +letters by the letter 13 spots ahead in alphabetical order. - 'z' becomes 'm' and 'Z' becomes 'M'. The case of the letter stays the same. diff --git a/subjects/rot14/README.md b/subjects/rot14/README.md index 61700061..c18aa671 100644 --- a/subjects/rot14/README.md +++ b/subjects/rot14/README.md @@ -2,7 +2,10 @@ ### Instructions -Write a function `rot14` that returns the `string` within the parameter transformed into a `rot14 string`, that replaces a letter with the 14th letter after it, in the alphabet. +Write a function `rot14` that returns the `string` within the parameter transformed into a `rot14 string`. +Each letter will be replaced by the letter 14 spots ahead in the alphabetical order. + +- 'z' becomes 'n' and 'Z' becomes 'N'. The case of the letter stays the same. ### Expected function @@ -25,7 +28,7 @@ import ( ) func main() { - result := piscine.Rot14("Hello How are You") + result := piscine.Rot14("Hello! How are You?") for _, r := range result { z01.PrintRune(r) diff --git a/subjects/searchreplace/README.md b/subjects/searchreplace/README.md index 6a3ff8aa..52adfef5 100644 --- a/subjects/searchreplace/README.md +++ b/subjects/searchreplace/README.md @@ -2,7 +2,7 @@ ### Instructions -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). +Write a program that takes 3 arguments, the first argument is a `string` in which a letter (the 2nd argument) will be replaced by another one (the 3rd argument). - If the number of arguments is different from 3, the program displays nothing. @@ -13,6 +13,8 @@ Write a program that takes 3 arguments, the first argument is a `string` in whic ```console $ go run . "hella there" "a" "o" hello there +$ go run . "hallo thara" "a" "e" +hello there $ go run . "abcd" "z" "l" abcd $ go run . "something" "a" "o" "b" "c" diff --git a/subjects/wdmatch/README.md b/subjects/wdmatch/README.md index 9fa242ce..6e5f0e2e 100644 --- a/subjects/wdmatch/README.md +++ b/subjects/wdmatch/README.md @@ -2,7 +2,7 @@ ### Instructions -Write a program that takes two `string` 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 `string` and checks whether it is possible to write the first `string` with characters from the second `string`. This rewrite must respect the order in which these characters appear in the second `string`. If it is possible, the program displays the `string` followed by a newline (`'\n'`), otherwise it simply displays nothing. @@ -11,6 +11,8 @@ If the number of arguments is different from 2, the program displays nothing. ### Usage ```console +$ go run . 123 123 +123 $ go run . faya fgvvfdxcacpolhyghbreda faya $ go run . faya fgvvfdxcacpolhyghbred