Browse Source

correcting input given from interns

pull/262/head
lee 5 years ago
parent
commit
0d195a1148
  1. 2
      subjects/atoibase.en.md
  2. 2
      subjects/atoibase.fr.md
  3. 2
      subjects/collatzcountdown.en.md
  4. 2
      subjects/collatzcountdown.fr.md
  5. 3
      subjects/concatparams.en.md
  6. 4
      subjects/displayfile.en.md
  7. 12
      subjects/doop.en.md
  8. 4
      subjects/split.en.md
  9. 4
      subjects/split.fr.md
  10. 4
      subjects/splitwhitespaces.en.md
  11. 4
      subjects/splitwhitespaces.fr.md

2
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"))
}
```

2
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"))
}
```

2
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 0 or negative.
### Expected function
```go

2
subjects/collatzcountdown.fr.md

@ -4,6 +4,8 @@
Écrire une fonction, `CollatzCountdown`, qui retournes le nombre d'étapes nécéssaires pour atteindre 1 en utilisant le comptage de collatz.
- Il doit renvoyer `-1` si `start` est égal à 0 ou négatif.
### FOnction attendue
```go

3
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 {
}
```

4
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

12
subjects/doop.en.md

@ -23,18 +23,14 @@ The program has to handle the modulo and division operations by 0 as shown on th
```console
student@ubuntu:~/piscine/test$ go build doop.go
student@ubuntu:~/piscine/test$ ./doop
student@ubuntu:~/piscine/test$ ./doop 1 + 1
2
student@ubuntu:~/piscine/test$ ./doop 1 + 1 | cat -e
2$
student@ubuntu:~/piscine/test$ ./doop hello + 1 | cat -e
0$
student@ubuntu:~/piscine/test$ ./doop 1 p 1
0
student@ubuntu:~/piscine/test$ ./doop 1 + 1
2
student@ubuntu:~/piscine/test$ ./doop 1 p 1 | cat -e
0$
student@ubuntu:~/piscine/test$ ./doop 1 / 0 | cat -e
No division by 0$
student@ubuntu:~/piscine/test$ ./doop 1 % 0 | cat -e
No modulo by 0$
student@ubuntu:~/piscine/test$ ./doop 1 "*" 1
1
```

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

4
subjects/split.fr.md

@ -10,6 +10,7 @@ Les séparateurs sont les caractères de la `string charset` donnée en paramét
```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 :

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

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

Loading…
Cancel
Save