Browse Source

Merge pull request #791 from 01-edu/clarificationsAndTypos

Clarifications and typos
pull/794/head
xpetit 3 years ago committed by GitHub
parent
commit
8587f78db8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      subjects/ispowerof2/README.md
  2. 2
      subjects/max/README.md
  3. 2
      subjects/rot13/README.md
  4. 7
      subjects/rot14/README.md
  5. 4
      subjects/searchreplace/README.md
  6. 4
      subjects/wdmatch/README.md

4
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 :

2
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

2
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.

7
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)

4
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"

4
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

Loading…
Cancel
Save