From bf1b4ecefe50487248a4c28501b136dffc91d453 Mon Sep 17 00:00:00 2001 From: Augusto Date: Thu, 7 Nov 2019 22:55:19 +0000 Subject: [PATCH] Fix formatting and add instructions for clarification --- subjects/compareprog.en.md | 2 +- subjects/doop.en.md | 6 +++--- subjects/firstruneprog.en.md | 2 +- subjects/itoabase.en.md | 11 +++++++++++ subjects/lastruneprog.en.md | 2 +- subjects/printmemory.en.md | 8 ++------ subjects/rot13.en.md | 2 ++ subjects/rpncalc.en.md | 2 +- subjects/strlen.en.md | 3 ++- subjects/strlen.fr.md | 3 ++- subjects/strlenprog.en.md | 7 +++---- subjects/strlenprog.fr.md | 2 +- subjects/tabmult.en.md | 4 ++-- 13 files changed, 32 insertions(+), 22 deletions(-) diff --git a/subjects/compareprog.en.md b/subjects/compareprog.en.md index 33c196d4..00edb2f8 100644 --- a/subjects/compareprog.en.md +++ b/subjects/compareprog.en.md @@ -2,7 +2,7 @@ ### Instructions -Write a program that behaves like the `Compare` function. +Write a program that behaves like the `Compare` function from the `Go` package `strings`. This program prints a number after comparing two `string` lexicographically. diff --git a/subjects/doop.en.md b/subjects/doop.en.md index 00fd0db6..fd67dc19 100644 --- a/subjects/doop.en.md +++ b/subjects/doop.en.md @@ -6,9 +6,9 @@ Write a program that is called `doop`. The program has to be used with three arguments: -- A value -- An operator -- Another value +- A value +- An operator +- Another value In case of an invalid operator the programs prints `0`. diff --git a/subjects/firstruneprog.en.md b/subjects/firstruneprog.en.md index a649917c..c747c00b 100644 --- a/subjects/firstruneprog.en.md +++ b/subjects/firstruneprog.en.md @@ -1,6 +1,6 @@ ## firstruneprog -##**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/itoabase.en.md b/subjects/itoabase.en.md index 33338b16..ec8d29fd 100644 --- a/subjects/itoabase.en.md +++ b/subjects/itoabase.en.md @@ -1,5 +1,16 @@ ## itoabase +## **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: + +This means that: + +- The package needs to be named `package main`. +- The submitted code needs one declared function main(```func main()```) even if empty. +- The function main declared needs to **also pass** the `Restrictions Checker`(illegal functions tester). It is advised for the student to just empty the function main after its own testings are done. +- Every other rules are obviously the same than for a `program`. + ### Instructions Write a function that: diff --git a/subjects/lastruneprog.en.md b/subjects/lastruneprog.en.md index 9914f464..7cd5b671 100644 --- a/subjects/lastruneprog.en.md +++ b/subjects/lastruneprog.en.md @@ -1,6 +1,6 @@ ## lastruneprog -##**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/printmemory.en.md b/subjects/printmemory.en.md index 90387674..f41fde3b 100644 --- a/subjects/printmemory.en.md +++ b/subjects/printmemory.en.md @@ -1,6 +1,6 @@ ## printmemory -##**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: @@ -30,13 +30,9 @@ Here is a possible program to test your function : ```go package main -import ( - piscine ".." -) - func main() { arr := [10]int{104, 101, 108, 108, 111, 16, 21, 42} - piscine.Memory(arr) + PrintMemory(arr) } ``` diff --git a/subjects/rot13.en.md b/subjects/rot13.en.md index 941fdb71..3ff808ec 100644 --- a/subjects/rot13.en.md +++ b/subjects/rot13.en.md @@ -19,6 +19,8 @@ student@ubuntu:~/piscine-go/test$ ./test "abc" nop student@ubuntu:~/piscine-go/test$ ./test "hello there" uryyb gurer +student@ubuntu:~/piscine-go/test$ ./test "HELLO, HELP" +URYYB, URYC student@ubuntu:~/piscine-go/test$ ./test student@ubuntu:~/piscine-go/test$ diff --git a/subjects/rpncalc.en.md b/subjects/rpncalc.en.md index 956e79c8..e4167b37 100644 --- a/subjects/rpncalc.en.md +++ b/subjects/rpncalc.en.md @@ -50,7 +50,7 @@ Or: student@ubuntu:~/piscine-go/rpncalc$ go build student@ubuntu:~/piscine-go/rpncalc$ ./rpncalc "1 2 * 3 * 4 +" | cat -e 10$ -student@ubuntu:~/piscine-go/rpncalc$ ./rpncalc 1 2 3 4 +" | cat -e +student@ubuntu:~/piscine-go/rpncalc$ ./rpncalc "1 2 3 4 +" | cat -e Error$ student@ubuntu:~/piscine-go/rpncalc$ ./rpncalc | cat -e Error$ diff --git a/subjects/strlen.en.md b/subjects/strlen.en.md index 56b82ccc..3c3625f3 100644 --- a/subjects/strlen.en.md +++ b/subjects/strlen.en.md @@ -21,11 +21,12 @@ package main import ( "fmt" + piscine ".." ) func main() { str := "Hello World!" - nb := StrLen(str) + nb := piscine.StrLen(str) fmt.Println(nb) } ``` diff --git a/subjects/strlen.fr.md b/subjects/strlen.fr.md index fa6f0d77..d3db8dd5 100644 --- a/subjects/strlen.fr.md +++ b/subjects/strlen.fr.md @@ -21,11 +21,12 @@ package main import ( "fmt" + piscine ".." ) func main() { str := "Hello World!" - nb := StrLen(str) + nb := piscine.StrLen(str) fmt.Println(nb) } ``` diff --git a/subjects/strlenprog.en.md b/subjects/strlenprog.en.md index 41ae32a5..35d0a627 100644 --- a/subjects/strlenprog.en.md +++ b/subjects/strlenprog.en.md @@ -1,6 +1,6 @@ ## strlenprog -##**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: @@ -13,7 +13,7 @@ This means that: ### Instructions -- Write a function that counts the characters of a `string` and that returns that count. +- Write a function that counts the `runes` of a `string` and that returns that count. ### Expected function @@ -32,12 +32,11 @@ package main import ( "fmt" - piscine ".." ) func main() { str := "Hello World!" - nb := piscine.StrLen(str) + nb := StrLen(str) fmt.Println(nb) } ``` diff --git a/subjects/strlenprog.fr.md b/subjects/strlenprog.fr.md index 949b4fce..7dd5fea3 100644 --- a/subjects/strlenprog.fr.md +++ b/subjects/strlenprog.fr.md @@ -13,7 +13,7 @@ Cela signifie que: ### Instructions -- Écrire une fonction qui compte le nombre de caractères d'une `string` et qui retourne le nombre trouvé. +- Écrire une fonction qui compte le nombre de `runes` d'une `string` et qui retourne le nombre trouvé. ### Fonction attendue diff --git a/subjects/tabmult.en.md b/subjects/tabmult.en.md index 26a82218..288a896e 100644 --- a/subjects/tabmult.en.md +++ b/subjects/tabmult.en.md @@ -30,7 +30,7 @@ student@ubuntu:~/piscine-go/test$ ./test 19 7 x 19 = 133 8 x 19 = 152 9 x 19 = 171 -student@ubuntu:~/piscine-go/test$ +student@ubuntu:~/piscine-go/test$ ./test -student@ubuntu:~/piscine-go/ +student@ubuntu:~/piscine-go/test$ ```