Browse Source

Merge pull request #327 from 01-edu/fixes-lex

Fix formatting and add instructions for clarification
pull/296/head
augusto-mantilla 5 years ago committed by GitHub
parent
commit
591f25cc6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      subjects/compareprog.en.md
  2. 6
      subjects/doop.en.md
  3. 2
      subjects/firstruneprog.en.md
  4. 11
      subjects/itoabase.en.md
  5. 2
      subjects/lastruneprog.en.md
  6. 8
      subjects/printmemory.en.md
  7. 2
      subjects/rot13.en.md
  8. 2
      subjects/rpncalc.en.md
  9. 3
      subjects/strlen.en.md
  10. 3
      subjects/strlen.fr.md
  11. 7
      subjects/strlenprog.en.md
  12. 2
      subjects/strlenprog.fr.md
  13. 4
      subjects/tabmult.en.md

2
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.

6
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`.

2
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:

11
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:

2
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:

8
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)
}
```

2
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$

2
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$

3
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)
}
```

3
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)
}
```

7
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)
}
```

2
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

4
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$
```

Loading…
Cancel
Save