Browse Source

more corrections

content-update
lee 4 years ago committed by Xavier Petit
parent
commit
68d89f10da
  1. 1
      subjects/anagram.en.md
  2. 2
      subjects/atoiprog.en.md
  3. 4
      subjects/btreeinsertdata.en.md
  4. 4
      subjects/btreeinsertdata.fr.md
  5. 4
      subjects/btreeprintroot.fr.md
  6. 2
      subjects/collatzcountdown.fr.md
  7. 2
      subjects/divmod.en.md
  8. 2
      subjects/divmod.fr.md
  9. 4
      subjects/good-practices.en.md
  10. 4
      subjects/introduction.en.md
  11. 4
      subjects/lcm.en.md
  12. 2
      subjects/listpushparams.en.md
  13. 2
      subjects/listsizeprog.en.md
  14. 12
      subjects/nauuo.en.md
  15. 6
      subjects/point.en.md
  16. 7
      subjects/point.fr.md
  17. 12
      subjects/pointone.en.md
  18. 12
      subjects/pointone.fr.md
  19. 2
      subjects/printbits.en.md
  20. 2
      subjects/printbits.fr.md
  21. 2
      subjects/printdigitsprog.en.md
  22. 4
      subjects/printhex.en.md
  23. 2
      subjects/printstrprog.fr.md
  24. 30
      subjects/reverse.en.md
  25. 6
      subjects/reverserange.en.md
  26. 6
      subjects/reverserange.fr.md
  27. 6
      subjects/revwstr.en.md
  28. 8
      subjects/revwstr.fr.md
  29. 2
      subjects/rot14.fr.md
  30. 6
      subjects/sametree.en.md
  31. 2
      subjects/sortintegertable.en.md
  32. 3
      subjects/sortll.en.md
  33. 2
      subjects/splitprog.fr.md
  34. 2
      subjects/swap.fr.md
  35. 4
      subjects/ultimatedivmod.fr.md
  36. 6
      subjects/ultimatepointone.fr.md
  37. 8
      subjects/ztail.fr.md

1
subjects/anagram.en.md

@ -34,6 +34,7 @@ Here is a possible program to test your function:
```go
package main
import (
piscine ".."
"fmt"

2
subjects/atoiprog.en.md

@ -13,7 +13,7 @@ This means that:
### 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 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`.
- `Atoi` returns `0` if the `string` is not considered as a valid number. For this exercise **non-valid `string` chains will be tested**. Some will contain non-digits characters.

4
subjects/btreeinsertdata.en.md

@ -10,8 +10,8 @@ The nodes must be defined as follows :
```go
type TreeNode struct {
Left, Right, Parent *TreeNode
Data string
Left, Right, Parent *TreeNode
Data string
}
func BTreeInsertData(root *TreeNode, data string) *TreeNode {

4
subjects/btreeinsertdata.fr.md

@ -10,8 +10,8 @@ Les nodes doivent être définies comme ci-dessous :
```go
type TreeNode struct {
Left, Right, Parent *TreeNode
Data string
Left, Right, Parent *TreeNode
Data string
}
func BTreeInsertData(root *TreeNode, data string) *TreeNode {

4
subjects/btreeprintroot.fr.md

@ -9,8 +9,8 @@ Les nodes doivent être définies comme ci-dessous:
```go
type TreeNode struct {
left, right *TreeNode
data string
left, right *TreeNode
data string
}
func PrintRoot(root *TreeNode){

2
subjects/collatzcountdown.fr.md

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

2
subjects/divmod.en.md

@ -2,7 +2,7 @@
### Instructions
- Write a function that will be formatted as below.
- Write a function that will be formatted as below.
### Expected function

2
subjects/divmod.fr.md

@ -2,7 +2,7 @@
### Instructions
- Écrire une fonction qui aura le format ci-dessous.
- Écrire une fonction qui aura le format ci-dessous.
### Fonction attendue

4
subjects/good-practices.en.md

@ -7,8 +7,8 @@
- Avoid Obvious Comments
- Code Grouping
- Consistent Naming Scheme
- camelCase
- under_scores
- camelCase
- under_scores
- [**DRY**](https://thefullstack.xyz/dry-yagni-kiss-tdd-soc-bdfu) (Don't Repeat Yourself) or [**DIE**](https://thefullstack.xyz/dry-yagni-kiss-tdd-soc-bdfu) (Duplication is Evil) principle
- [**KISS**](https://thefullstack.xyz/dry-yagni-kiss-tdd-soc-bdfu) (Keep It Simple Stupid)
- [**YAGNI**](https://thefullstack.xyz/dry-yagni-kiss-tdd-soc-bdfu) (You Aren’t Gonna Need It)

4
subjects/introduction.en.md

@ -29,11 +29,11 @@ ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519 -N ''
cat ~/.ssh/id_ed25519.pub
```
- Copy the result and paste it in the content field of adding an ssh key in your settings (adapt the link with your username).
- Copy the result and paste it in the content field of adding an ssh key in your settings (adapt the link with your username).
[https://git.[[DOMAIN]]/choumi/settings/keys](https://git.[[DOMAIN]]/choumi/settings/keys)
- Confirm by clicking on the add key button.
- Confirm by clicking on the add key button.
Once this is done the git clone command should work now.

4
subjects/lcm.en.md

@ -33,8 +33,8 @@ Here is a possible program to test your function :
package main
func main() {
fmt.Println(Lcm(2, 7))
fmt.Println(Lcm(0, 4))
fmt.Println(Lcm(2, 7))
fmt.Println(Lcm(0, 4))
}
```

2
subjects/listpushparams.en.md

@ -6,8 +6,6 @@ Write a program that creates a new linked list and includes each command-line ar
- The first argument should be at the end of the list
````
And its output :
```console

2
subjects/listsizeprog.en.md

@ -31,4 +31,4 @@ type List struct {
func ListSize(l *List) int {
}
```
```

12
subjects/nauuo.en.md

@ -37,15 +37,15 @@ Here is a possible program to test your function :
package main
import (
"fmt"
piscine ".."
"fmt"
piscine ".."
)
func main() {
fmt.Println(piscine.Nauuo(50, 43, 20))
fmt.Println(piscine.Nauuo(13, 13, 0))
fmt.Println(piscine.Nauuo(10, 9, 0))
fmt.Println(piscine.Nauuo(5, 9, 2))
fmt.Println(piscine.Nauuo(50, 43, 20))
fmt.Println(piscine.Nauuo(13, 13, 0))
fmt.Println(piscine.Nauuo(10, 9, 0))
fmt.Println(piscine.Nauuo(5, 9, 2))
}
```

6
subjects/point.en.md

@ -4,11 +4,11 @@
Create a `.go` file.
- The code below has to be copied in that file.
- The code below has to be copied in that file.
- The necessary changes have to be applied so that the program works.
- The necessary changes have to be applied so that the program works.
- The program must be submitted inside a folder with the name `point`.
- The program must be submitted inside a folder with the name `point`.
### Code to be copied

7
subjects/point.fr.md

@ -4,12 +4,11 @@
Créer un fichier `.go`.
- Le code ci-dessous doit être copié dans ce fichier.
- Le code ci-dessous doit être copié dans ce fichier.
- Les changements nécéssaires doivent être appliquer et the code below into that file
and do the necessary changes so that the program works.
- Les changements nécéssaires doivent être appliquer et the code below into that file and do the necessary changes so that the program works.
- Le programme doit être rendu dans un dossier nommé `boolean`.
- Le programme doit être rendu dans un dossier nommé `boolean`.
### Code à copier

12
subjects/pointone.en.md

@ -2,7 +2,7 @@
### Instructions
- Write a function that takes a **pointer to an int** as argument and gives to this int the value of 1.
- Write a function that takes a **pointer to an int** as argument and gives to this int the value of 1.
### Expected function
@ -20,14 +20,14 @@ Here is a possible program to test your function :
package main
import (
"fmt"
piscine ".."
"fmt"
piscine ".."
)
func main() {
n := 0
piscine.PointOne(&n)
fmt.Println(n)
n := 0
piscine.PointOne(&n)
fmt.Println(n)
}
```

12
subjects/pointone.fr.md

@ -2,7 +2,7 @@
### Instructions
- Écrire une fonction qui prend un **pointeur sur int** en argument et qui assignes à cet int la valeur 1.
- Écrire une fonction qui prend un **pointeur sur int** en argument et qui assignes à cet int la valeur 1.
### Fonction attendue
@ -20,14 +20,14 @@ Voici un éventuel programme pour tester votre fonction :
package main
import (
"fmt"
piscine ".."
"fmt"
piscine ".."
)
func main() {
n := 0
piscine.PointOne(&n)
fmt.Println(n)
n := 0
piscine.PointOne(&n)
fmt.Println(n)
}
```

2
subjects/printbits.en.md

@ -4,7 +4,7 @@
Write a program that takes a number as argument, and prints it in binary value **without a newline at the end**.
- If the the argument is not a number the program should print `00000000`.
- If the the argument is not a number the program should print `00000000`.
### Expected output :

2
subjects/printbits.fr.md

@ -4,7 +4,7 @@
Écrire un programme qui prend un nombre en argument, et qui l'affiche en valeur binaire **sans newline à la fin**.
- Si l'argument n'est pas un nombre le programme doit afficher `00000000`.
- Si l'argument n'est pas un nombre le programme doit afficher `00000000`.
### Expected output :

2
subjects/printdigitsprog.en.md

@ -13,4 +13,4 @@ student@ubuntu:~/printdigitsprog$ go build
student@ubuntu:~/printdigitsprog$ ./main
0123456789
student@ubuntu:~/printdigitsprog$
```
```

4
subjects/printhex.en.md

@ -5,7 +5,7 @@
Write a program that takes a positive (or zero) number expressed in base 10, and displays it in base 16 (with lowercase letters) followed by a newline (`'\n'`).
- If the number of parameters is different from 1, the program displays a newline.
- Error cases have to be handled as shown in the example below.
- Error cases have to be handled as shown in the example below.
### Usage
@ -21,5 +21,5 @@ student@ubuntu:~/[[ROOT]]/test$ ./test
student@ubuntu:~/[[ROOT]]/test$ ./test "123 132 1" | cat -e
0$
student@ubuntu:~/[[ROOT]]/test$
student@ubuntu:~/[[ROOT]]/test$
```

2
subjects/printstrprog.fr.md

@ -2,7 +2,7 @@
### Instructions
- Écrire un programme qui affiche un à un les caractères d'une `string` passée en argument du programme.
- Écrire un programme qui affiche un à un les caractères d'une `string` passée en argument du programme.
### Utilisation :

30
subjects/reverse.en.md

@ -39,7 +39,7 @@ Here is a possible program to test your function :
package main
import (
"fmt"
"fmt"
)
func pushBack(n *NodeAddL, num int) *NodeAddL{
@ -47,20 +47,20 @@ func pushBack(n *NodeAddL, num int) *NodeAddL{
}
func main() {
num1 := &piscine.NodeAddL{Num: 1}
num1 = pushBack(num1, 3)
num1 = pushBack(num1, 2)
num1 = pushBack(num1, 4)
num1 = pushBack(num1, 5)
result := piscine.Reverse(num1)
for tmp := result; tmp != nil; tmp = tmp.Next {
fmt.Print(tmp.Num)
if tmp.Next != nil {
fmt.Print(" -> ")
}
}
fmt.Println()
num1 := &piscine.NodeAddL{Num: 1}
num1 = pushBack(num1, 3)
num1 = pushBack(num1, 2)
num1 = pushBack(num1, 4)
num1 = pushBack(num1, 5)
result := piscine.Reverse(num1)
for tmp := result; tmp != nil; tmp = tmp.Next {
fmt.Print(tmp.Num)
if tmp.Next != nil {
fmt.Print(" -> ")
}
}
fmt.Println()
}
```

6
subjects/reverserange.en.md

@ -4,11 +4,11 @@
Write a program which must:
- **Allocate (with `make`)** an array of integers.
- **Allocate (with `make`)** an array of integers.
- Fill it with consecutive values that begins at the second argument and end at the first argument (Including the values of thoses arguments !).
- Fill it with consecutive values that begins at the second argument and end at the first argument (Including the values of thoses arguments !).
- That prints the array.
- That prints the array.
Errors should be handled.

6
subjects/reverserange.fr.md

@ -4,11 +4,11 @@
Écrire un programme qui doit:
- Allouer (avec `make`) une slice d'entiers.
- Allouer (avec `make`) une slice d'entiers.
- Le remplir avec des valeurs consécutives qui commencent au deuxième argument et qui finissent au premier (en incluant les valeurs des deux arguments !)
- Le remplir avec des valeurs consécutives qui commencent au deuxième argument et qui finissent au premier (en incluant les valeurs des deux arguments !)
- Et qui affiche cette slice.
- Et qui affiche cette slice.
Les erreurs doivent être gérées.

6
subjects/revwstr.en.md

@ -4,11 +4,11 @@
Write a program that takes a `string` as a parameter, and prints its words in reverse.
- A word is a sequence of **alphanumerical** characters.
- A word is a sequence of **alphanumerical** characters.
- If the number of parameters is different from 1, the program will display newline (`'\n'`).
- If the number of parameters is different from 1, the program will display newline (`'\n'`).
- In the parameters that are going to be tested, there will not be any extra spaces. (meaning that there will not be additionnal spaces at the beginning or at the end of the `string`and that words will always be separated by exactly one space).
- In the parameters that are going to be tested, there will not be any extra spaces. (meaning that there will not be additionnal spaces at the beginning or at the end of the `string`and that words will always be separated by exactly one space).
### Usage

8
subjects/revwstr.fr.md

@ -4,11 +4,11 @@
Écrire un programme qui prend une `string` comme paramètre, et affiche ses mots en sens inverse.
- Un mot est une suite de caractères **alphanumériques.**
- Un mot est une suite de caractères **alphanumériques.**
- Si le nombre de paramètres est différent de 1, le programme affiche un retour à la ligne (`'\n'`).
- Si le nombre de paramètres est différent de 1, le programme affiche un retour à la ligne (`'\n'`).
- Dans les paramètres qui seront testés, il n'y aura pas d'espaces extra. (ce qui signifie qu'il n'y aura pas d'espaces additionnels, ni au début, ni à la fin de la `string` et que les mots seront toujours séparés par un seul espace).
- Dans les paramètres qui seront testés, il n'y aura pas d'espaces extra. (ce qui signifie qu'il n'y aura pas d'espaces additionnels, ni au début, ni à la fin de la `string` et que les mots seront toujours séparés par un seul espace).
### Utilisation
@ -22,5 +22,5 @@ student@ubuntu:~/[[ROOT]]/test$ ./test "he stared at the mountain"
mountain the at stared he
student@ubuntu:~/[[ROOT]]/test$ ./test "" | cat-e
$
student@ubuntu:~/[[ROOT]]/test$
student@ubuntu:~/[[ROOT]]/test$
```

2
subjects/rot14.fr.md

@ -4,7 +4,7 @@
Écrire une fonction `rot14` qui retourne la `string` en paramètre transformée en `string rot14`.
- Il faut savoir ce que `rot13` signifie.
- Il faut savoir ce que `rot13` signifie.
### Fonction attendue

6
subjects/sametree.en.md

@ -94,10 +94,10 @@ Here is a possible program to test your function :
package main
func main() {
t1 := NewRandTree()
t2 := NewRandTree()
t1 := NewRandTree()
t2 := NewRandTree()
fmt.Println(IsSameTree(t1, t2))
fmt.Println(IsSameTree(t1, t2))
}
```

2
subjects/sortintegertable.en.md

@ -2,7 +2,7 @@
### Instructions
- Write a function that reorder an array of `int` in ascending order.
- Write a function that reorder an array of `int` in ascending order.
### Expected function

3
subjects/sortll.en.md

@ -32,13 +32,14 @@ func Sortll(node *NodeAddL) *NodeAddL {
```
### Usage
Here is a possible program to test your function:
```go
package main
import (
"fmt"
"fmt"
)
// I implemented pushBack for this

2
subjects/splitprog.fr.md

@ -11,7 +11,6 @@ Cela signifie que:
- La fonction main déclarée doit **aussi passer** le `Restrictions Checker`(le testeur de fonctions illégales). Il est conseillé à l'étudiant de rendre une fonction main vide après ses tests finis.
- Toutes les autres régles sont les mêmes que pour un `programme`.
### Instructions
Écrire une fonction qui sépare les mots d'une `string`, qui les met dans un tableau de `string`.
@ -44,7 +43,6 @@ func main() {
}
```
Et son résultat :
```console

2
subjects/swap.fr.md

@ -2,7 +2,7 @@
### Instructions
- Écrire une fonction qui échange les contenus de deux **pointeurs sur entier** (`*int`).
- Écrire une fonction qui échange les contenus de deux **pointeurs sur entier** (`*int`).
### Fonction attendue

4
subjects/ultimatedivmod.fr.md

@ -24,8 +24,8 @@ Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
package main
import (
"fmt"
piscine ".."
"fmt"
piscine ".."
)
func main() {

6
subjects/ultimatepointone.fr.md

@ -2,7 +2,7 @@
### Instructions
- Écrire une fonction qui prend un **pointeur sur pointeur sur pointeur sur int** en argument et qui assignes à cet int la valeur 1.
- Écrire une fonction qui prend un **pointeur sur pointeur sur pointeur sur int** en argument et qui assignes à cet int la valeur 1.
### Fonction attendue
@ -20,8 +20,8 @@ Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
package main
import (
"fmt"
piscine ".."
"fmt"
piscine ".."
)
func main() {

8
subjects/ztail.fr.md

@ -4,10 +4,10 @@
Écrire un programme `ztail` qui a le même comportement que la ligne de commande `tail`, mais qui prend au moins 1 fichier comme argument.
- La seule option qui doit être géré est `-c`. Cette option sera utilisé dans tous les tests.
- La seule option qui doit être géré est `-c`. Cette option sera utilisé dans tous les tests.
- Pour ce programme le package "os" peut être utilisé.
- Pour ce programme le package "os" peut être utilisé.
- Pour que le programme passe les tests la convention pour le retour code de programme en systémes Unix devra être suivi(voir os.Exit).
- Pour que le programme passe les tests la convention pour le retour code de programme en systémes Unix devra être suivi(voir os.Exit).
- Pour plus d'informtations consulter la page du man de `tail`.
- Pour plus d'informtations consulter la page du man de `tail`.

Loading…
Cancel
Save