diff --git a/subjects/atoibaseprog.en.md b/subjects/atoibaseprog.en.md index 99e0859f..9dbc79a8 100644 --- a/subjects/atoibaseprog.en.md +++ b/subjects/atoibaseprog.en.md @@ -1,6 +1,6 @@ ## atoibaseprog -##**WARNING! VERY IMPORTANT!** +## **WARNING! VERY IMPORTANT!** For this exercise a function will be tested **with the exam own main**. However the student **still needs** to submit a structured program: diff --git a/subjects/itoabaseprog.en.md b/subjects/itoabaseprog.en.md index bfce009f..ec8d29fd 100644 --- a/subjects/itoabaseprog.en.md +++ b/subjects/itoabaseprog.en.md @@ -1,6 +1,6 @@ ## itoabase -##**WARNING! VERY IMPORTANT!** +## **WARNING! VERY IMPORTANT!** For this exercise a function will be tested **with the exam own main**. However the student **still needs** to submit a structured program: diff --git a/subjects/reversebits.en.md b/subjects/reversebits.en.md index 9a5199c1..7ae7fd19 100644 --- a/subjects/reversebits.en.md +++ b/subjects/reversebits.en.md @@ -18,34 +18,17 @@ Write a function that takes a `byte`, reverses it `bit` by `bit` (as shown in th ### Expected function ```go -func ReverseBits(by byte) byte { -} -``` -### Usage +func ReverseBits(oct byte) byte { -Here is a possible program to test your function : - -```go -package main - -import ( - "fmt" -) - -func main() { - a := byte(0x26) - fmt.Printf("%08b\n", a) - fmt.Printf("%08b\n", ReverseBits(a)) } ``` -and its output : +Example: -```console -student@ubuntu:~/piscine-go/reversebits$ go build -student@ubuntu:~/piscine-go/reversebits$ ./reversebits -00100110 -01100100 -student@ubuntu:~/piscine-go/reversebits$ -``` + 1 byte +_____________ + 0010 0110 + || + \/ + 0110 0100 diff --git a/subjects/reversebits.fr.md b/subjects/reversebits.fr.md index 78977347..cd08a450 100644 --- a/subjects/reversebits.fr.md +++ b/subjects/reversebits.fr.md @@ -1,5 +1,16 @@ ## reversebits +## **AVERTISSEMENT! TRÈS IMPORTANT!** + +Pour cet exercice une fonction sera testée **avec le main de l'examen**. Cependant l'étudiant **doit quand même** rendre un programme structuré: + +Cela signifie que: + +- Le package doit être nommé `package main`. +- Le code rendu doit avoir une fonction main déclarée(```func main()```) même si elle est vide. +- 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 prend un `byte`, qui l'inverse `bit` par `bit` (comme montré sur l'exemple) et qui retourne le résultat. @@ -7,34 +18,17 @@ ### Fonction attendue ```go -func ReverseBits(by byte) byte { +func ReverseBits(oct byte) byte { } -``` -### Utilisation - -Voici un programme possible pour tester votre fonction : -```go -package main - -import ( - "fmt" -) - -func main() { - a := byte(0x26) - fmt.Printf("%08b\n", a) - fmt.Printf("%08b\n", ReverseBits(a)) -} ``` -et son résultat : +Exemple: -```console -student@ubuntu:~/piscine-go/reversebits$ go build -student@ubuntu:~/piscine-go/reversebits$ ./reversebits -00100110 -01100100 -student@ubuntu:~/piscine-go/reversebits$ -``` + 1 byte +_____________ + 0010 0110 + || + \/ + 0110 0100 diff --git a/subjects/splitprog.fr.md b/subjects/splitprog.fr.md index ab02dd22..c43f9224 100644 --- a/subjects/splitprog.fr.md +++ b/subjects/splitprog.fr.md @@ -26,9 +26,9 @@ func Split(str, charset string) []string { } ``` -### Usage +### Utilsation -VOici un programm possible pour tester votre fonction : +Voici un programme possible pour tester votre fonction : ```go package main @@ -44,6 +44,7 @@ func main() { } ``` + Et son résultat : ```console