Browse Source

Simplify prompt, execution of Go programs, fix typos

content-update
xpetit 3 years ago
parent
commit
46f4ddc49e
No known key found for this signature in database
GPG Key ID: 97C60669182C17A5
  1. 30
      docs/addition_of_exercise_draft.md
  2. 5
      subjects/abort/README.md
  3. 5
      subjects/activebits/README.md
  4. 4
      subjects/adding/README.md
  5. 4
      subjects/adding_twice/README.md
  6. 5
      subjects/addlinkednumbers/README.md
  7. 15
      subjects/addprimesum/README.md
  8. 5
      subjects/advancedsortwordarr/README.md
  9. 5
      subjects/alphacount/README.md
  10. 9
      subjects/alphamirror/README.md
  11. 5
      subjects/any/README.md
  12. 5
      subjects/appendrange/README.md
  13. 4
      subjects/arrange_it/README.md
  14. 4
      subjects/arrays/README.md
  15. 13
      subjects/ascii-art/README.md
  16. 9
      subjects/ascii-art/fs/README.md
  17. 11
      subjects/ascii-art/justify/README.md
  18. 11
      subjects/ascii-art/output/README.md
  19. 7
      subjects/ascii-art/reverse/README.md
  20. 5
      subjects/atoi/README.md
  21. 5
      subjects/atoibase/README.md
  22. 10
      subjects/balancedstring/README.md
  23. 4
      subjects/banner/README.md
  24. 5
      subjects/basicatoi/README.md
  25. 5
      subjects/basicatoi2/README.md
  26. 5
      subjects/basicjoin/README.md
  27. 4
      subjects/bigger/README.md
  28. 4
      subjects/blood_types/README.md
  29. 4
      subjects/blood_types_s/README.md
  30. 5
      subjects/boolean/README.md
  31. 4
      subjects/border_cross/README.md
  32. 6
      subjects/borrow/README.md
  33. 4
      subjects/borrow_box/README.md
  34. 4
      subjects/borrow_me_the_reference/README.md
  35. 4
      subjects/box_it/README.md
  36. 4
      subjects/box_recursion/README.md
  37. 4
      subjects/boxing_todo/README.md
  38. 10
      subjects/brackets/README.md
  39. 10
      subjects/brackets_matching/README.md
  40. 11
      subjects/brainfuck/README.md
  41. 5
      subjects/btreeapplybylevel/README.md
  42. 5
      subjects/btreeapplyinorder/README.md
  43. 5
      subjects/btreeapplypostorder/README.md
  44. 5
      subjects/btreeapplypreorder/README.md
  45. 5
      subjects/btreedeletenode/README.md
  46. 5
      subjects/btreeinsertdata/README.md
  47. 5
      subjects/btreeisbinary/README.md
  48. 5
      subjects/btreelevelcount/README.md
  49. 5
      subjects/btreemax/README.md
  50. 5
      subjects/btreemin/README.md
  51. 5
      subjects/btreeprintroot/README.md
  52. 5
      subjects/btreesearchitem/README.md
  53. 5
      subjects/btreetransplant/README.md
  54. 5
      subjects/capitalize/README.md
  55. 4
      subjects/capitalizing/README.md
  56. 4
      subjects/card_deck/README.md
  57. 19
      subjects/cat/README.md
  58. 4
      subjects/changeorder/README.md
  59. 4
      subjects/changes/README.md
  60. 5
      subjects/chunk/README.md
  61. 4
      subjects/cipher/README.md
  62. 4
      subjects/circle/README.md
  63. 4
      subjects/cl-camp2/README.md
  64. 6
      subjects/cl-camp4/README.md
  65. 4
      subjects/cl-camp5/README.md
  66. 4
      subjects/cl-camp6/README.md
  67. 4
      subjects/cl-camp7/README.md
  68. 11
      subjects/cleanstr/README.md
  69. 4
      subjects/closures/README.md
  70. 5
      subjects/collatzcountdown/README.md
  71. 4
      subjects/collect/README.md
  72. 7
      subjects/comcheck/README.md
  73. 4
      subjects/commits_stats/README.md
  74. 5
      subjects/compact/README.md
  75. 5
      subjects/compare/README.md
  76. 5
      subjects/concat/README.md
  77. 5
      subjects/concatparams/README.md
  78. 5
      subjects/convertbase/README.md
  79. 4
      subjects/copy/README.md
  80. 5
      subjects/costumeprofit/README.md
  81. 5
      subjects/countdown/README.md
  82. 5
      subjects/countif/README.md
  83. 4
      subjects/counting_words/README.md
  84. 5
      subjects/createelem/README.md
  85. 4
      subjects/delete_prefix/README.md
  86. 4
      subjects/diamond_creation/README.md
  87. 4
      subjects/display_table/README.md
  88. 9
      subjects/displaya/README.md
  89. 5
      subjects/displayalpham/README.md
  90. 5
      subjects/displayalrevm/README.md
  91. 11
      subjects/displayfile/README.md
  92. 9
      subjects/displayfirstparam/README.md
  93. 11
      subjects/displaylastparam/README.md
  94. 9
      subjects/displayz/README.md
  95. 4
      subjects/division_and_remainder/README.md
  96. 5
      subjects/divmod/README.md
  97. 25
      subjects/doop/README.md
  98. 4
      subjects/doubtful/README.md
  99. 4
      subjects/drop_the_thread/README.md
  100. 4
      subjects/easy_traits/README.md
  101. Some files were not shown because too many files changed in this diff diff.show_more

30
docs/addition_of_exercise_draft.md

@ -13,19 +13,18 @@ Example: [fprime](https://github.com/01-edu/public/blob/master/subjects/fprime.e
The exceptional cases in the `usage` part.
```console
student@ubuntu:~/piscine-go/test$ go build
student@ubuntu:~/piscine-go/test$ ./test 225225
$ go run . 225225
3*3*5*5*7*11*13
student@ubuntu:~/piscine-go/test$ ./test 8333325
$ go run . 8333325
3*3*5*5*7*11*13*37
...
student@ubuntu:~/piscine-go/test$ ./test 0
$ go run . 0
student@ubuntu:~/piscine-go/test$ ./test 1
$ go run . 1
1
student@ubuntu:~/piscine-go/test$
$
```
The subject states that only **positive integer** will be tested, however, 0 and 1 are not primes.
@ -59,24 +58,23 @@ Write a program that takes a positive `int` and displays its prime factors, foll
### Usage
```console
student@ubuntu:~/piscine-go/test$ go build
student@ubuntu:~/piscine-go/test$ ./test 225225
$ go run . 225225
3*3*5*5*7*11*13
student@ubuntu:~/piscine-go/test$ ./test 8333325
$ go run . 8333325
3*3*5*5*7*11*13*37
student@ubuntu:~/piscine-go/test$ ./test 9539
$ go run . 9539
9539
student@ubuntu:~/piscine-go/test$ ./test 804577
$ go run . 804577
804577
student@ubuntu:~/piscine-go/test$ ./test 42
$ go run . 42
2*3*7
student@ubuntu:~/piscine-go/test$ ./test a
$ go run . a
student@ubuntu:~/piscine-go/test$ ./test 0
$ go run . 0
student@ubuntu:~/piscine-go/test$ ./test 1
$ go run . 1
1
student@ubuntu:~/piscine-go/test$
$
```
---

5
subjects/abort/README.md

@ -33,8 +33,7 @@ func main() {
And its output :
```console
student@ubuntu:~/abort/test$ go build
student@ubuntu:~/abort/test$ ./test
$ go run .
5
student@ubuntu:~/abort/test$
$
```

5
subjects/activebits/README.md

@ -32,8 +32,7 @@ func main() {
And its output :
```console
student@ubuntu:~/activebits/test$ go build
student@ubuntu:~/activebits/test$ ./test
$ go run .
3
student@ubuntu:~/activebits/test$
$
```

4
subjects/adding/README.md

@ -26,9 +26,9 @@ fn main() {
And its output:
```console
student@ubuntu:~/adding/test$ cargo run
$ cargo run
-5
2261
305696
student@ubuntu:~/adding/test$
$
```

4
subjects/adding_twice/README.md

@ -50,10 +50,10 @@ fn main() {
And its output
```console
student@ubuntu:~/adding_twice/test$ cargo run
$ cargo run
The value is 27
The value is 47
The value is 67
The value is -57
student@ubuntu:~/adding_twice/test$
$
```

5
subjects/addlinkednumbers/README.md

@ -60,8 +60,7 @@ func main() {
An its output:
```console
student@ubuntu:~/addlinkednumbers/test$ go build
student@ubuntu:~/addlinkednumbers/test$ ./main
$ go run .
9 -> 0 -> 7
student@ubuntu:~/addlinkednumbers/test$
$
```

15
subjects/addprimesum/README.md

@ -9,18 +9,17 @@ Write a program that takes a positive integer as argument and displays the sum o
### Usage
```console
student@ubuntu:~/addprimesum/test$ go build
student@ubuntu:~/addprimesum/test$ ./test 5
$ go run . 5
10
student@ubuntu:~/addprimesum/test$ ./test 7
$ go run . 7
17
student@ubuntu:~/addprimesum/test$ ./test -2
$ go run . -2
0
student@ubuntu:~/addprimesum/test$ ./test 0
$ go run . 0
0
student@ubuntu:~/addprimesum/test$ ./test
$ go run .
0
student@ubuntu:~/addprimesum/test$ ./test 5 7
$ go run . 5 7
0
student@ubuntu:~/addprimesum/test$
$
```

5
subjects/advancedsortwordarr/README.md

@ -36,8 +36,7 @@ func main() {
And its output :
```console
student@ubuntu:~/advancedsortwordarr/test$ go build
student@ubuntu:~/advancedsortwordarr/test$ ./test
$ go run .
[1 2 3 A B C a b c]
student@ubuntu:~/advancedsortwordarr/test$
$
```

5
subjects/alphacount/README.md

@ -37,8 +37,7 @@ func main() {
And its output :
```console
student@ubuntu:~/alphacount/test$ go build
student@ubuntu:~/alphacount/test$ ./test
$ go run .
10
student@ubuntu:~/alphacount/test$
$
```

9
subjects/alphamirror/README.md

@ -16,11 +16,10 @@ If the number of arguments is different from 1, the program displays nothing.
### Usage
```console
student@ubuntu:~/alphamirror$ go build
student@ubuntu:~/alphamirror$ ./alphamirror "abc"
$ go run . "abc"
zyx
student@ubuntu:~/alphamirror$ ./alphamirror "My horse is Amazing." | cat -e
$ go run . "My horse is Amazing." | cat -e
Nb slihv rh Znzarmt.$
student@ubuntu:~/alphamirror$ ./alphamirror
student@ubuntu:~/alphamirror$
$ go run .
$
```

5
subjects/any/README.md

@ -41,9 +41,8 @@ func main() {
And its output :
```console
student@ubuntu:~/any/test$ go build
student@ubuntu:~/any/test$ ./test
$ go run .
false
true
student@ubuntu:~/any/test$
$
```

5
subjects/appendrange/README.md

@ -39,9 +39,8 @@ func main() {
And its output :
```console
student@ubuntu:~/appendrange/test$ go build
student@ubuntu:~/appendrange/test$ ./test
$ go run .
[5 6 7 8 9]
[]
student@ubuntu:~/appendrange/test$
$
```

4
subjects/arrange_it/README.md

@ -35,7 +35,7 @@ fn main() {
And its output
```console
student@ubuntu:~/arrange_it/test$ cargo run
$ cargo run
"This is a Test"
student@ubuntu:~/arrange_it/test$
$
```

4
subjects/arrays/README.md

@ -54,10 +54,10 @@ fn main() {
And its output:
```console
student@ubuntu:~/arrays/test$ cargo run
$ cargo run
The Sum of the elements in [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] = 55
The Sum of the elements in [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] = 55
The Sum of the elements in [5, 5, 5, 5, 5, 5, 5, 5, 5, 5] = 50
Array size 32 with only 10's in it [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10]
student@ubuntu:~/arrays/test$
$
```

13
subjects/ascii-art/README.md

@ -68,8 +68,7 @@ etc
### Usage
```console
student@ubuntu:~/ascii-art$ go build
student@ubuntu:~/ascii-art$ ./ascii-art "hello"
$ go run . "hello"
_ _ _
| | | | | |
| |__ ___ | | | | ___
@ -78,7 +77,7 @@ student@ubuntu:~/ascii-art$ ./ascii-art "hello"
|_| |_| \___| |_| |_| \___/
student@ubuntu:~/ascii-art$ ./ascii-art "HeLlO"
$ go run . "HeLlO"
_ _ _ _ ____
| | | | | | | | / __ \
| |__| | ___ | | | | | | | |
@ -87,7 +86,7 @@ student@ubuntu:~/ascii-art$ ./ascii-art "HeLlO"
|_| |_| \___| |______| |_| \____/
student@ubuntu:~/ascii-art$ ./ascii-art "Hello There"
$ go run . "Hello There"
_ _ _ _ _______ _
| | | | | | | | |__ __| | |
| |__| | ___ | | | | ___ | | | |__ ___ _ __ ___
@ -96,7 +95,7 @@ student@ubuntu:~/ascii-art$ ./ascii-art "Hello There"
|_| |_| \___| |_| |_| \___/ |_| |_| |_| \___| |_| \___|
student@ubuntu:~/ascii-art$ ./ascii-art "1Hello 2There"
$ go run . "1Hello 2There"
_ _ _ _ _______ _
_ | | | | | | | | ____ |__ __| | |
/ | | |__| | ___ | | | | ___ |___ \ | | | |__ ___ _ __ ___
@ -105,7 +104,7 @@ student@ubuntu:~/ascii-art$ ./ascii-art "1Hello 2There"
|_| |_| |_| \___| |_| |_| \___/ |_____| |_| |_| |_| \___| |_| \___|
student@ubuntu:~/ascii-art$ ./ascii-art "{Hello There}"
$ go run . "{Hello There}"
__ _ _ _ _ _______ _ __
/ / | | | | | | | | |__ __| | | \ \
| | | |__| | ___ | | | | ___ | | | |__ ___ _ __ ___ | |
@ -114,5 +113,5 @@ student@ubuntu:~/ascii-art$ ./ascii-art "{Hello There}"
| | |_| |_| \___| |_| |_| \___/ |_| |_| |_| \___| |_| \___| | |
\_\ /_/
student@ubuntu:~/ascii-art$
$
```

9
subjects/ascii-art/fs/README.md

@ -26,8 +26,7 @@ This project will help you learn about :
### Usage
```console
student@ubuntu:~/ascii-art$ go build
student@ubuntu:~/ascii-art$ ./ascii-art "hello" standard
$ go run . "hello" standard
_ _ _
| | | | | |
| |__ ___ | | | | ___
@ -37,7 +36,7 @@ student@ubuntu:~/ascii-art$ ./ascii-art "hello" standard
student@ubuntu:~/ascii-art$ ./ascii-art "Hello There!" shadow
$ go run . "Hello There!" shadow
_| _| _| _| _|_|_|_|_| _| _|
_| _| _|_| _| _| _|_| _| _|_|_| _|_| _| _|_| _|_| _|
@ -47,7 +46,7 @@ _| _| _|_|_| _| _| _|_| _| _| _| _|_|_| _| _
student@ubuntu:~/ascii-art$ ./ascii-art "Hello There!" thinkertoy
$ go run . "Hello There!" thinkertoy
o o o o o-O-o o
| | | | | | o
@ -57,5 +56,5 @@ o o o-o o o o-o o o o o-o o o-o
O
student@ubuntu:~/ascii-art$
$
```

11
subjects/ascii-art/justify/README.md

@ -32,8 +32,7 @@ This project will help you learn about :
### Usage
```console
|student@ubuntu:~/ascii-art$ go build |
|student@ubuntu:~/ascii-art$ ./ascii-art "hello" standard --align=center |
|$ go run . "hello" standard --align=center |
| _ _ _ |
| | | | | | | |
| | |__ ___ | | | | ___ |
@ -42,7 +41,7 @@ This project will help you learn about :
| |_| |_| \___| |_| |_| \___/ |
| |
| |
|student@ubuntu:~/ascii-art$ ./ascii-art "Hello There" standard --align=left |
|$ go run . "Hello There" standard --align=left |
| _ _ _ _ _______ _ |
|| | | | | | | | |__ __| | | |
|| |__| | ___ | | | | ___ | | | |__ ___ _ __ ___ |
@ -51,7 +50,7 @@ This project will help you learn about :
||_| |_| \___| |_| |_| \___/ |_| |_| |_| \___| |_| \___| |
| |
| |
|student@ubuntu:~/ascii-art$ ./ascii-art "hello" shadow --align=right |
|$ go run . "hello" shadow --align=right |
| |
| _| _| _| |
| _|_|_| _|_| _| _| _|_| |
@ -60,7 +59,7 @@ This project will help you learn about :
| _| _| _|_|_| _| _| _|_| |
| |
| |
|student@ubuntu:~/ascii-art$ ./ascii-art "how are you" shadow --align=justify |
|$ go run . "how are you" shadow --align=justify |
| |
|_| |
|_|_|_| _|_| _| _| _| _|_|_| _| _|_| _|_| _| _| _|_| _| _| |
@ -69,5 +68,5 @@ This project will help you learn about :
|_| _| _|_| _| _| _|_|_| _| _|_|_| _|_|_| _|_| _|_|_| |
| _| |
| _|_| |
|student@ubuntu:~/ascii-art$ |
|$ |
```

11
subjects/ascii-art/output/README.md

@ -27,9 +27,8 @@ This project will help you learn about :
### Usage
```console
student@ubuntu:~/ascii-art$ go build
student@ubuntu:~/ascii-art$ ./ascii-art "hello" standard --output=banner.txt
student@ubuntu:~/ascii-art$ cat banner.txt
$ go run . "hello" standard --output=banner.txt
$ cat banner.txt
_ _ _
| | | | | |
| |__ ___ | | | | ___
@ -39,8 +38,8 @@ student@ubuntu:~/ascii-art$ cat banner.txt
student@ubuntu:~/ascii-art$ ./ascii-art "Hello There!" shadow --output=banner.txt
student@ubuntu:~/ascii-art$ cat banner.txt
$ go run . "Hello There!" shadow --output=banner.txt
$ cat banner.txt
_| _| _| _| _|_|_|_|_| _| _|
_| _| _|_| _| _| _|_| _| _|_|_| _|_| _| _|_| _|_| _|
@ -50,5 +49,5 @@ _| _| _|_|_| _| _| _|_| _| _| _| _|_|_| _| _
student@ubuntu:~/ascii-art$
$
```

7
subjects/ascii-art/reverse/README.md

@ -30,8 +30,7 @@ This project will help you learn about :
### Usage
```console
student@ubuntu:~/ascii-art$ go build
student@ubuntu:~/ascii-art$ cat file.txt
$ cat file.txt
_ _ _
| | | | | |
| |__ ___ | | | | ___
@ -41,7 +40,7 @@ student@ubuntu:~/ascii-art$ cat file.txt
student@ubuntu:~/ascii-art$ ./ascii-art --reverse=file.txt
$ go run . --reverse=file.txt
hello
student@ubuntu:~/ascii-art$
$
```

5
subjects/atoi/README.md

@ -45,8 +45,7 @@ func main() {
And its output :
```console
student@ubuntu:~/atoi/test$ go build
student@ubuntu:~/atoi/test$ ./test
$ go run .
12345
12345
0
@ -55,5 +54,5 @@ student@ubuntu:~/atoi/test$ ./test
-1234
0
0
student@ubuntu:~/atoi/test$
$
```

5
subjects/atoibase/README.md

@ -50,12 +50,11 @@ func main() {
And its output :
```console
student@ubuntu:~/atoibase/test$ go build
student@ubuntu:~/atoibase/test$ ./test
$ go run .
125
125
125
125
0
student@ubuntu:~/atoibase/test$
$
```

10
subjects/balancedstring/README.md

@ -14,15 +14,15 @@ It will only be tested strings containing the characters 'C' and 'D'.
### Usage
```console
student@ubuntu:~/balancedstring$ go build
student@ubuntu:~/balancedstring$ ./balancedstring "CDCCDDCDCD"
$ go run . "CDCCDDCDCD"
4
student@ubuntu:~/balancedstring$ ./balancedstring "CDDDDCCCDC"
$ go run . "CDDDDCCCDC"
3
student@ubuntu:~/balancedstring$ ./balancedstring "DDDDCCCC"
$ go run . "DDDDCCCC"
1
student@ubuntu:~/balancedstring$ ./balancedstring "CDCCCDDCDD"
$ go run . "CDCCCDDCDD"
2
$
```
In first example "CDCCDDCDCD" can be split into "CD", "CCDD", "CD", "CD", each substring contains same number of 'C' and 'D'.

4
subjects/banner/README.md

@ -111,10 +111,10 @@ fn main() {
And its output:
```console
student@ubuntu:~/banner/test$ cargo run
$ cargo run
"0.5"
"0"
"invalid float literal"
"invalid float literal"
student@ubuntu:~/banner/test$
$
```

5
subjects/basicatoi/README.md

@ -40,10 +40,9 @@ func main() {
And its output :
```console
student@ubuntu:~/basicatoi/test$ go build
student@ubuntu:~/basicatoi/test$ ./test
$ go run .
12345
12345
0
student@ubuntu:~/basicatoi/test$
$
```

5
subjects/basicatoi2/README.md

@ -41,11 +41,10 @@ func main() {
And its output :
```console
student@ubuntu:~/basicatoi2/test$ go build
student@ubuntu:~/basicatoi2/test$ ./test
$ go run .
12345
12345
0
0
student@ubuntu:~/basicatoi2/test$
$
```

5
subjects/basicjoin/README.md

@ -33,8 +33,7 @@ func main() {
And its output :
```console
student@ubuntu:~/basicjoin/test$ go build
student@ubuntu:~/basicjoin/test$ ./test
$ go run .
Hello! How are you?
student@ubuntu:~/basicjoin/test$
$
```

4
subjects/bigger/README.md

@ -38,7 +38,7 @@ fn main() {
And its output
```console
student@ubuntu:~/bigger/test$ cargo run
$ cargo run
The biggest of the elements in the HashMap is 334
student@ubuntu:~/bigger/test$
$
```

4
subjects/blood_types/README.md

@ -104,9 +104,9 @@ fn main() {
And its output
```console
student@ubuntu:~/blood_types/test$ cargo run
$ cargo run
recipients of O+ [AB+, O+, A+, B+]
donors of O+ [O+, O-]
donors of O+ can receive from A- false
student@ubuntu:~/blood_types/test$
$
```

4
subjects/blood_types_s/README.md

@ -84,9 +84,9 @@ fn main() {
And its output
```console
student@ubuntu:~/blood_types_s/test$ cargo run
$ cargo run
recipients of O+ [BloodType { antigen: AB, rh_factor: Positive }, BloodType { antigen: O, rh_factor: Positive }, BloodType { antigen: A, rh_factor: Positive }, BloodType { antigen: B, rh_factor: Positive }]
donors of O+ [BloodType { antigen: O, rh_factor: Positive }, BloodType { antigen: O, rh_factor: Negative }]
donors of O+ can receive from BloodType { antigen: O, rh_factor: Positive } true
student@ubuntu:~/blood_types_s/test$
$
```

5
subjects/boolean/README.md

@ -40,9 +40,8 @@ func main() {
### Usage
```console
student@ubuntu:~/boolean$ go build
student@ubuntu:~/boolean$ ./boolean "not" "odd"
$ go run . "not" "odd"
I have an even number of arguments
student@ubuntu:~/boolean$ ./boolean "not even"
$ go run . "not even"
I have an odd number of arguments
```

4
subjects/border_cross/README.md

@ -73,7 +73,7 @@ fn main() {
And its output
```console
student@ubuntu:~/border_cross/test$ cargo run
$ cargo run
["Model 3", "Ranger"]
student@ubuntu:~/border_cross/test$
$
```

6
subjects/borrow/README.md

@ -33,9 +33,9 @@ fn main() {
And its output:
```rust
student@ubuntu:~/borrow/test$ cargo run
```console
$ cargo run
str_len("hello") = 5
str_len("camelCase") = 9
student@ubuntu:~/borrow/test$
$
```

4
subjects/borrow_box/README.md

@ -82,10 +82,10 @@ fn main() {
And its output:
```console
student@ubuntu:~/borrow_box/test$ cargo run
$ cargo run
("Same score! tied", 0)
("Same score! tied", 2)
("Joao", 3)
"game deleted: id -> 0"
student@ubuntu:~/borrow_box/test$
$
```

4
subjects/borrow_me_the_reference/README.md

@ -54,7 +54,7 @@ fn main() {
And its output
```console
student@ubuntu:~/borrow_me_the_reference/test$ cargo run
$ cargo run
("borrow", ["✔", "✔", "✘", "✔"], 75)
student@ubuntu:~/borrow_me_the_reference/test$
$
```

4
subjects/box_it/README.md

@ -50,10 +50,10 @@ fn main() {
And its output:
```console
student@ubuntu:~/box_it/test$ cargo run
$ cargo run
Box value : [5500, 8900, 32]
size occupied in the stack : 8 bytes
value : [5500, 8900, 32]
size occupied in the stack : 24 bytes
student@ubuntu:~/box_it/test$
$
```

4
subjects/box_recursion/README.md

@ -72,9 +72,9 @@ fn main() {
And its output:
```console
student@ubuntu:~/box_recursion/test$ cargo run
$ cargo run
WorkEnvironment { grade: Some(Worker { worker_type: "Normal Worker", worker_name: "Alice", next_worker: Some(Worker { worker_type: "Normal Worker", worker_name: "Ana", next_worker: Some(Worker { worker_type: "Manager", worker_name: "Monica", next_worker: Some(Worker { worker_type: "CEO", worker_name: "Marie", next_worker: None }) }) }) }) }
Some(("Alice", "Normal Worker"))
WorkEnvironment { grade: None }
student@ubuntu:~/box_recursion/test$
$
```

4
subjects/boxing_todo/README.md

@ -165,9 +165,9 @@ fn main() {
And its output:
```console
student@ubuntu:~/boxing_todo/test$ cargo run
$ cargo run
TodoList { title: "TODO LIST FOR PISCINE RUST", tasks: [Task { id: 0, description: "do this", level: 0 }, Task { id: 1, description: "do that", level: 5 }] }
Todo List parse failed: None
Fail to parses todo Some(Malformed(UnexpectedCharacter { ch: ',', line: 2, column: 18 }))
student@ubuntu:~/boxing_todo/test$
$
```

10
subjects/brackets/README.md

@ -13,13 +13,13 @@ If there is no argument, the program must print nothing.
### Usage
```console
student@ubuntu:~/brackets$ ./brackets '(johndoe)' | cat -e
$ go run . '(johndoe)' | cat -e
OK$
student@ubuntu:~/brackets$ ./brackets '([)]' | cat -e
$ go run . '([)]' | cat -e
Error$
student@ubuntu:~/brackets$ ./brackets '' '{[(0 + 0)(1 + 1)](3*(-1)){()}}' | cat -e
$ go run . '' '{[(0 + 0)(1 + 1)](3*(-1)){()}}' | cat -e
OK$
OK$
student@ubuntu:~/brackets$ ./brackets
student@ubuntu:~/brackets$
$ go run .
$
```

10
subjects/brackets_matching/README.md

@ -13,13 +13,13 @@ If there is no argument, the program must print nothing.
### Usage
```console
student@ubuntu:~/brackets_matching/brackets$ ./brackets '(johndoe)' | cat -e
$ go run . '(johndoe)' | cat -e
OK$
student@ubuntu:~/brackets_matching/brackets$ ./brackets '([)]' | cat -e
$ go run . '([)]' | cat -e
Error$
student@ubuntu:~/brackets_matching/brackets$ ./brackets '' '{[(0 + 0)(1 + 1)](3*(-1)){()}}' | cat -e
$ go run . '' '{[(0 + 0)(1 + 1)](3*(-1)){()}}' | cat -e
OK$
OK$
student@ubuntu:~/brackets_matching/brackets$ ./brackets
student@ubuntu:~/brackets_matching/brackets$
$ go run .
$
```

11
subjects/brainfuck/README.md

@ -22,13 +22,12 @@ Any other character is a comment.
### Usage
```console
student@ubuntu:~/brainfuck$ go build
student@ubuntu:~/brainfuck$ ./brainfuck "++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>." | cat -e
$ go run . "++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>." | cat -e
Hello World!$
student@ubuntu:~/brainfuck$ ./brainfuck "+++++[>++++[>++++H>+++++i<<-]>>>++\n<<<<-]>>--------.>+++++.>." | cat -e
$ go run . "+++++[>++++[>++++H>+++++i<<-]>>>++\n<<<<-]>>--------.>+++++.>." | cat -e
Hi$
student@ubuntu:~/brainfuck$ ./brainfuck "++++++++++[>++++++++++>++++++++++>++++++++++<<<-]>---.>--.>-.>++++++++++." | cat -e
$ go run . "++++++++++[>++++++++++>++++++++++>++++++++++<<<-]>---.>--.>-.>++++++++++." | cat -e
abc$
student@ubuntu:~/brainfuck$ ./brainfuck
student@ubuntu:~/brainfuck$
$ go run .
$
```

5
subjects/btreeapplybylevel/README.md

@ -36,11 +36,10 @@ func main() {
And its output :
```console
student@ubuntu:~/btreeapplybylevel/test$ go build
student@ubuntu:~/btreeapplybylevel/test$ ./test
$ go run .
4
1
7
5
student@ubuntu:~/btreeapplybylevel/test$
$
```

5
subjects/btreeapplyinorder/README.md

@ -37,11 +37,10 @@ func main() {
And its output :
```console
student@ubuntu:~/btreeapplyinorder/test$ go build
student@ubuntu:~/btreeapplyinorder/test$ ./test
$ go run .
1
4
5
7
student@ubuntu:~/btreeapplyinorder/test$
$
```

5
subjects/btreeapplypostorder/README.md

@ -37,11 +37,10 @@ func main() {
And its output :
```console
student@ubuntu:~/btreeapplypostorder/test$ go build
student@ubuntu:~/btreeapplypostorder/test$ ./test
$ go run .
1
5
7
4
student@ubuntu:~/btreeapplypostorder/test$
$
```

5
subjects/btreeapplypreorder/README.md

@ -37,11 +37,10 @@ func main() {
And its output :
```console
student@ubuntu:~/btreeapplypreorder/test$ go build
student@ubuntu:~/btreeapplypreorder/test$ ./test
$ go run .
4
1
7
5
student@ubuntu:~/btreeapplypreorder/test$
$
```

5
subjects/btreedeletenode/README.md

@ -43,8 +43,7 @@ func main() {
And its output :
```console
student@ubuntu:~/btreedeletenode/test$ go build
student@ubuntu:~/btreedeletenode/test$ ./test
$ go run .
Before delete:
1
4
@ -54,5 +53,5 @@ After delete:
1
5
7
student@ubuntu:~/btreedeletenode/test$
$
```

5
subjects/btreeinsertdata/README.md

@ -47,11 +47,10 @@ func main() {
And its output :
```console
student@ubuntu:~/btreeinsertdata$ go build
student@ubuntu:~/btreeinsertdata$ ./btreeinsertdata
$ go run .
1
4
5
7
student@ubuntu:~/btreeinsertdata$
$
```

5
subjects/btreeisbinary/README.md

@ -36,8 +36,7 @@ func main() {
And its output :
```console
student@ubuntu:~/btreeisbinary/test$ go build
student@ubuntu:~/btreeisbinary/test$ ./test
$ go run .
true
student@ubuntu:~/btreeisbinary/test$
$
```

5
subjects/btreelevelcount/README.md

@ -37,8 +37,7 @@ func main() {
And its output :
```console
student@ubuntu:~/btreelevelcount/test$ go build
student@ubuntu:~/btreelevelcount/test$ ./test
$ go run .
3
student@ubuntu:~/btreelevelcount/test$
$
```

5
subjects/btreemax/README.md

@ -38,8 +38,7 @@ func main() {
And its output :
```console
student@ubuntu:~/btreemax/test$ go build
student@ubuntu:~/btreemax/test$ ./test
$ go run .
7
student@ubuntu:~/btreemax/test$
$
```

5
subjects/btreemin/README.md

@ -38,8 +38,7 @@ func main() {
And its output :
```console
student@ubuntu:~/btreemin/test$ go build
student@ubuntu:~/btreemin/test$ ./test
$ go run .
1
student@ubuntu:~/btreemin/test$
$
```

5
subjects/btreeprintroot/README.md

@ -38,10 +38,9 @@ func main() {
And its output :
```console
student@ubuntu:~/btreeprintroot/printroot$ go build
student@ubuntu:~/btreeprintroot/printroot$ ./printroot
$ go run .
who
are
you
student@ubuntu:~/btreeprintroot/test$
$
```

5
subjects/btreesearchitem/README.md

@ -63,11 +63,10 @@ func main() {
And its output :
```console
student@ubuntu:~/btreesearchitem/test$ go build
student@ubuntu:~/btreesearchitem/test$ ./test
$ go run .
Item selected -> 7
Parent of selected item -> 4
Left child of selected item -> 5
Right child of selected item -> nil
student@ubuntu:~/btreesearchitem/test$
$
```

5
subjects/btreetransplant/README.md

@ -39,11 +39,10 @@ func main() {
And its output :
```console
student@ubuntu:~/btreetransplant/test$ go build
student@ubuntu:~/btreetransplant/test$ ./test
$ go run .
3
4
5
7
student@ubuntu:~/btreetransplant/test$
$
```

5
subjects/capitalize/README.md

@ -34,8 +34,7 @@ func main() {
And its output :
```console
student@ubuntu:~/capitalize/test$ go build
student@ubuntu:~/capitalize/test$ ./test
$ go run .
Hello! How Are You? How+Are+Things+4you?
student@ubuntu:~/capitalize/test$
$
```

4
subjects/capitalizing/README.md

@ -38,9 +38,9 @@ fn main() {
And its output
```consoole
student@ubuntu:~/capitalizing/test$ cargo run
$ cargo run
Joe is missing
Jill Is Leaving A
HEllO thERE
student@ubuntu:~/capitalizing/test$
$
```

4
subjects/card_deck/README.md

@ -82,7 +82,7 @@ fn main() {
And its output
```console
student@ubuntu:~/card_deck/test$ cargo run
$ cargo run
Your card is Card { suit: Club, rank: Ace }
student@ubuntu:~/card_deck/test$
$
```

19
subjects/cat/README.md

@ -9,26 +9,25 @@ Write a program that behaves like a simplified `cat` command.
- If the program is called without arguments it should take the standard input (stdin) and print it back on the standard output (stdout).
```console
student@ubuntu:~/cat$ echo '"Programming is a skill best acquired by practice and example rather than from books" by Alan Turing' > quest8.txt
student@ubuntu:~/cat$ cat <<EOF> quest8T.txt
$ echo '"Programming is a skill best acquired by practice and example rather than from books" by Alan Turing' > quest8.txt
$ cat <<EOF> quest8T.txt
"Alan Mathison Turing was an English mathematician, computer scientist, logician, cryptanalyst. Turing was highly influential in the development of theoretical computer science, providing a formalisation of the concepts of algorithm and computation with the Turing machine, which can be considered a model of a general-purpose computer. Turing is widely considered to be the father of theoretical computer science and artificial intelligence."
EOF
student@ubuntu:~/cat$ go build
student@ubuntu:~/cat$ ./cat abc
$ go run . abc
ERROR: abc: No such file or directory
student@ubuntu:~/cat$ ./cat quest8.txt
$ go run . quest8.txt
"Programming is a skill best acquired by pratice and example rather than from books" by Alan Turing
student@ubuntu:~/cat$ ./cat quest8.txt abc
$ go run . quest8.txt abc
"Programming is a skill best acquired by pratice and example rather than from books" by Alan Turing
ERROR: abc: No such file or directory
student@ubuntu:~/cat$ cat quest8.txt | ./cat
$ cat quest8.txt | ./cat
"Programming is a skill best acquired by pratice and example rather than from books" by Alan Turing
student@ubuntu:~/cat$ ./cat
$ go run .
Hello
Hello
^C
student@ubuntu:~/cat$ ./cat quest8.txt quest8T.txt
$ go run . quest8.txt quest8T.txt
"Programming is a skill best acquired by pratice and example rather than from books" by Alan Turing
"Alan Mathison Turing was an English mathematician, computer scientist, logician, cryptanalyst. Turing was highly influential in the development of theoretical computer science, providing a formalisation of the concepts of algorithm and computation with the Turing machine, which can be considered a model of a general-purpose computer. Turing is widely considered to be the father of theoretical computer science and artificial intelligence."
student@ubuntu:~/cat$
$
```

4
subjects/changeorder/README.md

@ -54,7 +54,7 @@ func main() {
Its output:
```console
$ go build
$ ./main
$ go run .
1 -> 3 -> 5 -> 2 -> 4
$
```

4
subjects/changes/README.md

@ -54,8 +54,8 @@ fn main() {
And its expected output
```console
student@ubuntu:~/changes/test$ cargo run
$ cargo run
brightness = 0
new brightness = 200
student@ubuntu:~/changes/test$
$
```

5
subjects/chunk/README.md

@ -33,12 +33,11 @@ func main() {
And its output :
```console
student@ubuntu:~/chunk/test$ go build
student@ubuntu:~/chunk/test$ ./test
$ go run .
[]
[[0 1 2] [3 4 5] [6 7]]
[[0 1 2 3 4] [5 6 7]]
[[0 1 2 3] [4 5 6 7]]
student@ubuntu:~/chunk/test$
$
```

4
subjects/cipher/README.md

@ -48,9 +48,9 @@ fn main() {
And its output:
```console
student@ubuntu:~/cipher/test$ cargo run
$ cargo run
Some(Ok(true))
Some(Err(CipherError { validation: false, expected: "1Svool 2dliow!" }))
None
student@ubuntu:~/cipher/test$
$
```

4
subjects/circle/README.md

@ -93,11 +93,11 @@ fn main() {
And its output
```console
student@ubuntu:~/circle/test$ cargo run
$ cargo run
circle = Circle { center: Point { x: 500.0, y: 500.0 }, radius: 150.0 } area = 70685.83470577035
circle = Circle { center: Point { x: 500.0, y: 500.0 }, radius: 150.0 } diameter = 300
circle1 = Circle { center: Point { x: 80.0, y: 115.0 }, radius: 30.0 } diameter = 60
circle and circle1 intersect = false
distance between Point { x: 1.0, y: 1.0 } and Point { x: 0.0, y: 0.0 } is 1.4142135623730951
student@ubuntu:~/circle/test$
$
```

4
subjects/cl-camp2/README.md

@ -11,7 +11,7 @@ A line is a sequence of characters preceding the [end of line](https://en.wikipe
### Usage
```console
student@ubuntu:~/cl-camp2/test$ cat -e r
$ cat -e r
R$
student@ubuntu:~/cl-camp2/test$
$
```

6
subjects/cl-camp4/README.md

@ -17,8 +17,8 @@ Create a file `myfamily.sh`, which will show a subject's family (key: relatives)
### Usage
```console
student@ubuntu:~/cl-camp4/test$ export HERO_ID=1
student@ubuntu:~/cl-camp4/test$ ./myfamily.sh
$ export HERO_ID=1
$ ./myfamily.sh
Marlo Chandler-Jones (wife); Polly (aunt); Mrs. Chandler (mother-in-law); Keith Chandler, Ray Chandler, three unidentified others (brothers-in-law); unidentified father (deceased); Jackie Shorr (alleged mother; unconfirmed)
student@ubuntu:~/cl-camp4/test$
$
```

4
subjects/cl-camp5/README.md

@ -13,11 +13,11 @@ That command will only show the name of the files without the `.sh`.
### Usage
```console
student@ubuntu:~/cl-camp5/test$ ./lookagain.sh | cat -e
$ ./lookagain.sh | cat -e
file1$
file2$
file3$
student@ubuntu:~/cl-camp5/test$
$
```
### Hint

4
subjects/cl-camp6/README.md

@ -9,7 +9,7 @@ Create a file `countfiles.sh`, which will print the number **(and only the numbe
### Usage
```console
student@ubuntu:~/cl-camp6/test$ ./countfiles.sh | cat -e
$ ./countfiles.sh | cat -e
12$
student@ubuntu:~/cl-camp6/test$
$
```

4
subjects/cl-camp7/README.md

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

11
subjects/cleanstr/README.md

@ -17,13 +17,12 @@ program displays nothing.
### Usage :
```console
student@ubuntu:~/cleanstr$ go build
student@ubuntu:~/cleanstr$ ./cleanstr "you see it's easy to display the same thing" | cat -e
$ go run . "you see it's easy to display the same thing" | cat -e
you see it's easy to display the same thing$
student@ubuntu:~/cleanstr$ ./cleanstr " only it's harder "
$ go run . " only it's harder "
only it's harder$
student@ubuntu:~/cleanstr$ ./cleanstr " how funny" "Did you hear Mathilde ?"
$ go run . " how funny" "Did you hear Mathilde ?"
$
$ go run . ""
$
student@ubuntu:~/cleanstr$ ./cleanstr ""
student@ubuntu:~/cleanstr$
```

4
subjects/closures/README.md

@ -35,7 +35,7 @@ fn main() {
And its output:
```console
student@ubuntu:~/closures/test$ cargo run
$ cargo run
All elements in [4, 16, 36, ..., 10000], len = 50
student@ubuntu:~/closures/test$
$
```

5
subjects/collatzcountdown/README.md

@ -35,8 +35,7 @@ func main() {
And its output :
```console
student@ubuntu:~/{{ROOT}}/test$ go build
student@ubuntu:~/{{ROOT}}/test$ ./test
$ go run .
9
student@ubuntu:~/{{ROOT}}/test$
$
```

4
subjects/collect/README.md

@ -32,8 +32,8 @@ fn main() {
And its output:
```console
student@ubuntu:~/collect/test$ cargo run
$ cargo run
[1, 2, 3, 4, 5, 7]
[1, 2, 3, 4, 5, 7]
student@ubuntu:~/collect/test$
$
```

7
subjects/comcheck/README.md

@ -11,10 +11,9 @@ Write a program `comcheck` that displays on the standard output `Alert!!!` follo
### Usage
```console
student@ubuntu:~/comcheck$ go build
student@ubuntu:~/comcheck$ ./comcheck "I" "Will" "Enter" "the" "galaxy"
$ go run . "I" "Will" "Enter" "the" "galaxy"
Alert!!!
student@ubuntu:~/comcheck$ ./comcheck "galaxy 01" "do" "you" "hear" "me"
$ go run . "galaxy 01" "do" "you" "hear" "me"
Alert!!!
student@ubuntu:~/comcheck$
$
```

4
subjects/commits_stats/README.md

@ -51,8 +51,8 @@ fn main() {
And its output:
```console
student@ubuntu:~/commits_stats/test$ cargo run
$ cargo run
{"2020-W44": 5, "2020-W36": 1, "2020-W31": 1, ... ,"2020-W45": 4, "2020-W46": 4}
{"homembaixinho": 2, "mwenzkowski": 3, ... ,"tamirzb": 1, "paul-ri": 2, "RPigott": 1}
student@ubuntu:~/commits_stats/test$
$
```

5
subjects/compact/README.md

@ -53,8 +53,7 @@ func main() {
And its output :
```console
student@ubuntu:~/compact/test$ go build
student@ubuntu:~/compact/test$ ./test
$ go run .
a
b
@ -65,5 +64,5 @@ Size after compacting: 3
a
b
c
student@ubuntu:~/compact/test$
$
```

5
subjects/compare/README.md

@ -34,10 +34,9 @@ func main() {
And its output :
```console
student@ubuntu:~/compare/test$ go build
student@ubuntu:~/compare/test$ ./test
$ go run .
0
-1
1
student@ubuntu:~/compare/test$
$
```

5
subjects/concat/README.md

@ -33,8 +33,7 @@ func main() {
And its output :
```console
student@ubuntu:~/concat/test$ go build
student@ubuntu:~/concat/test$ ./test
$ go run .
Hello! How are you?
student@ubuntu:~/concat/test$
$
```

5
subjects/concatparams/README.md

@ -34,11 +34,10 @@ func main() {
And its output :
```console
student@ubuntu:~/concatparams/test$ go build
student@ubuntu:~/concatparams/test$ ./test
$ go run .
Hello
how
are
you?
student@ubuntu:~/concatparams/test$
$
```

5
subjects/convertbase/README.md

@ -37,8 +37,7 @@ func main() {
And its output :
```console
student@ubuntu:~/convertbase/test$ go build
student@ubuntu:~/convertbase/test$ ./test
$ go run .
43
student@ubuntu:~/convertbase/test$
$
```

4
subjects/copy/README.md

@ -60,9 +60,9 @@ fn main() {
And its output:
```console
student@ubuntu:~/copy/test$ cargo run
$ cargo run
(0, 1.0, inf)
("1 2 4 5 6", "2.718281828459045 7.38905609893065 54.598150033144236 148.4131591025766 403.4287934927351")
([1, 2, 4, 5], [0.0, 0.6931471805599453, 1.3862943611198906, 1.6094379124341003])
student@ubuntu:~/copy/test$
$
```

5
subjects/costumeprofit/README.md

@ -16,9 +16,10 @@ Input will be given as 6 arguments, your output should be displayed as standard
In the output put '\n' at the end.
Input: `./main **a** **b** **c** **d** **e** **f**`
Input: `go run . **a** **b** **c** **d** **e** **f**`
```console
$ ./main 12 11 13 20 4 6
$ go run . 12 11 13 20 4 6
102
$
```

5
subjects/countdown/README.md

@ -7,8 +7,7 @@ Write a program that displays all digits in descending order, followed by a newl
### Usage
```console
student@ubuntu:~/countdown/test$ go build
student@ubuntu:~/countdown/test$ ./test
$ go run .
9876543210
student@ubuntu:~/countdown/test$
$
```

5
subjects/countif/README.md

@ -37,9 +37,8 @@ func main() {
And its output :
```console
student@ubuntu:~/countif/test$ go build
student@ubuntu:~/countif/test$ ./test
$ go run .
0
2
student@ubuntu:~/countif/test$
$
```

4
subjects/counting_words/README.md

@ -42,9 +42,9 @@ fn main() {
And its output:
```console
student@ubuntu:~/counting_words/test$ cargo run
$ cargo run
{"hello": 1, "world": 1}
{"and": 2, "human": 1, "universe": 2, "the": 2, "i\'m": 1, "about": 1, "einstein": 1, "are": 1, "infinite": 1, "sure": 1, "albert": 1, "two": 1, "things": 1, "not": 1, "stupidity": 1}
{"batman": 3, "stop": 2}
student@ubuntu:~/counting_words/test$
$
```

5
subjects/createelem/README.md

@ -38,8 +38,7 @@ func main() {
And its output :
```console
student@ubuntu:~/createelem/test$ go build
student@ubuntu:~/createelem/test$ ./test
$ go run .
&{1234}
student@ubuntu:~/createelem/test$
$
```

4
subjects/delete_prefix/README.md

@ -27,8 +27,8 @@ fn main() {
And its output:
```console
student@ubuntu:~/delete_prefix/test$ cargo run
$ cargo run
Some("cdefghijklmnop")
None
student@ubuntu:~/delete_prefix/test$
$
```

4
subjects/diamond_creation/README.md

@ -43,8 +43,8 @@ fn main() {
And its output:
```console
student@ubuntu:~/diamond_creation/test$ cargo run
$ cargo run
["A"]
[" A ", " B B ", "C C", " B B ", " A "]
student@ubuntu:~/diamond_creation/test$
$
```

4
subjects/display_table/README.md

@ -74,11 +74,11 @@ fn main() {
And its output:
```console
student@ubuntu:~/display_table/test$ cargo run
$ cargo run
| Model | Piece N° | In Stock | Description |
|---------+-------------+-----------+-------------|
| model 1 | 43-EWQE304 | 30 | Piece for x |
| model 2 | 98-QCVX5433 | 100000000 | - |
| model y | 78-NMNH | 60 | nothing |
student@ubuntu:~/display_table/test$
$
```

9
subjects/displaya/README.md

@ -9,12 +9,11 @@ If the number of arguments is not 1, the program displays an `a` followed by a n
### Usage
```console
student@ubuntu:~/displaya/test$ go build
student@ubuntu:~/displaya/test$ ./test "abc"
$ go run . "abc"
a
student@ubuntu:~/displaya/test$ ./test "bcvbvA"
$ go run . "bcvbvA"
a
student@ubuntu:~/displaya/test$ ./test "nbv"
$ go run . "nbv"
a
student@ubuntu:~/displaya/test$
$
```

5
subjects/displayalpham/README.md

@ -7,8 +7,7 @@ Write a program that displays the alphabet, with even letters in uppercase, and
### Usage
```console
student@ubuntu:~/displayalpham$ go build
student@ubuntu:~/displayalpham$ ./displayalpham | cat -e
$ go run . | cat -e
aBcDeFgHiJkLmNoPqRsTuVwXyZ$
student@ubuntu:~/displayalpham$
$
```

5
subjects/displayalrevm/README.md

@ -7,8 +7,7 @@ Write a program that displays the alphabet in reverse, with even letters in uppe
### Usage
```console
student@ubuntu:~/displayalrevm$ go build
student@ubuntu:~/displayalrevm$ ./displayalrevm | cat -e
$ go run . | cat -e
zYxWvUtSrQpOnMlKjIhGfEdCbA$
student@ubuntu:~/displayalrevm$
$
```

11
subjects/displayfile/README.md

@ -7,13 +7,12 @@ Write a program that displays, on the standard output, the content of a file giv
### Usage :
```console
student@ubuntu:~/displayfile$ go build
student@ubuntu:~/displayfile$ ./displayfile
$ go run .
File name missing
student@ubuntu:~/displayfile$ echo "Almost there!!" > quest8.txt
student@ubuntu:~/displayfile$ ./displayfile quest8.txt main.go
$ echo "Almost there!!" > quest8.txt
$ go run . quest8.txt main.go
Too many arguments
student@ubuntu:~/displayfile$ ./displayfile quest8.txt
$ go run . quest8.txt
Almost there!!
student@ubuntu:~/displayfile$
$
```

9
subjects/displayfirstparam/README.md

@ -7,11 +7,10 @@ Write a program that displays its first argument, if there is one.
### Usage
```console
student@ubuntu:~/displayfirstparam/test$ go build
student@ubuntu:~/displayfirstparam/test$ ./test hello there
$ go run . hello there
hello
student@ubuntu:~/displayfirstparam/test$ ./test "hello there" how are you
$ go run . "hello there" how are you
hello there
student@ubuntu:~/displayfirstparam/test$ ./test
student@ubuntu:~/displayfirstparam/test$
$ go run .
$
```

11
subjects/displaylastparam/README.md

@ -7,13 +7,12 @@ Write a program that displays its last argument, if there is one.
### Usage
```console
student@ubuntu:~/displaylastparam/test$ go build
student@ubuntu:~/displaylastparam/test$ ./test hello there
$ go run . hello there
there
student@ubuntu:~/displaylastparam/test$ ./test "hello there" how are you
$ go run . "hello there" how are you
you
student@ubuntu:~/displaylastparam/test$ ./test "hello there"
$ go run . "hello there"
hello there
student@ubuntu:~/displaylastparam/test$ ./test
student@ubuntu:~/displaylastparam/test$
$ go run .
$
```

9
subjects/displayz/README.md

@ -9,12 +9,11 @@ If the number of arguments is not 1, the program displays an `z` followed by a n
### Usage
```console
student@ubuntu:~/displayz/test$ go build
student@ubuntu:~/displayz/test$ ./test "xyz"
$ go run . "xyz"
z
student@ubuntu:~/displayz/test$ ./test "bcvbvZ"
$ go run . "bcvbvZ"
z
student@ubuntu:~/displayz/test$ ./test "nbv"
$ go run . "nbv"
z
student@ubuntu:~/displayz/test$ ./test
$ go run .
```

4
subjects/division_and_remainder/README.md

@ -41,7 +41,7 @@ fn main() {
And its output
```console
student@ubuntu:~/division_and_remainder/test$ cargo run
$ cargo run
9/4: division = 2, remainder = 1
student@ubuntu:~/division_and_remainder/test$
$
```

5
subjects/divmod/README.md

@ -42,9 +42,8 @@ func main() {
And its output :
```console
student@ubuntu:~/divmod/test$ go build
student@ubuntu:~/divmod/test$ ./test
$ go run .
6
1
student@ubuntu:~/divmod/test$
$
```

25
subjects/doop/README.md

@ -17,25 +17,24 @@ The program has to handle the modulo and division operations by 0 as shown on th
### Usage
```console
student@ubuntu:~/doop/test$ go build doop.go
student@ubuntu:~/doop/test$ ./doop
student@ubuntu:~/doop/test$ ./doop 1 + 1 | cat -e
$ go run .
$ go run . 1 + 1 | cat -e
2$
student@ubuntu:~/doop/test$ ./doop hello + 1
student@ubuntu:~/doop/test$ ./doop 1 p 1
student@ubuntu:~/doop/test$ ./doop 1 / 0 | cat -e
$ go run . hello + 1
$ go run . 1 p 1
$ go run . 1 / 0 | cat -e
No division by 0$
student@ubuntu:~/doop/test$ ./doop 1 % 0 | cat -e
$ go run . 1 % 0 | cat -e
No modulo by 0$
student@ubuntu:~/doop/test$ ./doop 9223372036854775807 + 1
$ go run . 9223372036854775807 + 1
0
student@ubuntu:~/doop/test$ ./doop -9223372036854775809 - 3
$ go run . -9223372036854775809 - 3
0
student@ubuntu:~/doop/test$ ./doop 9223372036854775807 "*" 3
$ go run . 9223372036854775807 "*" 3
0
student@ubuntu:~/doop/test$ ./doop 1 "*" 1
$ go run . 1 "*" 1
1
student@ubuntu:~/doop/test$ ./doop 1 "*" -1
$ go run . 1 "*" -1
-1
student@ubuntu:~/doop/test$
$
```

4
subjects/doubtful/README.md

@ -38,8 +38,8 @@ fn main() {
And its output
```console
student@ubuntu:~/doubtful/test$ cargo run
$ cargo run
Before changing the string: Hello
After changing the string: Hello?
student@ubuntu:~/doubtful/test$
$
```

4
subjects/drop_the_thread/README.md

@ -105,9 +105,9 @@ fn main() {
And its output:
```console
student@ubuntu:~/drop_the_thread/test$ cargo run
$ cargo run
(true, 0, Cell { value: 1 })
(true, 1, Cell { value: 2 })
(false, 2, Cell { value: 2 }, 1)
student@ubuntu:~/drop_the_thread/test$
$
```

4
subjects/easy_traits/README.md

@ -42,8 +42,8 @@ fn main() {
And its output
```console
student@ubuntu:~/easy_traits/test$ cargo run
$ cargo run
hello world
["one", "two", "three"]
student@ubuntu:~/easy_traits/test$
$
```

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

Loading…
Cancel
Save