Browse Source

Merge pull request #185 from 01-edu/fixHackaton

fix rot14 hackaton
content-update
Christopher Fremond 5 years ago committed by GitHub
parent
commit
89f591a007
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 14
      subjects/abort.en.md
  2. 22
      subjects/abort.fr.md
  3. 14
      subjects/collatzcountdown.en.md
  4. 22
      subjects/collatzcountdown.fr.md
  5. 11
      subjects/rot14.en.md
  6. 19
      subjects/rot14.fr.md

14
subjects/abort.en.md

@ -2,9 +2,7 @@
### Instructions
Write a function that returns the the value in the middle of 5 five arguments.
This function must have the following signature.
Write a function that returns the median of 5 five arguments.
### Expected function
@ -23,11 +21,11 @@ package main
import (
"fmt"
student ".."
piscine ".."
)
func main() {
middle := student.Abort(2, 3, 8, 5, 7)
middle := piscine.Abort(2, 3, 8, 5, 7)
fmt.Println(middle)
}
```
@ -35,8 +33,8 @@ func main() {
And its output :
```console
student@ubuntu:~/student/abort$ go build
student@ubuntu:~/student/abort$ ./abort
student@ubuntu:~/piscine/test$ go build
student@ubuntu:~/piscine/test$ ./test
5
student@ubuntu:~/student/abort$
student@ubuntu:~/piscine/test$
```

22
subjects/abort.fr.md

@ -2,11 +2,9 @@
### Instructions
Write a function that returns the the value in the middle of 5 five arguments.
Écrire une fonction qui retournes la médiane de 5 arguments.
This function must have the following signature.
### Expected function
### Fonction attendue
```go
func Abort(a, b, c, d, e int) int {
@ -14,29 +12,29 @@ func Abort(a, b, c, d, e int) 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
import (
"fmt"
student ".."
piscine ".."
)
func main() {
middle := student.Abort(2, 3, 8, 5, 7)
middle := piscine.Abort(2, 3, 8, 5, 7)
fmt.Println(middle)
}
```
And its output :
Et son résultat :
```console
student@ubuntu:~/student/abort$ go build
student@ubuntu:~/student/abort$ ./abort
student@ubuntu:~/piscine/test$ go build
student@ubuntu:~/piscine/test$ ./test
5
student@ubuntu:~/student/abort$
student@ubuntu:~/piscine/test$
```

14
subjects/collatzcountdown.en.md

@ -2,9 +2,7 @@
### Instructions
Write a function, CollatzCountdown, that returns the number of steps to reach 1 using the collatz countdown.
The function must have the following signature.
Write a function, `CollatzCountdown`, that returns the number of steps necessary to reach 1 using the collatz countdown.
### Expected function
@ -23,11 +21,11 @@ package main
import (
"fmt"
student ".."
piscine ".."
)
func main() {
steps := student.CollatzCountdown(12)
steps := piscine.CollatzCountdown(12)
fmt.Println(steps)
}
```
@ -35,8 +33,8 @@ func main() {
And its output :
```console
student@ubuntu:~/student/collatzcountdown$ go build
student@ubuntu:~/student/collatzcountdown$ ./collatzcountdown
student@ubuntu:~/piscine/test$ go build
student@ubuntu:~/piscine/test$ ./test
10
student@ubuntu:~/student/collatzcountdown$
student@ubuntu:~/piscine/test$
```

22
subjects/collatzcountdown.fr.md

@ -2,11 +2,9 @@
### Instructions
Write a function, CollatzCountdown, that returns the number of steps to reach 1 using the collatz countdown.
Écrire une fonction, `CollatzCountdown`, qui retournes le nombre d'étapes nécéssaires pour atteindre 1 en utilisant le comptage de collatz.
The function must have the following signature.
### Expected function
### FOnction attendue
```go
func CollatzCountdown(start int) int {
@ -14,29 +12,29 @@ func CollatzCountdown(start int) 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
import (
"fmt"
student ".."
piscine ".."
)
func main() {
steps := student.CollatzCountdown(12)
steps := piscine.CollatzCountdown(12)
fmt.Println(steps)
}
```
And its output :
Et son résultat :
```console
student@ubuntu:~/student/collatzcountdown$ go build
student@ubuntu:~/student/collatzcountdown$ ./collatzcountdown
student@ubuntu:~/student/test$ go build
student@ubuntu:~/student/test$ ./test
10
student@ubuntu:~/student/collatzcountdown$
student@ubuntu:~/student/test$
```

11
subjects/rot14.en.md

@ -1,15 +1,15 @@
## ROT 14
## rot14
### Instructions
Write a function `rot14` that returns the string within the parameter but transformed into a rot14 string.
Write a function `rot14` that returns the `string` within the parameter transformed into a `rot14 string`.
- If you not certain what we are talking about, there is a rot13 already.
- For more information look what `rot13` stands for.
### Expected function
```go
func rot14(str string) string {
func Rot14(str string) string {
}
```
@ -22,11 +22,12 @@ Here is a possible [program](TODO-LINK) to test your function :
package main
import (
piscine ".."
"github.com/01-edu/z01"
)
func main() {
result := rot14("Hello How are You")
result := piscine.Rot14("Hello How are You")
arrayRune := []rune(result)
for _, s := range arrayRune {

19
subjects/rot14.fr.md

@ -1,32 +1,33 @@
## ROT 14
## rot14
### Instructions
Write a function `rot14` that returns the string within the parameter but transformed into a rot14 string.
Écrire une fonction `rot14` qui retournes la `string` en paramètre transformée en `string rot14`.
- If you not certain what we are talking about, there is a rot13 already.
- Pour plus d'informations chercher ce que `rot13` signifie.
### Expected function
### Fonction attendue
```go
func rot14(str string) string {
func Rot14(str string) string {
}
```
### 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
import (
piscine ".."
"github.com/01-edu/z01"
)
func main() {
result := rot14("Hello How are You")
result := piscine.Rot14("Hello How are You")
arrayRune := []rune(result)
for _, s := range arrayRune {
@ -36,7 +37,7 @@ func main() {
}
```
And its output :
Et son résultat :
```console
student@ubuntu:~/piscine/test$ go build

Loading…
Cancel
Save