Browse Source

reformat titles

pull/45/head
Clement Denis 5 years ago committed by Clément
parent
commit
2391cb3b9b
  1. 8
      subjects/advancedsortwordarr.en.md
  2. 8
      subjects/advancedsortwordarr.fr.md
  3. 2
      subjects/advancedsortwordtab.en.md
  4. 8
      subjects/any.en.md
  5. 8
      subjects/any.fr.md
  6. 8
      subjects/appendrange.en.md
  7. 8
      subjects/appendrange.fr.md
  8. 8
      subjects/atoi.en.md
  9. 8
      subjects/atoi.fr.md
  10. 8
      subjects/atoibase.en.md
  11. 8
      subjects/atoibase.fr.md
  12. 8
      subjects/basicatoi.en.md
  13. 8
      subjects/basicatoi.fr.md
  14. 8
      subjects/basicatoi2.en.md
  15. 8
      subjects/basicatoi2.fr.md
  16. 8
      subjects/basicjoin.en.md
  17. 8
      subjects/basicjoin.fr.md
  18. 8
      subjects/btreeapplyinorder.en.md
  19. 8
      subjects/btreeapplypostorder.en.md
  20. 8
      subjects/btreeapplypreorder.en.md
  21. 8
      subjects/btreeinsertdata.en.md
  22. 8
      subjects/btreeprintroot.en.md
  23. 8
      subjects/btreesearchitem.en.md
  24. 8
      subjects/capitalize.en.md
  25. 8
      subjects/capitalize.fr.md
  26. 6
      subjects/cl-camp1.en.md
  27. 6
      subjects/cl-camp1.fr.md
  28. 6
      subjects/cl-camp2.en.md
  29. 6
      subjects/cl-camp2.fr.md
  30. 6
      subjects/cl-camp3.en.md
  31. 4
      subjects/cl-camp3.fr.md
  32. 6
      subjects/cl-camp4.en.md
  33. 6
      subjects/cl-camp4.fr.md
  34. 8
      subjects/cl-camp5.en.md
  35. 8
      subjects/cl-camp5.fr.md
  36. 6
      subjects/cl-camp6.en.md
  37. 6
      subjects/cl-camp6.fr.md
  38. 6
      subjects/cl-camp7.en.md
  39. 6
      subjects/cl-camp7.fr.md
  40. 6
      subjects/cl-camp8.en.md
  41. 6
      subjects/cl-camp8.fr.md
  42. 6
      subjects/cl.en.md
  43. 8
      subjects/commandments.en.md
  44. 8
      subjects/compare.en.md
  45. 8
      subjects/compare.fr.md
  46. 8
      subjects/concat.en.md
  47. 8
      subjects/concat.fr.md
  48. 8
      subjects/concatparams.en.md
  49. 8
      subjects/concatparams.fr.md
  50. 8
      subjects/convertbase.en.md
  51. 8
      subjects/convertbase.fr.md
  52. 8
      subjects/countif.en.md
  53. 8
      subjects/countif.fr.md
  54. 8
      subjects/divmod.en.md
  55. 8
      subjects/divmod.fr.md
  56. 6
      subjects/doop.en.md
  57. 6
      subjects/doop.fr.md
  58. 6
      subjects/eightqueens.en.md
  59. 6
      subjects/eightqueens.fr.md
  60. 8
      subjects/fibonacci.en.md
  61. 8
      subjects/fibonacci.fr.md
  62. 8
      subjects/findnextprime.en.md
  63. 8
      subjects/findnextprime.fr.md
  64. 2
      subjects/firebase-demo.en.md
  65. 8
      subjects/firstrune.en.md
  66. 8
      subjects/firstrune.fr.md
  67. 8
      subjects/foreach.en.md
  68. 8
      subjects/foreach.fr.md
  69. 2
      subjects/functions.en.md
  70. 4
      subjects/get-ready.en.md
  71. 6
      subjects/go-say-hello.en.md
  72. 6
      subjects/go-say-hello.fr.md
  73. 8
      subjects/index.en.md
  74. 8
      subjects/index.fr.md
  75. 8
      subjects/isalpha.en.md
  76. 8
      subjects/isalpha.fr.md
  77. 8
      subjects/islower.en.md
  78. 8
      subjects/islower.fr.md
  79. 8
      subjects/isnegative.en.md
  80. 8
      subjects/isnegative.fr.md
  81. 8
      subjects/isnumeric.en.md
  82. 8
      subjects/isnumeric.fr.md
  83. 8
      subjects/isprime.en.md
  84. 8
      subjects/isprime.fr.md
  85. 8
      subjects/isprintable.en.md
  86. 8
      subjects/isprintable.fr.md
  87. 8
      subjects/issorted.en.md
  88. 8
      subjects/issorted.fr.md
  89. 8
      subjects/isupper.en.md
  90. 8
      subjects/isupper.fr.md
  91. 8
      subjects/iterativefactorial.en.md
  92. 8
      subjects/iterativefactorial.fr.md
  93. 8
      subjects/iterativepower.en.md
  94. 8
      subjects/iterativepower.fr.md
  95. 8
      subjects/join.en.md
  96. 8
      subjects/join.fr.md
  97. 8
      subjects/lastrune.en.md
  98. 8
      subjects/lastrune.fr.md
  99. 8
      subjects/listat.en.md
  100. 8
      subjects/listat.fr.md
  101. Some files were not shown because too many files changed in this diff diff.show_more

8
subjects/advancedsortwordarr.en.md

@ -1,17 +1,17 @@
# advancedsortwordarr ## advancedsortwordarr
## Instructions ### Instructions
Write a function `AdvancedSortWordArr` that sorts a `string` array, based on the function `f` passed in parameter. Write a function `AdvancedSortWordArr` that sorts a `string` array, based on the function `f` passed in parameter.
## Expected function ### Expected function
```go ```go
func AdvancedSortWordTab(array []string, f func(a, b string) int) { func AdvancedSortWordTab(array []string, f func(a, b string) int) {
} }
``` ```
## Usage ### Usage
Here is a possible [program](TODO-LINK) to test your function : Here is a possible [program](TODO-LINK) to test your function :

8
subjects/advancedsortwordarr.fr.md

@ -1,17 +1,17 @@
# advancedsortwordarr ## advancedsortwordarr
## Instructions ### Instructions
Écrire une fonction `AdvancedSortWordArr` qui trie un tableau de `string`, basé sur la fonction `f` passée en paramètre. Écrire une fonction `AdvancedSortWordArr` qui trie un tableau de `string`, basé sur la fonction `f` passée en paramètre.
## Fonction attendue ### Fonction attendue
```go ```go
func AdvancedSortWordTab(array []string, f func(a, b string) int) { func AdvancedSortWordTab(array []string, f func(a, b string) int) {
} }
``` ```
## Utilisation ### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction : Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :

2
subjects/advancedsortwordtab.en.md

@ -1 +1 @@
# advancedsortwordtab ## advancedsortwordtab

8
subjects/any.en.md

@ -1,19 +1,19 @@
# any ## any
## Instructions ### Instructions
Write a function `Any` that returns `true`, for a `string` array: Write a function `Any` that returns `true`, for a `string` array:
- if, when that `string` array is passed through an `f` function, at least one element returns `true`. - if, when that `string` array is passed through an `f` function, at least one element returns `true`.
## Expected function ### Expected function
```go ```go
func Any(f func(string) bool, arr []string) bool { func Any(f func(string) bool, arr []string) bool {
} }
``` ```
## Usage ### Usage
Here is a possible [program](TODO-LINK) to test your function : Here is a possible [program](TODO-LINK) to test your function :

8
subjects/any.fr.md

@ -1,19 +1,19 @@
# any ## any
## Instructions ### Instructions
Écrire une fonction `Any` qui retournes `true`, pour un tableau de `string`: Écrire une fonction `Any` qui retournes `true`, pour un tableau de `string`:
- si, lorsque ce tableau de `string` est passé à travers une fonction `f`, au moins un element retournes `true`. - si, lorsque ce tableau de `string` est passé à travers une fonction `f`, au moins un element retournes `true`.
## Fonction attendue ### Fonction attendue
```go ```go
func Any(f func(string) bool, arr []string) bool { func Any(f func(string) bool, arr []string) bool {
} }
``` ```
## Utilisation ### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction : Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :

8
subjects/appendrange.en.md

@ -1,6 +1,6 @@
# appendrange ## appendrange
## Instructions ### Instructions
Write a function that takes an `int` min and an `int` max as parameters. Write a function that takes an `int` min and an `int` max as parameters.
That function returns a slice of `int` with all the values between min and max. That function returns a slice of `int` with all the values between min and max.
@ -11,7 +11,7 @@ If min is superior or equal to max, a `nil` slice is returned.
`make` is not allowed for this exercise. `make` is not allowed for this exercise.
## Expected function ### Expected function
```go ```go
func AppendRange(min, max int) []int { func AppendRange(min, max int) []int {
@ -19,7 +19,7 @@ func AppendRange(min, max int) []int {
} }
``` ```
## Usage ### Usage
Here is a possible [program](TODO-LINK) to test your function : Here is a possible [program](TODO-LINK) to test your function :

8
subjects/appendrange.fr.md

@ -1,6 +1,6 @@
# appendrange ## appendrange
## Instructions ### Instructions
Écrire une fonction qui prend un `int` minimum et un `int` maximum comme paramètres. Cette fonction retournes une slice d'`int` avec toutes les valeurs comprises entre le minimum et le maximum. Écrire une fonction qui prend un `int` minimum et un `int` maximum comme paramètres. Cette fonction retournes une slice d'`int` avec toutes les valeurs comprises entre le minimum et le maximum.
@ -10,7 +10,7 @@ Si le minimum est supérieur ou égal au maximum, une slice `nil` est retournée
`make` n'est pas autorisé pour cet exercice. `make` n'est pas autorisé pour cet exercice.
## Fonction attendue ### Fonction attendue
```go ```go
func AppendRange(min, max int) []int { func AppendRange(min, max int) []int {
@ -18,7 +18,7 @@ func AppendRange(min, max int) []int {
} }
``` ```
## Utilisation ### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction : Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :

8
subjects/atoi.en.md

@ -1,6 +1,6 @@
# atoi ## atoi
## Instructions ### Instructions
- Write a [function](TODO-LINK) that simulates the behaviour of the `Atoi` function in Go. `Atoi` transforms a number represented as a `string` in a number represented as an `int`. - Write a [function](TODO-LINK) that simulates the behaviour of the `Atoi` function in Go. `Atoi` transforms a number represented as a `string` in a number represented as an `int`.
@ -10,7 +10,7 @@
- This function will **only** have to return the `int` `nbr`. For this exercise the `error` return of atoi is not required. - This function will **only** have to return the `int` `nbr`. For this exercise the `error` return of atoi is not required.
## Format required ### Format required
```go ```go
func Atoi(s string) int { func Atoi(s string) int {
@ -18,7 +18,7 @@ func Atoi(s string) int {
} }
``` ```
## Usage ### Usage
Here is a possible [program](TODO-LINK) to test your function : Here is a possible [program](TODO-LINK) to test your function :

8
subjects/atoi.fr.md

@ -1,6 +1,6 @@
# atoi ## atoi
## Instructions ### Instructions
- Écrire une fonction qui reproduit le comportement de la fonction atoi en Go. Atoi transforme un nombre représenté en `string` (chaîne de caractères) en `int` (entier). - Écrire une fonction qui reproduit le comportement de la fonction atoi en Go. Atoi transforme un nombre représenté en `string` (chaîne de caractères) en `int` (entier).
@ -10,7 +10,7 @@
- Cette fonction aura **seulement** à retourner l'`int` (entier) `nbr`. Pour cet exercice le retour d'erreur d'atoi de go n'est pas demandé. - Cette fonction aura **seulement** à retourner l'`int` (entier) `nbr`. Pour cet exercice le retour d'erreur d'atoi de go n'est pas demandé.
## Fonction attendue ### Fonction attendue
```go ```go
func Atoi(s string) int { func Atoi(s string) int {
@ -18,7 +18,7 @@ func Atoi(s string) int {
} }
``` ```
## Utilisation ### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction : Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :

8
subjects/atoibase.en.md

@ -1,6 +1,6 @@
# atoibase ## atoibase
## Instructions ### Instructions
Write a function that takes a `string` number and its `string` base in parameters and returns its conversion as an `int`. Write a function that takes a `string` number and its `string` base in parameters and returns its conversion as an `int`.
@ -16,7 +16,7 @@ Only valid `string` numbers will be tested.
The function **does not have** to manage negative numbers. The function **does not have** to manage negative numbers.
## Expected function ### Expected function
```go ```go
func AtoiBase(s string, base string) int { func AtoiBase(s string, base string) int {
@ -24,7 +24,7 @@ func AtoiBase(s string, base string) int {
} }
``` ```
## Usage ### Usage
Here is a possible [program](TODO-LINK) to test your function : Here is a possible [program](TODO-LINK) to test your function :

8
subjects/atoibase.fr.md

@ -1,6 +1,6 @@
# atoibase ## atoibase
## Instructions ### Instructions
Écrire une fonction qui prend un nombre `string` et sa base `string` en paramètres et retournes sa convertion en `int`. Écrire une fonction qui prend un nombre `string` et sa base `string` en paramètres et retournes sa convertion en `int`.
@ -16,7 +16,7 @@ Seuls des nombres en `string` valides seront testés.
La fonction **ne doit pas** gérer les nombres négatifs. La fonction **ne doit pas** gérer les nombres négatifs.
## Fonction attendue ### Fonction attendue
```go ```go
func AtoiBase(s string, base string) int { func AtoiBase(s string, base string) int {
@ -24,7 +24,7 @@ func AtoiBase(s string, base string) int {
} }
``` ```
## Utilisation ### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction : Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :

8
subjects/basicatoi.en.md

@ -1,6 +1,6 @@
# basicatoi ## basicatoi
## Instructions ### Instructions
- Write a function that simulates the behaviour of the atoi function in Go. Atoi transforms a number defined as a `string` in a number defined as an `int`. - Write a function that simulates the behaviour of the atoi function in Go. Atoi transforms a number defined as a `string` in a number defined as an `int`.
@ -10,7 +10,7 @@
- This function will **only** have to return the `int` `nbr`. For this exercise the `error` return of atoi is not required. - This function will **only** have to return the `int` `nbr`. For this exercise the `error` return of atoi is not required.
## Expected function ### Expected function
```go ```go
func BasicAtoi(s string) int { func BasicAtoi(s string) int {
@ -18,7 +18,7 @@ func BasicAtoi(s string) int {
} }
``` ```
## Usage ### Usage
Here is a possible [program](TODO-LINK) to test your function : Here is a possible [program](TODO-LINK) to test your function :

8
subjects/basicatoi.fr.md

@ -1,6 +1,6 @@
# basicatoi ## basicatoi
## Instructions ### Instructions
- Écrire une fonction qui reproduit le comportement de la fonction atoi en Go. Atoi transforme un nombre représenté en `string` (chaîne de caractères) en `int` (entier). - Écrire une fonction qui reproduit le comportement de la fonction atoi en Go. Atoi transforme un nombre représenté en `string` (chaîne de caractères) en `int` (entier).
@ -10,7 +10,7 @@
- Cette fonction aura **seulement** à retourner l'`int` (entier) `nbr`. Pour cet exercice le retour d'erreur d'atoi de go n'est pas demandé. - Cette fonction aura **seulement** à retourner l'`int` (entier) `nbr`. Pour cet exercice le retour d'erreur d'atoi de go n'est pas demandé.
## Fonction attendue ### Fonction attendue
```go ```go
func BasicAtoi(s string) int { func BasicAtoi(s string) int {
@ -18,7 +18,7 @@ func BasicAtoi(s string) int {
} }
``` ```
## Utilisation ### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction : Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :

8
subjects/basicatoi2.en.md

@ -1,6 +1,6 @@
# basicatoi2 ## basicatoi2
## Instructions ### Instructions
- Write a function that simulates the behaviour of the atoi function in Go. Atoi transforms a number defined as a `string` in a number defined as an `int`. - Write a function that simulates the behaviour of the atoi function in Go. Atoi transforms a number defined as a `string` in a number defined as an `int`.
@ -10,7 +10,7 @@
- This function will **only** have to return the `int` `nbr`. For this exercise the `error` return of atoi is not required. - This function will **only** have to return the `int` `nbr`. For this exercise the `error` return of atoi is not required.
## Expected Function ### Expected Function
```go ```go
func BasicAtoi2(s string) int { func BasicAtoi2(s string) int {
@ -18,7 +18,7 @@ func BasicAtoi2(s string) int {
} }
``` ```
## Usage ### Usage
Here is a possible [program](TODO-LINK) to test your function : Here is a possible [program](TODO-LINK) to test your function :

8
subjects/basicatoi2.fr.md

@ -1,6 +1,6 @@
# basicatoi2 ## basicatoi2
## Instructions ### Instructions
- Écrire une fonction qui reproduit le comportement de la fonction atoi en Go. Atoi transforme un nombre représenté en `string` (chaîne de caractères) en `int` (entier). - Écrire une fonction qui reproduit le comportement de la fonction atoi en Go. Atoi transforme un nombre représenté en `string` (chaîne de caractères) en `int` (entier).
@ -10,7 +10,7 @@
- Cette fonction aura **seulement** à retourner l'`int` (entier) `nbr`. Pour cet exercice le retour d'erreur d'atoi de go n'est pas demandé. - Cette fonction aura **seulement** à retourner l'`int` (entier) `nbr`. Pour cet exercice le retour d'erreur d'atoi de go n'est pas demandé.
## Fonction attendue ### Fonction attendue
```go ```go
func BasicAtoi2(s string) int { func BasicAtoi2(s string) int {
@ -18,7 +18,7 @@ func BasicAtoi2(s string) int {
} }
``` ```
## Utilisation ### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction : Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :

8
subjects/basicjoin.en.md

@ -1,10 +1,10 @@
# basicjoin ## basicjoin
## Instructions ### Instructions
Write a function that returns the concatenation of all the `string` of a table of `string` passed in argument. Write a function that returns the concatenation of all the `string` of a table of `string` passed in argument.
## Expected function ### Expected function
```go ```go
func basicJoin(strs []string) string { func basicJoin(strs []string) string {
@ -12,7 +12,7 @@ func basicJoin(strs []string) string {
} }
``` ```
## Usage ### Usage
Here is a possible [program](TODO-LINK) to test your function : Here is a possible [program](TODO-LINK) to test your function :

8
subjects/basicjoin.fr.md

@ -1,10 +1,10 @@
# basicjoin ## basicjoin
## Instructions ### Instructions
Écrire une fonction qui retourne la concaténation de toutes les `string` d'un slice de `string` passées en paramètres. Écrire une fonction qui retourne la concaténation de toutes les `string` d'un slice de `string` passées en paramètres.
## Fonction attendue ### Fonction attendue
```go ```go
func BasicJoin(strs []string) string { func BasicJoin(strs []string) string {
@ -12,7 +12,7 @@ func BasicJoin(strs []string) string {
} }
``` ```
## Utilisation ### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction : Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :

8
subjects/btreeapplyinorder.en.md

@ -1,11 +1,11 @@
# btreeinsertdata ## btreeinsertdata
## Instructions ### Instructions
Write a function that applies a function in order to each element in the tree Write a function that applies a function in order to each element in the tree
(see in order tree walks) (see in order tree walks)
## Expected function ### Expected function
```go ```go
func BTreeApplyInorder(root *piscine.TreeNode, f func(...interface{}) (int, error)) { func BTreeApplyInorder(root *piscine.TreeNode, f func(...interface{}) (int, error)) {
@ -13,7 +13,7 @@ func BTreeApplyInorder(root *piscine.TreeNode, f func(...interface{}) (int, erro
} }
``` ```
## Usage ### Usage
Here is a possible [program](TODO-LINK) to test your function : Here is a possible [program](TODO-LINK) to test your function :

8
subjects/btreeapplypostorder.en.md

@ -1,10 +1,10 @@
# btreeinsertdata ## btreeinsertdata
## Instructions ### Instructions
Write a function that applies a function using a postorder walk to each element in the tree Write a function that applies a function using a postorder walk to each element in the tree
## Expected function ### Expected function
```go ```go
func BTreeApplyPostorder(root *piscine.TreeNode, f func(...interface{}) (int, error)) { func BTreeApplyPostorder(root *piscine.TreeNode, f func(...interface{}) (int, error)) {
@ -12,7 +12,7 @@ func BTreeApplyPostorder(root *piscine.TreeNode, f func(...interface{}) (int, er
} }
``` ```
## Usage ### Usage
Here is a possible [program](TODO-LINK) to test your function : Here is a possible [program](TODO-LINK) to test your function :

8
subjects/btreeapplypreorder.en.md

@ -1,10 +1,10 @@
# btreeinsertdata ## btreeinsertdata
## Instructions ### Instructions
Write a function that applies a function using a preorder walk to each element in the tree Write a function that applies a function using a preorder walk to each element in the tree
## Expected function ### Expected function
```go ```go
func BTreeApplyPreorder(root *piscine.TreeNode, f func(...interface{}) (int, error)) { func BTreeApplyPreorder(root *piscine.TreeNode, f func(...interface{}) (int, error)) {
@ -12,7 +12,7 @@ func BTreeApplyPreorder(root *piscine.TreeNode, f func(...interface{}) (int, err
} }
``` ```
## Usage ### Usage
Here is a possible [program](TODO-LINK) to test your function : Here is a possible [program](TODO-LINK) to test your function :

8
subjects/btreeinsertdata.en.md

@ -1,12 +1,12 @@
# btreeinsertdata ## btreeinsertdata
## Instructions ### Instructions
Write a function that inserts new data in a binary search tree Write a function that inserts new data in a binary search tree
following the properties of binary search trees. following the properties of binary search trees.
The nodes must be defined as follows: The nodes must be defined as follows:
## Expected function ### Expected function
```go ```go
type TreeNode struct { type TreeNode struct {
@ -19,7 +19,7 @@ func BTreeInsertData(root *TreeNode, data string) *TreeNode {
} }
``` ```
## Usage ### Usage
Here is a possible [program](TODO-LINK) to test your function : Here is a possible [program](TODO-LINK) to test your function :

8
subjects/btreeprintroot.en.md

@ -1,12 +1,12 @@
# printroot ## printroot
## Instructions ### Instructions
Write a function to print the value of the root node of a binary tree. Write a function to print the value of the root node of a binary tree.
You have to create a new number and print the value of data You have to create a new number and print the value of data
The nodes must be defined as follows: The nodes must be defined as follows:
## Expected function ### Expected function
```go ```go
type TreeNode struct { type TreeNode struct {
@ -19,7 +19,7 @@ func PrintRoot(root *TreeNode){
} }
``` ```
## Usage ### Usage
Here is a possible [program](TODO-LINK) to test your function : Here is a possible [program](TODO-LINK) to test your function :

8
subjects/btreesearchitem.en.md

@ -1,10 +1,10 @@
# btreeinsertdata ## btreeinsertdata
## Instructions ### Instructions
Write a function that searches for an item with a data element equal to elem and return that node Write a function that searches for an item with a data element equal to elem and return that node
## Expected function ### Expected function
```go ```go
func BTreeSearchItem(root *piscine_test.TreeNode, elem string) *piscine_test.TreeNode { func BTreeSearchItem(root *piscine_test.TreeNode, elem string) *piscine_test.TreeNode {
@ -13,7 +13,7 @@ func BTreeSearchItem(root *piscine_test.TreeNode, elem string) *piscine_test.Tre
``` ```
## Usage ### Usage
Here is a possible [program](TODO-LINK) to test your function : Here is a possible [program](TODO-LINK) to test your function :

8
subjects/capitalize.en.md

@ -1,12 +1,12 @@
# capitalize ## capitalize
## Instructions ### Instructions
Write a function that capitalizes the first letter of each word **and** lowercases the rest of each word of a `string`. Write a function 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. A word is a sequence of **alphanumerical** characters.
## Expected function ### Expected function
```go ```go
func Capitalize(s string) string { func Capitalize(s string) string {
@ -14,7 +14,7 @@ func Capitalize(s string) string {
} }
``` ```
## Usage ### Usage
Here is a possible [program](TODO-LINK) to test your function : Here is a possible [program](TODO-LINK) to test your function :

8
subjects/capitalize.fr.md

@ -1,12 +1,12 @@
# capitalize ## capitalize
## Instructions ### Instructions
Écrire une fonction qui met en majuscule la premiere lettre de chaque mot et en minuscule les autres lettres du reste du mot d'une `string`. Écrire une fonction qui met en majuscule la premiere 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**. Un mot est une suite de caractères **alphanumériques**.
## Fonction attendue ### Fonction attendue
```go ```go
func Capitalize(s string) string { func Capitalize(s string) string {
@ -14,7 +14,7 @@ func Capitalize(s string) string {
} }
``` ```
## Utilisation ### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction : Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :

6
subjects/cl-camp1.en.md

@ -1,6 +1,6 @@
# cl-camp1 ## cl-camp1
## Instructions ### Instructions
A little voice speaks in your head: A little voice speaks in your head:
@ -16,6 +16,6 @@ Put in a file `mastertheLS` the command line that will:
- Order them by ascending order of creation date. - Order them by ascending order of creation date.
- Have the folders have a `/` in front of them. - Have the folders have a `/` in front of them.
## Hint ### Hint
Read the man... Read the man...

6
subjects/cl-camp1.fr.md

@ -1,6 +1,6 @@
# cl-camp1 ## cl-camp1
## Instructions ### Instructions
Une petite voix dans votre esprit vous dit: Une petite voix dans votre esprit vous dit:
@ -16,6 +16,6 @@ Mettez dans un fichier `mastertheLS` la ligne de commande qui:
- Les triera pas ordre croissant de date de création. - Les triera pas ordre croissant de date de création.
- Placera un `/` en face des dossiers. - Placera un `/` en face des dossiers.
## Indice ### Indice
Lisez le man... Lisez le man...

6
subjects/cl-camp2.en.md

@ -1,6 +1,6 @@
# cl-camp2 ## cl-camp2
## Instructions ### Instructions
"keep training ..." "keep training ..."
@ -8,7 +8,7 @@ Create a file `r`, which shows `R` on a line when the `cat` command is executed
A line is a sequence of characters preceding the [end of line](https://en.wikipedia.org/wiki/Newline) character (`'\n'`). A line is a sequence of characters preceding the [end of line](https://en.wikipedia.org/wiki/Newline) character (`'\n'`).
## Usage ### Usage
```console ```console
student@ubuntu:~/piscine/test$ cat -e r student@ubuntu:~/piscine/test$ cat -e r

6
subjects/cl-camp2.fr.md

@ -1,6 +1,6 @@
# cl-camp2 ## cl-camp2
## Instructions ### Instructions
"Continue l'entrainement ..." "Continue l'entrainement ..."
@ -8,7 +8,7 @@ Créez un fichier `r`, qui affiche `R` sur une ligne quand la commande `cat` com
Une ligne est une suite de caractères précédant le caractère [fin de ligne](https://en.wikipedia.org/wiki/Newline) (`'\n'`). Une ligne est une suite de caractères précédant le caractère [fin de ligne](https://en.wikipedia.org/wiki/Newline) (`'\n'`).
## Utilisation ### Utilisation
```console ```console
student@ubuntu:~/piscine/test$ cat -e r student@ubuntu:~/piscine/test$ cat -e r

6
subjects/cl-camp3.en.md

@ -1,6 +1,6 @@
# cl-camp3 ## cl-camp3
## Instructions ### Instructions
"start looking ..." "start looking ..."
@ -10,6 +10,6 @@ Create a file `look`, which will look for and show, in the current directory and
- all the files ending with a `z` and, - all the files ending with a `z` and,
- all files starting with `z` and ending with `a!`. - all files starting with `z` and ending with `a!`.
## Hint ### Hint
Read the `find` man... Read the `find` man...

4
subjects/cl-camp3.fr.md

@ -1,6 +1,6 @@
# cl-camp3 ## cl-camp3
## Instructions ### Instructions
"commences à chercher ..." "commences à chercher ..."

6
subjects/cl-camp4.en.md

@ -1,6 +1,6 @@
# cl-camp4 ## cl-camp4
## Instructions ### Instructions
"someone familiar" "someone familiar"
@ -14,7 +14,7 @@ Create a file `myfamily.sh`, which will show a subject's family (key: relatives)
* What to use : curl, jq and others... * What to use : curl, jq and others...
## Usage ### Usage
```console ```console
student@ubuntu:~/piscine/test$ export HERO_ID=1 student@ubuntu:~/piscine/test$ export HERO_ID=1

6
subjects/cl-camp4.fr.md

@ -1,6 +1,6 @@
# cl-camp4 ## cl-camp4
## Instructions ### Instructions
"quelqu'un de familier" "quelqu'un de familier"
@ -14,7 +14,7 @@ Créer un fichier `myfamily.sh`, qui montrera qui affichera la famille d'un indi
* Quoi utiliser : `curl`, `jq` et d'autres... * Quoi utiliser : `curl`, `jq` et d'autres...
## Utilisation ### Utilisation
```console ```console
student@ubuntu:~/piscine/test$ export HERO_ID=1 student@ubuntu:~/piscine/test$ export HERO_ID=1

8
subjects/cl-camp5.en.md

@ -1,6 +1,6 @@
# cl-camp5 ## cl-camp5
## Instructions ### Instructions
"keep looking..." "keep looking..."
@ -10,7 +10,7 @@ Create a file `lookagain.sh`, which will look for, from the current directory an
That command will only show the name of the files without the `.sh`. That command will only show the name of the files without the `.sh`.
## Usage ### Usage
```console ```console
student@ubuntu:~/piscine/test$ export HERO_ID=1 student@ubuntu:~/piscine/test$ export HERO_ID=1
@ -21,6 +21,6 @@ file3$
student@ubuntu:~/piscine/test$ student@ubuntu:~/piscine/test$
``` ```
## Hint ### Hint
A little `cut`ing might be useful... A little `cut`ing might be useful...

8
subjects/cl-camp5.fr.md

@ -1,6 +1,6 @@
# cl-camp5 ## cl-camp5
## Instructions ### Instructions
"continues à chercher..." "continues à chercher..."
@ -10,7 +10,7 @@ Créer un fichier `lookagain.sh`, qui cherchera et montrera, dans le répertoire
Cette commande montrera le nom des fichiers sans le`.sh`. Cette commande montrera le nom des fichiers sans le`.sh`.
## Utilisation ### Utilisation
```console ```console
student@ubuntu:~/piscine/test$ export HERO_ID=1 student@ubuntu:~/piscine/test$ export HERO_ID=1
@ -21,6 +21,6 @@ file3$
student@ubuntu:~/piscine/test$ student@ubuntu:~/piscine/test$
``` ```
## Indice ### Indice
Un petit `cut`ter pourrait être utile... Un petit `cut`ter pourrait être utile...

6
subjects/cl-camp6.en.md

@ -1,12 +1,12 @@
# cl-camp6 ## cl-camp6
## Instructions ### Instructions
"Now, do your inventory" "Now, do your inventory"
Create a file `countfiles.sh`, which will print the number **(and only the number)** of regular files and folders cointaned in the current directory and its sub-folders : Create a file `countfiles.sh`, which will print the number **(and only the number)** of regular files and folders cointaned in the current directory and its sub-folders :
## Usage ### Usage
```console ```console
student@ubuntu:~/piscine/test$ ./countfiles.sh | cat -e student@ubuntu:~/piscine/test$ ./countfiles.sh | cat -e

6
subjects/cl-camp6.fr.md

@ -1,12 +1,12 @@
# cl-camp6 ## cl-camp6
## Instructions ### Instructions
"Maintenant, fais ton inventaire" "Maintenant, fais ton inventaire"
Créer un fichier `countfiles.sh`, qui affichera will lenombre **(et seulement le nombre)** de fichiers réguliers et répertoires contenu dans le répertoire courant et ses sous-répertoires : Créer un fichier `countfiles.sh`, qui affichera will lenombre **(et seulement le nombre)** de fichiers réguliers et répertoires contenu dans le répertoire courant et ses sous-répertoires :
## Utilisation ### Utilisation
```console ```console
student@ubuntu:~/piscine/test$ ./countfiles.sh | cat -e student@ubuntu:~/piscine/test$ ./countfiles.sh | cat -e

6
subjects/cl-camp7.en.md

@ -1,12 +1,12 @@
# cl-camp7 ## cl-camp7
## Instructions ### Instructions
"Be accurate" "Be accurate"
Create a file `"\?$*'ChouMi'*$?\"` that will contain "01" and **nothing else**. Create a file `"\?$*'ChouMi'*$?\"` that will contain "01" and **nothing else**.
## Usage ### Usage
```console ```console
student@ubuntu:~/piscine/test$ ls | cat -e student@ubuntu:~/piscine/test$ ls | cat -e

6
subjects/cl-camp7.fr.md

@ -1,12 +1,12 @@
# cl-camp7 ## cl-camp7
## Instructions ### Instructions
"Sois précis" "Sois précis"
Créer un fichier `"\?$*'ChouMi'*$?\"` qui contiendra "01" et **rien d'autre**. Créer un fichier `"\?$*'ChouMi'*$?\"` qui contiendra "01" et **rien d'autre**.
## Utilisation ### Utilisation
```console ```console
student@ubuntu:~/piscine/test$ ls | cat -e student@ubuntu:~/piscine/test$ ls | cat -e

6
subjects/cl-camp8.en.md

@ -1,11 +1,11 @@
# cl-camp8 ## cl-camp8
## Instructions ### Instructions
"pick your equipment" "pick your equipment"
Write a command line in a `skip.sh` file that prints the result of a `ls -l` skipping 1 line out of 2, starting with the **first** one. Write a command line in a `skip.sh` file that prints the result of a `ls -l` skipping 1 line out of 2, starting with the **first** one.
## Hint ### Hint
`awk` or `sed` can do the job. `awk` or `sed` can do the job.

6
subjects/cl-camp8.fr.md

@ -1,11 +1,11 @@
# cl-camp8 ## cl-camp8
## Instructions ### Instructions
"Choisis ton équipement" "Choisis ton équipement"
écrire une ligne dans un fichier `skip.sh` qui affiche le résultat d'un `ls -l` qui saute 1 ligne sur 2, en commençant pas la **première**. écrire une ligne dans un fichier `skip.sh` qui affiche le résultat d'un `ls -l` qui saute 1 ligne sur 2, en commençant pas la **première**.
## Indice ### Indice
`awk` ou `sed` peuvent faire le travail. `awk` ou `sed` peuvent faire le travail.

6
subjects/cl.en.md

@ -1,6 +1,6 @@
# cl-camp1 ## cl-camp1
## Instructions ### Instructions
A little voice speaks in your head: A little voice speaks in your head:
@ -16,6 +16,6 @@ Put in a file `mastertheLS` the command line that will:
- Order them by ascending order of creation date. - Order them by ascending order of creation date.
- Have the folders have a `/` in front of them. - Have the folders have a `/` in front of them.
## Hint ### Hint
Read the man... Read the man...

8
subjects/commandments.en.md

@ -6,7 +6,7 @@ objectives: reading the rules
skills: git, github, reading skills: git, github, reading
--- ---
# commandments ## commandments
A few basic principles to follow A few basic principles to follow
@ -14,7 +14,7 @@ A few basic principles to follow
<img width="476" height="600" src="https://upload.wikimedia.org/wikipedia/commons/thumb/e/e5/MCC-31231_Mozes_toont_de_wetstafelen_%281%29.tif/lossy-page1-476px-MCC-31231_Mozes_toont_de_wetstafelen_%281%29.tif.jpg"> <img width="476" height="600" src="https://upload.wikimedia.org/wikipedia/commons/thumb/e/e5/MCC-31231_Mozes_toont_de_wetstafelen_%281%29.tif/lossy-page1-476px-MCC-31231_Mozes_toont_de_wetstafelen_%281%29.tif.jpg">
</p> </p>
## The Commandements _(read them)_ ### The Commandements _(read them)_
- Le numérique est ta passion. - Le numérique est ta passion.
@ -100,7 +100,7 @@ A few basic principles to follow
- Si tu t’interroges ou ne comprends pas nos choix pédagogiques, demande nous. On ne fait généralement rien au hasard. - Si tu t’interroges ou ne comprends pas nos choix pédagogiques, demande nous. On ne fait généralement rien au hasard.
## Required ### Required
You [clone](http://lmgtfy.com/?q=git+clone) your [fork](http://lmgtfy.com/?q=github+fork) of this [repository](http://lmgtfy.com/?q=git+repository) You [clone](http://lmgtfy.com/?q=git+clone) your [fork](http://lmgtfy.com/?q=github+fork) of this [repository](http://lmgtfy.com/?q=git+repository)
and in it, you must create a file named `turn_in` () in which you write EXACTLY the following sentence ending by a line break. and in it, you must create a file named `turn_in` () in which you write EXACTLY the following sentence ending by a line break.
@ -109,6 +109,6 @@ and in it, you must create a file named `turn_in` () in which you write EXACTLY
<img width="600" height="300" src="https://i.imgur.com/2PPQ2iZ.png"> <img width="600" height="300" src="https://i.imgur.com/2PPQ2iZ.png">
</p> </p>
## Submiting your solution ### Submiting your solution
Your work should be commited and pushed in the master branch of your own fork of this repository. Your work should be commited and pushed in the master branch of your own fork of this repository.

8
subjects/compare.en.md

@ -1,10 +1,10 @@
# compare ## compare
## Instructions ### Instructions
Write a function that behaves like the [`Compare`](https://golang.org/pkg/strings/#Compare) function. Write a function that behaves like the [`Compare`](https://golang.org/pkg/strings/#Compare) function.
## Expected function ### Expected function
```go ```go
func Compare(a, b string) int { func Compare(a, b string) int {
@ -12,7 +12,7 @@ func Compare(a, b string) int {
} }
``` ```
## Usage ### Usage
Here is a possible [program](TODO-LINK) to test your function : Here is a possible [program](TODO-LINK) to test your function :

8
subjects/compare.fr.md

@ -1,10 +1,10 @@
# compare ## compare
## Instructions ### Instructions
Écrire une fonction qui se comporte comme la fonction [`Compare`](https://golang.org/pkg/strings/#Compare). Écrire une fonction qui se comporte comme la fonction [`Compare`](https://golang.org/pkg/strings/#Compare).
## Fonction attendue ### Fonction attendue
```go ```go
func Compare(a, b string) int { func Compare(a, b string) int {
@ -12,7 +12,7 @@ func Compare(a, b string) int {
} }
``` ```
## Utilisation ### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction : Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :

8
subjects/concat.en.md

@ -1,10 +1,10 @@
# concat ## concat
## Instructions ### Instructions
Write a function that returns the concatenation of two `string` passed in arguments. Write a function that returns the concatenation of two `string` passed in arguments.
## Expected function ### Expected function
```go ```go
func Concat(str1 string, str2 string) string { func Concat(str1 string, str2 string) string {
@ -12,7 +12,7 @@ func Concat(str1 string, str2 string) string {
} }
``` ```
## Usage ### Usage
Here is a possible [program](TODO-LINK) to test your function : Here is a possible [program](TODO-LINK) to test your function :

8
subjects/concat.fr.md

@ -1,10 +1,10 @@
# concat ## concat
## Instructions ### Instructions
Écrire une fonction qui retourne la concaténation de deux `string` passées en paramètres. Écrire une fonction qui retourne la concaténation de deux `string` passées en paramètres.
## Fonction attendue ### Fonction attendue
```go ```go
func Concat(str1 string, str2 string) string { func Concat(str1 string, str2 string) string {
@ -12,7 +12,7 @@ func Concat(str1 string, str2 string) string {
} }
``` ```
## Utilisation ### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction : Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :

8
subjects/concatparams.en.md

@ -1,19 +1,19 @@
# concatparams ## concatparams
## Instructions ### Instructions
Write a function that takes the arguments reveived in parameters and returns them as a `string`. Write a function that takes the arguments reveived in parameters and returns them as a `string`.
The arguments must be **separated** by a `\n`. The arguments must be **separated** by a `\n`.
## Expected function ### Expected function
```go ```go
func ConcatParams(args []string) string { func ConcatParams(args []string) string {
} }
``` ```
## Usage ### Usage
Here is a possible [program](TODO-LINK) to test your function : Here is a possible [program](TODO-LINK) to test your function :

8
subjects/concatparams.fr.md

@ -1,19 +1,19 @@
# concatparams ## concatparams
## Instructions ### Instructions
Écrire une fonction qui prend les arguments en paramètres et les retournes dans une `string`. Écrire une fonction qui prend les arguments en paramètres et les retournes dans une `string`.
Les arguments doivent être **séparés** par un `\n`. Les arguments doivent être **séparés** par un `\n`.
## Fonction attendue ### Fonction attendue
```go ```go
func ConcatParams(args []string) string { func ConcatParams(args []string) string {
} }
``` ```
## Utilisation ### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction : Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :

8
subjects/convertbase.en.md

@ -1,6 +1,6 @@
# convertbase ## convertbase
## Instructions ### Instructions
Write a function that returns the convertion of a `string` number from one `string` baseFrom to one `string` baseTo. Write a function that returns the convertion of a `string` number from one `string` baseFrom to one `string` baseTo.
@ -8,14 +8,14 @@ Only valid bases will be tested.
Negative numbers will not be tested. Negative numbers will not be tested.
## Expected function ### Expected function
```go ```go
func ConvertBase(nbr, baseFrom, baseTo string) string { func ConvertBase(nbr, baseFrom, baseTo string) string {
} }
``` ```
## Usage ### Usage
Here is a possible [program](TODO-LINK) to test your function : Here is a possible [program](TODO-LINK) to test your function :

8
subjects/convertbase.fr.md

@ -1,6 +1,6 @@
# convertbase ## convertbase
## Instructions ### Instructions
Écrire une fonction qui retourne la convertion d'un nombre `string` d'une baseFrom `string` à une baseTo `string`. Écrire une fonction qui retourne la convertion d'un nombre `string` d'une baseFrom `string` à une baseTo `string`.
@ -8,14 +8,14 @@ Seules des bases valides seront testées.
Les nombres négatifs ne seront pas testés. Les nombres négatifs ne seront pas testés.
## Fonction attendue ### Fonction attendue
```go ```go
func ConvertBase(nbr, baseFrom, baseTo string) string { func ConvertBase(nbr, baseFrom, baseTo string) string {
} }
``` ```
## Utilisation ### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction : Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :

8
subjects/countif.en.md

@ -1,17 +1,17 @@
# countif ## countif
## Instructions ### Instructions
Write a function `CountIf` that returns the number of elements of a `string` array for which the `f` function returns `true`. Write a function `CountIf` that returns the number of elements of a `string` array for which the `f` function returns `true`.
## Expected function ### Expected function
```go ```go
func CountIf(f func(string) bool, tab []string) int { func CountIf(f func(string) bool, tab []string) int {
} }
``` ```
## Usage ### Usage
Here is a possible [program](TODO-LINK) to test your function : Here is a possible [program](TODO-LINK) to test your function :

8
subjects/countif.fr.md

@ -1,17 +1,17 @@
# countif ## countif
## Instructions ### Instructions
Écrire une fonction `CountIf` qui retournes le nombre d'éléments d'un tableau de `string` pour lesquels la fonction `f` retourne `true`. Écrire une fonction `CountIf` qui retournes le nombre d'éléments d'un tableau de `string` pour lesquels la fonction `f` retourne `true`.
## Fonction attendue ### Fonction attendue
```go ```go
func CountIf(f func(string) bool, tab []string) int { func CountIf(f func(string) bool, tab []string) int {
} }
``` ```
## Utilisation ### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction : Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :

8
subjects/divmod.en.md

@ -1,10 +1,10 @@
# divmod ## divmod
## Instructions ### Instructions
- Write a function that will be formatted as below. - Write a function that will be formatted as below.
## Expected function ### Expected function
```go ```go
func DivMod(a int, b int, div *int, mod *int) { func DivMod(a int, b int, div *int, mod *int) {
@ -16,7 +16,7 @@ func DivMod(a int, b int, div *int, mod *int) {
- The result of this division will be stored in the int pointed by **div**. - The result of this division will be stored in the int pointed by **div**.
- The remainder of this division will be stored in the int pointed by **mod**. - The remainder of this division will be stored in the int pointed by **mod**.
## Usage ### Usage
Here is a possible [program](TODO-LINK) to test your function : Here is a possible [program](TODO-LINK) to test your function :

8
subjects/divmod.fr.md

@ -1,10 +1,10 @@
# divmod ## divmod
## Instructions ### Instructions
- Écrire une fonction qui aura le format ci-dessous. - Écrire une fonction qui aura le format ci-dessous.
## Fonction attendue ### Fonction attendue
```go ```go
func DivMod(a int, b int, div *int, mod *int) { func DivMod(a int, b int, div *int, mod *int) {
@ -16,7 +16,7 @@ func DivMod(a int, b int, div *int, mod *int) {
- Le résultat de la division sera stocké dans l'int pointé par **div**. - Le résultat de la division sera stocké dans l'int pointé par **div**.
- Le reste de cette division sera stocké dans l'int pointé par **mod**. - Le reste de cette division sera stocké dans l'int pointé par **mod**.
## Utilisation ### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction : Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :

6
subjects/doop.en.md

@ -1,6 +1,6 @@
# doop ## doop
## Instructions ### Instructions
Write a [program](TODO-LINK) that is called `doop`. Write a [program](TODO-LINK) that is called `doop`.
@ -16,7 +16,7 @@ In case of an invalid number of arguments the program prints nothing.
`fmt.Print` is authorized. `fmt.Print` is authorized.
## Usage ### Usage
```console ```console
student@ubuntu:~/piscine/test$ go build doop.go student@ubuntu:~/piscine/test$ go build doop.go

6
subjects/doop.fr.md

@ -1,6 +1,6 @@
# doop ## doop
## Instructions ### Instructions
Écrire un [programme](TODO-LINK) qui s'apelle `doop`. Écrire un [programme](TODO-LINK) qui s'apelle `doop`.
@ -16,7 +16,7 @@ En cas de nombre invalide d'arguments le programme affiche rien.
`fmt.Print` est autorisé. `fmt.Print` est autorisé.
## Utilisation ### Utilisation
```console ```console
student@ubuntu:~/piscine/test$ go build doop.go student@ubuntu:~/piscine/test$ go build doop.go

6
subjects/eightqueens.en.md

@ -1,6 +1,6 @@
# eightqueens ## eightqueens
## Intructions ### Intructions
Write a function that prints the solutions to the [eight queens puzzle](https://en.wikipedia.org/wiki/Eight_queens_puzzle). Write a function that prints the solutions to the [eight queens puzzle](https://en.wikipedia.org/wiki/Eight_queens_puzzle).
@ -22,7 +22,7 @@ The index of the placement of a queen starts at 1.
It reads from left to right and each digit is the position for each column. It reads from left to right and each digit is the position for each column.
The solutions will be printed in ascending order. The solutions will be printed in ascending order.
## Expected function ### Expected function
```go ```go
package main package main

6
subjects/eightqueens.fr.md

@ -1,6 +1,6 @@
# eightqueens ## eightqueens
## Intructions ### Intructions
Écrire une [fonction](TODO-LINK) qui affiche toutes les solutions du [problème des huit dames](https://en.wikipedia.org/wiki/Eight_queens_puzzle). Écrire une [fonction](TODO-LINK) qui affiche toutes les solutions du [problème des huit dames](https://en.wikipedia.org/wiki/Eight_queens_puzzle).
@ -22,7 +22,7 @@ L'index du placement d'une reine commence à 1.
Elle se lit de gauche à droite et chaque chiffre est la position pour chacune des colonnes. Elle se lit de gauche à droite et chaque chiffre est la position pour chacune des colonnes.
Les solutions seront affichées dans l'ordre croissant. Les solutions seront affichées dans l'ordre croissant.
## Fonction attendue ### Fonction attendue
```go ```go
package main package main

8
subjects/fibonacci.en.md

@ -1,6 +1,6 @@
# fibonacci ## fibonacci
## Intructions ### Intructions
Write an **recursive** function that returns the value of fibonacci sequence matching the index passed as parameter. Write an **recursive** function that returns the value of fibonacci sequence matching the index passed as parameter.
@ -12,7 +12,7 @@ A negative index will return `-1`.
`for` is **forbidden** for this exercise. `for` is **forbidden** for this exercise.
## Expected function ### Expected function
```go ```go
package main package main
@ -22,7 +22,7 @@ func Fibonacci(int index) int {
} }
``` ```
## Usage ### Usage
Here is a possible [program](TODO-LINK) to test your function : Here is a possible [program](TODO-LINK) to test your function :

8
subjects/fibonacci.fr.md

@ -1,6 +1,6 @@
# fibonacci ## fibonacci
## Intructions ### Intructions
Écrire une fonction **récursive** qui renvoie la valeur de la suite de fibonacci correspondant à l'index passé en paramètre. Écrire une fonction **récursive** qui renvoie la valeur de la suite de fibonacci correspondant à l'index passé en paramètre.
@ -12,7 +12,7 @@ Un index négatif renvoie `-1`.
`for` est **interdit** pour cet exercice. `for` est **interdit** pour cet exercice.
## Fonction attendue ### Fonction attendue
```go ```go
package main package main
@ -22,7 +22,7 @@ func Fibonacci(int index) int {
} }
``` ```
## Utilisation ### Utilisation
Voici un éventuel `main.go` : Voici un éventuel `main.go` :

8
subjects/findnextprime.en.md

@ -1,10 +1,10 @@
# findnextprime ## findnextprime
## Intructions ### Intructions
Write a function that returns the first prime number that is equal or superior to the `int` passed as parameter. Write a function that returns the first prime number that is equal or superior to the `int` passed as parameter.
## Expected function ### Expected function
```go ```go
func FindNextPrime(int nb) int { func FindNextPrime(int nb) int {
@ -12,7 +12,7 @@ func FindNextPrime(int nb) int {
} }
``` ```
## Usage ### Usage
Here is a possible [program](TODO-LINK) to test your function : Here is a possible [program](TODO-LINK) to test your function :

8
subjects/findnextprime.fr.md

@ -1,10 +1,10 @@
# findnextprime ## findnextprime
## Intructions ### Intructions
Écrire une fonction qui renvoie le premier nombre premier qui est égal ou supérieur à l'`int` passé en paramètre. Écrire une fonction qui renvoie le premier nombre premier qui est égal ou supérieur à l'`int` passé en paramètre.
## Fonction attendue ### Fonction attendue
```go ```go
func FindNextPrime(int nb) int { func FindNextPrime(int nb) int {
@ -12,7 +12,7 @@ func FindNextPrime(int nb) int {
} }
``` ```
## Utilisation ### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction : Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :

2
subjects/firebase-demo.en.md

@ -1 +1 @@
# firebase-demo ## firebase-demo

8
subjects/firstrune.en.md

@ -1,10 +1,10 @@
# firstrune ## firstrune
## Instructions ### Instructions
Write a function that returns the first `rune` of a `string`. Write a function that returns the first `rune` of a `string`.
## Expected function ### Expected function
```go ```go
func FirstRune(s string) rune { func FirstRune(s string) rune {
@ -12,7 +12,7 @@ func FirstRune(s string) rune {
} }
``` ```
## Usage ### Usage
Here is a possible [program](TODO-LINK) to test your function : Here is a possible [program](TODO-LINK) to test your function :

8
subjects/firstrune.fr.md

@ -1,10 +1,10 @@
# firstrune ## firstrune
## Instructions ### Instructions
Écrire une fonction qui retourne la première `rune` d'une `string`. Écrire une fonction qui retourne la première `rune` d'une `string`.
## Fonction attendue ### Fonction attendue
```go ```go
func FirstRune(s string) rune { func FirstRune(s string) rune {
@ -12,7 +12,7 @@ func FirstRune(s string) rune {
} }
``` ```
## Utilisation ### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction : Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :

8
subjects/foreach.en.md

@ -1,17 +1,17 @@
# foreach ## foreach
## Instructions ### Instructions
Write a function `ForEach` that, for an `int` array, applies a function on each elements of that array. Write a function `ForEach` that, for an `int` array, applies a function on each elements of that array.
## Expected function ### Expected function
```go ```go
func ForEach(f func(int), arr []int) { func ForEach(f func(int), arr []int) {
} }
``` ```
## Usage ### Usage
Here is a possible [program](TODO-LINK) to test your function : Here is a possible [program](TODO-LINK) to test your function :

8
subjects/foreach.fr.md

@ -1,17 +1,17 @@
# foreach ## foreach
## Instructions ### Instructions
Écrire une fonction `ForEach` qui, pour un tableau d'`int`, applique une fonction sur chaque éléments de ce tableau. Écrire une fonction `ForEach` qui, pour un tableau d'`int`, applique une fonction sur chaque éléments de ce tableau.
## Fonction attendue ### Fonction attendue
```go ```go
func ForEach(f func(int), arr []int) { func ForEach(f func(int), arr []int) {
} }
``` ```
## Utilisation ### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction : Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :

2
subjects/functions.en.md

@ -1,3 +1,3 @@
# functions ## functions
This repository aggregate every functions of the Zone 01 organization This repository aggregate every functions of the Zone 01 organization

4
subjects/get-ready.en.md

@ -1,6 +1,6 @@
# get-ready ## get-ready
## Instructions ### Instructions
Subscribe to [Discord](Discord-invite-link) and send a private message to the bot (TODO: find a name for the bot). Subscribe to [Discord](Discord-invite-link) and send a private message to the bot (TODO: find a name for the bot).

6
subjects/go-say-hello.en.md

@ -1,10 +1,10 @@
# go-say-hello ## go-say-hello
## Instructions ### Instructions
Write a [program](TODO-LINK) that says `hello` to your GitHub username. Write a [program](TODO-LINK) that says `hello` to your GitHub username.
## Usage ### Usage
Where `{username}` is your GitHub username: Where `{username}` is your GitHub username:

6
subjects/go-say-hello.fr.md

@ -1,10 +1,10 @@
# gosayhello ## gosayhello
## Instructions ### Instructions
Écrire un [programme](TODO-LINK) qui vous dis `hello` à votre GitHub username. Écrire un [programme](TODO-LINK) qui vous dis `hello` à votre GitHub username.
## Utilisation ### Utilisation
Ici `{username}` est votre GitHub username: Ici `{username}` est votre GitHub username:

8
subjects/index.en.md

@ -1,10 +1,10 @@
# index ## index
## Instructions ### Instructions
Write a function that behaves like the [`Index`](https://golang.org/pkg/strings/#Index) function. Write a function that behaves like the [`Index`](https://golang.org/pkg/strings/#Index) function.
## Expected function ### Expected function
```go ```go
func Index(s string, toFind string) int { func Index(s string, toFind string) int {
@ -12,7 +12,7 @@ func Index(s string, toFind string) int {
} }
``` ```
## Usage ### Usage
Here is a possible [program](TODO-LINK) to test your function : Here is a possible [program](TODO-LINK) to test your function :

8
subjects/index.fr.md

@ -1,10 +1,10 @@
# index ## index
## Instructions ### Instructions
Écrire une fonction qui se comporte comme la fonction [`Index`](https://golang.org/pkg/strings/#Index). Écrire une fonction qui se comporte comme la fonction [`Index`](https://golang.org/pkg/strings/#Index).
## Fonction attendue ### Fonction attendue
```go ```go
func Index(s string, toFind string) int { func Index(s string, toFind string) int {
@ -12,7 +12,7 @@ func Index(s string, toFind string) int {
} }
``` ```
## Utilisation ### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction : Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :

8
subjects/isalpha.en.md

@ -1,10 +1,10 @@
# isalpha ## isalpha
## Instructions ### Instructions
Write a function that returns `true` if the `string` passed in parameter only contains alphanumerical characters, and that returns `false` otherwise. Write a function that returns `true` if the `string` passed in parameter only contains alphanumerical characters, and that returns `false` otherwise.
## Expected function ### Expected function
```go ```go
func IsAlpha(str string) bool { func IsAlpha(str string) bool {
@ -12,7 +12,7 @@ func IsAlpha(str string) bool {
} }
``` ```
## Usage ### Usage
Here is a possible [program](TODO-LINK) to test your function : Here is a possible [program](TODO-LINK) to test your function :

8
subjects/isalpha.fr.md

@ -1,10 +1,10 @@
# isalpha ## isalpha
## Instructions ### Instructions
Écrire une fonction qui retourne `true` si la `string` passée en paramètre contient seulement des caractères alphanumériques, et qui retourne `false` autrement. Écrire une fonction qui retourne `true` si la `string` passée en paramètre contient seulement des caractères alphanumériques, et qui retourne `false` autrement.
## Fonction attendue ### Fonction attendue
```go ```go
func IsAlpha(str string) bool { func IsAlpha(str string) bool {
@ -12,7 +12,7 @@ func IsAlpha(str string) bool {
} }
``` ```
## Utilisation ### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction : Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :

8
subjects/islower.en.md

@ -1,10 +1,10 @@
# islower ## islower
## Instructions ### Instructions
Write a function that returns `true` if the `string` passed in parameter only contains lowercase characters, and that returns `false` otherwise. Write a function that returns `true` if the `string` passed in parameter only contains lowercase characters, and that returns `false` otherwise.
## Expected function ### Expected function
```go ```go
func IsLower(str string) bool { func IsLower(str string) bool {
@ -12,7 +12,7 @@ func IsLower(str string) bool {
} }
``` ```
## Usage ### Usage
Here is a possible [program](TODO-LINK) to test your function : Here is a possible [program](TODO-LINK) to test your function :

8
subjects/islower.fr.md

@ -1,10 +1,10 @@
# islower ## islower
## Instructions ### Instructions
Écrire une fonction qui retourne `true` si la `string` passée en paramètre contient seulement des caractères minuscules, et qui retourne `false` autrement. Écrire une fonction qui retourne `true` si la `string` passée en paramètre contient seulement des caractères minuscules, et qui retourne `false` autrement.
## Fonction attendue ### Fonction attendue
```go ```go
func IsLower(str string) bool { func IsLower(str string) bool {
@ -12,7 +12,7 @@ func IsLower(str string) bool {
} }
``` ```
## Utilisation ### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction : Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :

8
subjects/isnegative.en.md

@ -1,10 +1,10 @@
# isnegative ## isnegative
## Instructions ### Instructions
Write a [function](TODO-LINK) that prints `'T'` (true) on a single line if the `int` passed as parameter is negative, otherwise it prints `'F'` (false). Write a [function](TODO-LINK) that prints `'T'` (true) on a single line if the `int` passed as parameter is negative, otherwise it prints `'F'` (false).
## Expected function ### Expected function
```go ```go
func IsNegative(nb int) { func IsNegative(nb int) {
@ -12,7 +12,7 @@ func IsNegative(nb int) {
} }
``` ```
## Usage ### Usage
Here is a possible [program](TODO-LINK) to test your function : Here is a possible [program](TODO-LINK) to test your function :

8
subjects/isnegative.fr.md

@ -1,10 +1,10 @@
# isnegative ## isnegative
## Instructions ### Instructions
Écrire une [fonction](TODO-LINK) qui affiche `'T'` (true) sur une seule ligne si l'`int` passé en paramètre est négatif, sinon elle affiche `'F'` (false). Écrire une [fonction](TODO-LINK) qui affiche `'T'` (true) sur une seule ligne si l'`int` passé en paramètre est négatif, sinon elle affiche `'F'` (false).
## Fonction attendue ### Fonction attendue
```go ```go
func IsNegative(nb int) { func IsNegative(nb int) {
@ -12,7 +12,7 @@ func IsNegative(nb int) {
} }
``` ```
## Utilisation ### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction : Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :

8
subjects/isnumeric.en.md

@ -1,10 +1,10 @@
# isnumeric ## isnumeric
## Instructions ### Instructions
Write a function that returns `true` if the `string` passed in parameter only contains numerical characters, and that returns `false` otherwise. Write a function that returns `true` if the `string` passed in parameter only contains numerical characters, and that returns `false` otherwise.
## Expected function ### Expected function
```go ```go
func IsNumeric(str string) bool { func IsNumeric(str string) bool {
@ -12,7 +12,7 @@ func IsNumeric(str string) bool {
} }
``` ```
## Usage ### Usage
Here is a possible [program](TODO-LINK) to test your function : Here is a possible [program](TODO-LINK) to test your function :

8
subjects/isnumeric.fr.md

@ -1,10 +1,10 @@
# isnumeric ## isnumeric
## Instructions ### Instructions
Écrire une fonction qui retourne `true` si la `string` passée en paramètre contient seulement des caractères numériques, et qui retourne `false` autrement. Écrire une fonction qui retourne `true` si la `string` passée en paramètre contient seulement des caractères numériques, et qui retourne `false` autrement.
## Fonction attendue ### Fonction attendue
```go ```go
func IsNumeric(str string) bool { func IsNumeric(str string) bool {
@ -12,7 +12,7 @@ func IsNumeric(str string) bool {
} }
``` ```
## Utilisation ### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction : Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :

8
subjects/isprime.en.md

@ -1,10 +1,10 @@
# isprime ## isprime
## Intructions ### Intructions
Write a function that returns `true` if the `int` passed as parameter is a prime number. Otherwise it returns `false`. Write a function that returns `true` if the `int` passed as parameter is a prime number. Otherwise it returns `false`.
## Expected function ### Expected function
```go ```go
func IsPrime(int nb) bool { func IsPrime(int nb) bool {
@ -12,7 +12,7 @@ func IsPrime(int nb) bool {
} }
``` ```
## Usage ### Usage
Here is a possible [program](TODO-LINK) to test your function : Here is a possible [program](TODO-LINK) to test your function :

8
subjects/isprime.fr.md

@ -1,10 +1,10 @@
# isprime ## isprime
## Intructions ### Intructions
Écrire une fonction qui renvoie `true` si l'`int` passé en paramètre est un nombre premier. Autrement elle renvoie `false`. Écrire une fonction qui renvoie `true` si l'`int` passé en paramètre est un nombre premier. Autrement elle renvoie `false`.
## Fonction attendue ### Fonction attendue
```go ```go
func IsPrime(int nb) bool { func IsPrime(int nb) bool {
@ -12,7 +12,7 @@ func IsPrime(int nb) bool {
} }
``` ```
## Utilisation ### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction : Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :

8
subjects/isprintable.en.md

@ -1,10 +1,10 @@
# isprintable ## isprintable
## Instructions ### Instructions
Write a function that returns `true` if the `string` passed in parameter only contains printable characters, and that returns `false` otherwise. Write a function that returns `true` if the `string` passed in parameter only contains printable characters, and that returns `false` otherwise.
## Expected function ### Expected function
```go ```go
package main package main
@ -13,7 +13,7 @@ func IsPrintable(str string) bool {
} }
``` ```
## Usage ### Usage
Here is a possible [program](TODO-LINK) to test your function : Here is a possible [program](TODO-LINK) to test your function :

8
subjects/isprintable.fr.md

@ -1,10 +1,10 @@
# isprintable ## isprintable
## Instructions ### Instructions
Écrire une fonction qui retourne `true` si la `string` passée en paramètre contient seulement des caractères majuscules, et qui retourne `false` autrement. Écrire une fonction qui retourne `true` si la `string` passée en paramètre contient seulement des caractères majuscules, et qui retourne `false` autrement.
## Fonction attendue ### Fonction attendue
```go ```go
package main package main
@ -13,7 +13,7 @@ func IsPrintable(str string) bool {
} }
``` ```
## Utilisation ### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction : Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :

8
subjects/issorted.en.md

@ -1,6 +1,6 @@
# issorted ## issorted
## Instructions ### Instructions
Write a function `IsSorted` that returns `true` if the slice of `int` is sorted, and that returns `false` otherwise. Write a function `IsSorted` that returns `true` if the slice of `int` is sorted, and that returns `false` otherwise.
@ -9,14 +9,14 @@ it returns `0` if they are equal and it returns a negative `int` otherwise.
To do your testing you have to write your own `f` function. To do your testing you have to write your own `f` function.
## Expected function ### Expected function
```go ```go
func IsSorted(f func(a, b int) int, tab []int) int { func IsSorted(f func(a, b int) int, tab []int) int {
} }
``` ```
## Usage ### Usage
Here is a possible [program](TODO-LINK) to test your function (without `f`): Here is a possible [program](TODO-LINK) to test your function (without `f`):

8
subjects/issorted.fr.md

@ -1,6 +1,6 @@
# issorted ## issorted
## Instructions ### Instructions
Écrire une fonction `IsSorted` qui retourne `true` si la slice d'`int` est triée, et qui retourne `false` autrement. Écrire une fonction `IsSorted` qui retourne `true` si la slice d'`int` est triée, et qui retourne `false` autrement.
@ -8,14 +8,14 @@ La fonction passée en paramètre retourne un `int` positive si `a` (le premier
Pour faire vos tests, vous devez coder votre propre fonction `f`. Pour faire vos tests, vous devez coder votre propre fonction `f`.
## Fonction attendue ### Fonction attendue
```go ```go
func IsSorted(f func(a, b int) int, tab []int) int { func IsSorted(f func(a, b int) int, tab []int) int {
} }
``` ```
## Utilisation ### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction (sans `f`) : Voici un éventuel [programme](TODO-LINK) pour tester votre fonction (sans `f`) :

8
subjects/isupper.en.md

@ -1,10 +1,10 @@
# isupper ## isupper
## Instructions ### Instructions
Write a function that returns `true` if the `string` passed in parameter only contains uppercase characters, and that returns `false` otherwise. Write a function that returns `true` if the `string` passed in parameter only contains uppercase characters, and that returns `false` otherwise.
## Expected function ### Expected function
```go ```go
func IsUpper(str string) bool { func IsUpper(str string) bool {
@ -12,7 +12,7 @@ func IsUpper(str string) bool {
} }
``` ```
## Usage ### Usage
Here is a possible [program](TODO-LINK) to test your function : Here is a possible [program](TODO-LINK) to test your function :

8
subjects/isupper.fr.md

@ -1,10 +1,10 @@
# isupper ## isupper
## Instructions ### Instructions
Écrire une fonction qui retourne `true` si la `string` passée en paramètre contient seulement des caractères majuscules, et qui retourne `false` autrement. Écrire une fonction qui retourne `true` si la `string` passée en paramètre contient seulement des caractères majuscules, et qui retourne `false` autrement.
## Fonction attendue ### Fonction attendue
```go ```go
func IsUpper(str string) bool { func IsUpper(str string) bool {
@ -12,7 +12,7 @@ func IsUpper(str string) bool {
} }
``` ```
## Utilisation ### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction : Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :

8
subjects/iterativefactorial.en.md

@ -1,12 +1,12 @@
# iterativefactorial ## iterativefactorial
## Intructions ### Intructions
Write an **iterative** function that returns the factorial of the `int` passed as parameter. Write an **iterative** function that returns the factorial of the `int` passed as parameter.
Errors (non possible values or overflows) will return `0`. Errors (non possible values or overflows) will return `0`.
## Expected function ### Expected function
```go ```go
func IterativeFactorial(int nb) int { func IterativeFactorial(int nb) int {
@ -14,7 +14,7 @@ func IterativeFactorial(int nb) int {
} }
``` ```
## Usage ### Usage
Here is a possible [program](TODO-LINK) to test your function : Here is a possible [program](TODO-LINK) to test your function :

8
subjects/iterativefactorial.fr.md

@ -1,12 +1,12 @@
# iterativefactorial ## iterativefactorial
## Intructions ### Intructions
Écrire une fonction **itérative** qui renvoie la factorielle d'un `int` passé en paramètre. Écrire une fonction **itérative** qui renvoie la factorielle d'un `int` passé en paramètre.
Les erreurs (valeurs non possibles ou overflows) renverront `0`. Les erreurs (valeurs non possibles ou overflows) renverront `0`.
## Fonction attendue ### Fonction attendue
```go ```go
func IterativeFactorial(int nb) int { func IterativeFactorial(int nb) int {
@ -14,7 +14,7 @@ func IterativeFactorial(int nb) int {
} }
``` ```
## Utilisation ### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction : Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :

8
subjects/iterativepower.en.md

@ -1,12 +1,12 @@
# iterativepower ## iterativepower
## Intructions ### Intructions
Write an **iterative** function that returns the power of the `int` passed as parameter. Write an **iterative** function that returns the power of the `int` passed as parameter.
Negative powers will return `0`. Overflows do **not** have to be dealt with. Negative powers will return `0`. Overflows do **not** have to be dealt with.
## Expected function ### Expected function
```go ```go
func IterativePower(int nb, int power) int { func IterativePower(int nb, int power) int {
@ -14,7 +14,7 @@ func IterativePower(int nb, int power) int {
} }
``` ```
## Usage ### Usage
Here is a possible [program](TODO-LINK) to test your function : Here is a possible [program](TODO-LINK) to test your function :

8
subjects/iterativepower.fr.md

@ -1,12 +1,12 @@
# iterativepower ## iterativepower
## Intructions ### Intructions
Écrire une fonction **itérative** qui renvoie la puissance de deux `int` passés en paramètre. Écrire une fonction **itérative** qui renvoie la puissance de deux `int` passés en paramètre.
Les puissances négatives renverront `0`. Les overflows **ne doivent pas** être gérés. Les puissances négatives renverront `0`. Les overflows **ne doivent pas** être gérés.
## Fonction attendue ### Fonction attendue
```go ```go
func IterativePower(int nb, int power) int { func IterativePower(int nb, int power) int {
@ -14,7 +14,7 @@ func IterativePower(int nb, int power) int {
} }
``` ```
## Utilisation ### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction : Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :

8
subjects/join.en.md

@ -1,10 +1,10 @@
# join ## join
## Instructions ### Instructions
Write a function that returns the concatenation of all the `string` of a table of `string` **separated** by the separator passed in argument. Write a function that returns the concatenation of all the `string` of a table of `string` **separated** by the separator passed in argument.
## Expected function ### Expected function
```go ```go
func Join(strs []string, sep string) string { func Join(strs []string, sep string) string {
@ -12,7 +12,7 @@ func Join(strs []string, sep string) string {
} }
``` ```
## Usage ### Usage
Here is a possible [program](TODO-LINK) to test your function : Here is a possible [program](TODO-LINK) to test your function :

8
subjects/join.fr.md

@ -1,10 +1,10 @@
# join ## join
## Instructions ### Instructions
Écrire une fonction qui retourne la concaténation de deux `string` **séparées** par le séparateur passées en paramètres. Écrire une fonction qui retourne la concaténation de deux `string` **séparées** par le séparateur passées en paramètres.
## Fonction attendue ### Fonction attendue
```go ```go
func Join(strs []string, sep string) string{ func Join(strs []string, sep string) string{
@ -12,7 +12,7 @@ func Join(strs []string, sep string) string{
} }
``` ```
## Utilisation ### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction : Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :

8
subjects/lastrune.en.md

@ -1,10 +1,10 @@
# lastrune ## lastrune
## Instructions ### Instructions
Write a function that returns the last `rune` of a `string`. Write a function that returns the last `rune` of a `string`.
## Expected function ### Expected function
```go ```go
func LastRune(s string) rune { func LastRune(s string) rune {
@ -12,7 +12,7 @@ func LastRune(s string) rune {
} }
``` ```
## Usage ### Usage
Here is a possible [program](TODO-LINK) to test your function : Here is a possible [program](TODO-LINK) to test your function :

8
subjects/lastrune.fr.md

@ -1,10 +1,10 @@
# lastrune ## lastrune
## Instructions ### Instructions
Écrire une fonction qui retourne la dernière `rune` d'une `string`. Écrire une fonction qui retourne la dernière `rune` d'une `string`.
## Fonction attendue ### Fonction attendue
```go ```go
func LastRune(s string) rune { func LastRune(s string) rune {
@ -12,7 +12,7 @@ func LastRune(s string) rune {
} }
``` ```
## Utilisation ### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction : Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :

8
subjects/listat.en.md

@ -1,12 +1,12 @@
# listpushback ## listpushback
## Instructions ### Instructions
Write a function `ListAt` that haves one pointer to the list, `l`, and an `int` as parameters. This function should print a `Node` of the linked list, depending on the number, `nbr`. Write a function `ListAt` that haves one pointer to the list, `l`, and an `int` as parameters. This function should print a `Node` of the linked list, depending on the number, `nbr`.
- In case of error it should print `nil` - In case of error it should print `nil`
## Expected function and structure ### Expected function and structure
```go ```go
type Node struct { type Node struct {
@ -20,7 +20,7 @@ func ListAt(l *Node, nbr int) *Node{
} }
``` ```
## Usage ### Usage
Here is a possible [program](TODO-LINK) to test your function : Here is a possible [program](TODO-LINK) to test your function :

8
subjects/listat.fr.md

@ -1,17 +1,17 @@
# countif ## countif
## Instructions ### Instructions
Écrire une fonction `CountIf` qui retournes le nombre d'éléments d'un tableau de `string` pour lesquels la fonction `f` retourne `true`. Écrire une fonction `CountIf` qui retournes le nombre d'éléments d'un tableau de `string` pour lesquels la fonction `f` retourne `true`.
## Fonction attendue ### Fonction attendue
```go ```go
func CountIf(f func(string) bool, tab []string) int { func CountIf(f func(string) bool, tab []string) int {
} }
``` ```
## Utilisation ### Utilisation
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction : Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :

Some files were not shown because too many files changed in this diff diff.show_more

Loading…
Cancel
Save