From 46f4ddc49e2b480abed32e59a02bad089b6d2e9b Mon Sep 17 00:00:00 2001 From: xpetit <32063953+xpetit@users.noreply.github.com> Date: Wed, 28 Apr 2021 11:47:34 +0200 Subject: [PATCH] Simplify prompt, execution of Go programs, fix typos --- docs/addition_of_exercise_draft.md | 30 ++--- subjects/abort/README.md | 5 +- subjects/activebits/README.md | 5 +- subjects/adding/README.md | 4 +- subjects/adding_twice/README.md | 4 +- subjects/addlinkednumbers/README.md | 5 +- subjects/addprimesum/README.md | 15 +-- subjects/advancedsortwordarr/README.md | 5 +- subjects/alphacount/README.md | 5 +- subjects/alphamirror/README.md | 9 +- subjects/any/README.md | 5 +- subjects/appendrange/README.md | 5 +- subjects/arrange_it/README.md | 4 +- subjects/arrays/README.md | 4 +- subjects/ascii-art/README.md | 13 +- subjects/ascii-art/fs/README.md | 9 +- subjects/ascii-art/justify/README.md | 11 +- subjects/ascii-art/output/README.md | 11 +- subjects/ascii-art/reverse/README.md | 7 +- subjects/atoi/README.md | 5 +- subjects/atoibase/README.md | 5 +- subjects/balancedstring/README.md | 10 +- subjects/banner/README.md | 4 +- subjects/basicatoi/README.md | 5 +- subjects/basicatoi2/README.md | 5 +- subjects/basicjoin/README.md | 5 +- subjects/bigger/README.md | 4 +- subjects/blood_types/README.md | 4 +- subjects/blood_types_s/README.md | 4 +- subjects/boolean/README.md | 5 +- subjects/border_cross/README.md | 4 +- subjects/borrow/README.md | 6 +- subjects/borrow_box/README.md | 4 +- subjects/borrow_me_the_reference/README.md | 4 +- subjects/box_it/README.md | 4 +- subjects/box_recursion/README.md | 4 +- subjects/boxing_todo/README.md | 4 +- subjects/brackets/README.md | 10 +- subjects/brackets_matching/README.md | 10 +- subjects/brainfuck/README.md | 11 +- subjects/btreeapplybylevel/README.md | 5 +- subjects/btreeapplyinorder/README.md | 5 +- subjects/btreeapplypostorder/README.md | 5 +- subjects/btreeapplypreorder/README.md | 5 +- subjects/btreedeletenode/README.md | 5 +- subjects/btreeinsertdata/README.md | 5 +- subjects/btreeisbinary/README.md | 5 +- subjects/btreelevelcount/README.md | 5 +- subjects/btreemax/README.md | 5 +- subjects/btreemin/README.md | 5 +- subjects/btreeprintroot/README.md | 5 +- subjects/btreesearchitem/README.md | 5 +- subjects/btreetransplant/README.md | 5 +- subjects/capitalize/README.md | 5 +- subjects/capitalizing/README.md | 4 +- subjects/card_deck/README.md | 4 +- subjects/cat/README.md | 19 ++- subjects/changeorder/README.md | 4 +- subjects/changes/README.md | 4 +- subjects/chunk/README.md | 5 +- subjects/cipher/README.md | 4 +- subjects/circle/README.md | 4 +- subjects/cl-camp2/README.md | 4 +- subjects/cl-camp4/README.md | 6 +- subjects/cl-camp5/README.md | 4 +- subjects/cl-camp6/README.md | 4 +- subjects/cl-camp7/README.md | 4 +- subjects/cleanstr/README.md | 11 +- subjects/closures/README.md | 4 +- subjects/collatzcountdown/README.md | 5 +- subjects/collect/README.md | 4 +- subjects/comcheck/README.md | 7 +- subjects/commits_stats/README.md | 4 +- subjects/compact/README.md | 5 +- subjects/compare/README.md | 5 +- subjects/concat/README.md | 5 +- subjects/concatparams/README.md | 5 +- subjects/convertbase/README.md | 5 +- subjects/copy/README.md | 4 +- subjects/costumeprofit/README.md | 5 +- subjects/countdown/README.md | 5 +- subjects/countif/README.md | 5 +- subjects/counting_words/README.md | 4 +- subjects/createelem/README.md | 5 +- subjects/delete_prefix/README.md | 4 +- subjects/diamond_creation/README.md | 4 +- subjects/display_table/README.md | 4 +- subjects/displaya/README.md | 9 +- subjects/displayalpham/README.md | 5 +- subjects/displayalrevm/README.md | 5 +- subjects/displayfile/README.md | 11 +- subjects/displayfirstparam/README.md | 9 +- subjects/displaylastparam/README.md | 11 +- subjects/displayz/README.md | 9 +- subjects/division_and_remainder/README.md | 4 +- subjects/divmod/README.md | 5 +- subjects/doop/README.md | 25 ++-- subjects/doubtful/README.md | 4 +- subjects/drop_the_thread/README.md | 4 +- subjects/easy_traits/README.md | 4 +- subjects/edit_distance/README.md | 4 +- subjects/eightqueens/README.md | 3 +- subjects/enigma/README.md | 5 +- subjects/ephemeris/README.md | 2 +- subjects/error_types/README.md | 4 +- subjects/events/README.md | 4 +- subjects/expandstr/README.md | 11 +- subjects/explain/README.md | 4 +- subjects/fib/README.md | 5 +- subjects/fibonacci/README.md | 5 +- subjects/fibonacci2/README.md | 4 +- subjects/filter_table/README.md | 4 +- subjects/find_factorial/README.md | 6 +- subjects/findnextprime/README.md | 5 +- subjects/findprevprime/README.md | 5 +- subjects/firstrune/README.md | 5 +- subjects/firstword/README.md | 11 +- subjects/flags/README.md | 21 ++- subjects/flat_tree/README.md | 4 +- subjects/foldint/README.md | 5 +- subjects/foreach/README.md | 5 +- subjects/fprime/README.md | 19 ++- subjects/game23/README.md | 5 +- subjects/gcd/README.md | 15 +-- subjects/generics/README.md | 4 +- subjects/get_products/README.md | 4 +- subjects/go-reloaded/README.md | 131 ++++++++----------- subjects/groceries/README.md | 4 +- subjects/grouping/README.md | 13 +- subjects/halfcontest/README.md | 5 +- subjects/handling/README.md | 4 +- subjects/hashing/README.md | 4 +- subjects/hello/README.md | 5 +- subjects/hiddenp/README.md | 13 +- subjects/highest/README.md | 4 +- subjects/how_many_references/README.md | 4 +- subjects/index/README.md | 5 +- subjects/insertion_sort/README.md | 4 +- subjects/inter/README.md | 7 +- subjects/interestingnumber/README.md | 5 +- subjects/introduction/README.md | 4 +- subjects/inv_pyramid/README.md | 4 +- subjects/isalpha/README.md | 5 +- subjects/isanagram/README.md | 6 +- subjects/islower/README.md | 5 +- subjects/isnumeric/README.md | 5 +- subjects/ispowerof2/README.md | 13 +- subjects/isprime/README.md | 5 +- subjects/isprintable/README.md | 5 +- subjects/issorted/README.md | 5 +- subjects/isupper/README.md | 5 +- subjects/iterativefactorial/README.md | 5 +- subjects/iterativepower/README.md | 5 +- subjects/iterators/README.md | 4 +- subjects/join/README.md | 5 +- subjects/lalgebra_scalar/README.md | 4 +- subjects/lalgebra_vector/README.md | 4 +- subjects/lastrune/README.md | 5 +- subjects/lastup/README.md | 4 +- subjects/lastword/README.md | 13 +- subjects/lcm/README.md | 5 +- subjects/lem-in/README.md | 12 +- subjects/lem-in/audit/README.md | 34 ++--- subjects/lifetimes/README.md | 4 +- subjects/listat/README.md | 5 +- subjects/listclear/README.md | 5 +- subjects/listfind/README.md | 5 +- subjects/listforeach/README.md | 5 +- subjects/listforeachif/README.md | 6 +- subjects/listlast/README.md | 5 +- subjects/listmerge/README.md | 5 +- subjects/listpushback/README.md | 5 +- subjects/listpushfront/README.md | 5 +- subjects/listpushpara/README.md | 5 +- subjects/listpushparams/README.md | 5 +- subjects/listremoveif/README.md | 5 +- subjects/listreverse/README.md | 5 +- subjects/listsize/README.md | 5 +- subjects/listsort/README.md | 5 +- subjects/logic_number/README.md | 4 +- subjects/lunch_queue/README.md | 4 +- subjects/makerange/README.md | 5 +- subjects/map/README.md | 5 +- subjects/matrix/README.md | 4 +- subjects/matrix_display/README.md | 4 +- subjects/matrix_mult/README.md | 4 +- subjects/matrix_ops/README.md | 4 +- subjects/matrix_transposition/README.md | 4 +- subjects/matrix_transposition_4by3/README.md | 4 +- subjects/max/README.md | 5 +- subjects/merge/README.md | 5 +- subjects/name_initials/README.md | 4 +- subjects/nauuo/README.md | 5 +- subjects/nbrconvertalpha/README.md | 13 +- subjects/nenokku/README.md | 3 +- subjects/net-cat/README.md | 18 +-- subjects/now-get-to-work/README.md | 4 +- subjects/nrune/README.md | 5 +- subjects/options/README.md | 23 ++-- subjects/ordinal/README.md | 4 +- subjects/ownership/README.md | 4 +- subjects/pangram/README.md | 4 +- subjects/panic/README.md | 4 +- subjects/paramcount/README.md | 9 +- subjects/pig_latin/README.md | 4 +- subjects/piglatin/README.md | 15 +-- subjects/point/README.md | 5 +- subjects/pointone/README.md | 5 +- subjects/printalphabetalt/README.md | 5 +- subjects/printalphabetalt2/README.md | 5 +- subjects/printalphabetg/README.md | 5 +- subjects/printalt/README.md | 5 +- subjects/printalt2/README.md | 5 +- subjects/printaltu/README.md | 5 +- subjects/printaltu2/README.md | 5 +- subjects/printbits/README.md | 19 ++- subjects/printchessboard/README.md | 9 +- subjects/printhex/README.md | 13 +- subjects/printmemory/README.md | 5 +- subjects/printnbrbase/README.md | 5 +- subjects/printnbrinorder/README.md | 5 +- subjects/printparams/README.md | 5 +- subjects/printprogramname/README.md | 14 +- subjects/printrevcomb/README.md | 5 +- subjects/printreversealphabetalt/README.md | 5 +- subjects/printreversealphabetalt2/README.md | 5 +- subjects/printreversealphabetg/README.md | 5 +- subjects/printrot/README.md | 13 +- subjects/printstr/README.md | 5 +- subjects/printwordstables/README.md | 5 +- subjects/priorprime/README.md | 5 +- subjects/profanity_filter/README.md | 4 +- subjects/project_motion/README.md | 4 +- subjects/push-swap/README.md | 29 ++-- subjects/quad/README.md | 100 ++++++-------- subjects/quadchecker/README.md | 27 ++-- subjects/queens/README.md | 4 +- subjects/question_mark/README.md | 4 +- subjects/range/README.md | 11 +- subjects/reachablenumber/README.md | 5 +- subjects/rectangle/README.md | 5 +- subjects/recursivefactorial/README.md | 5 +- subjects/recursivepower/README.md | 5 +- subjects/reduceint/README.md | 5 +- subjects/ref_cell/README.md | 4 +- subjects/repeatalpha/README.md | 13 +- subjects/reverse/README.md | 5 +- subjects/reverse_it/README.md | 4 +- subjects/reverse_string/README.md | 4 +- subjects/reverserange/README.md | 13 +- subjects/reversestrcap/README.md | 9 +- subjects/revivethreenums/README.md | 5 +- subjects/revparams/README.md | 5 +- subjects/revwstr/README.md | 11 +- subjects/rgb_match/README.md | 4 +- subjects/robottoorigin/README.md | 5 +- subjects/roman_numbers/README.md | 4 +- subjects/roman_numbers_iter/README.md | 4 +- subjects/romannumbers/README.md | 13 +- subjects/rostring/README.md | 11 +- subjects/rot/README.md | 4 +- subjects/rot13/README.md | 11 +- subjects/rot14/README.md | 5 +- subjects/rot21/README.md | 4 +- subjects/rotatevowels/README.md | 15 +-- subjects/rpncalc/README.md | 13 +- subjects/sales/README.md | 4 +- subjects/sametree/README.md | 5 +- subjects/scores/README.md | 4 +- subjects/scytale_cipher/README.md | 4 +- subjects/searching/README.md | 4 +- subjects/searchreplace/README.md | 9 +- subjects/simple_hash/README.md | 4 +- subjects/slice/README.md | 3 +- subjects/slices_to_map/README.md | 4 +- subjects/sortedlistmerge/README.md | 5 +- subjects/sortintegertable/README.md | 5 +- subjects/sortlistinsert/README.md | 5 +- subjects/sortll/README.md | 4 +- subjects/sortparams/README.md | 5 +- subjects/sortwordarr/README.md | 5 +- subjects/speed_transformation/README.md | 4 +- subjects/spelling/README.md | 4 +- subjects/split/README.md | 5 +- subjects/splitwhitespaces/README.md | 5 +- subjects/sqrt/README.md | 5 +- subjects/stars/README.md | 4 +- subjects/step_iterator/README.md | 4 +- subjects/stock-exchange-sim/README.md | 25 ++-- subjects/stock-exchange-sim/audit/README.md | 40 +++--- subjects/string_literals/README.md | 4 +- subjects/string_permutation/README.md | 4 +- subjects/strings/README.md | 4 +- subjects/strlen/README.md | 5 +- subjects/strrev/README.md | 5 +- subjects/sudoku/README.md | 13 +- subjects/swap/README.md | 5 +- subjects/sweetproblem/README.md | 5 +- subjects/switchcase/README.md | 7 +- subjects/tabmult/README.md | 9 +- subjects/talking/README.md | 4 +- subjects/temperature_conv/README.md | 4 +- subjects/tetris-optimizer/README.md | 12 +- subjects/tic_tac_toe/README.md | 4 +- subjects/to-git-or-not-to-git/README.md | 1 - subjects/to_url/README.md | 4 +- subjects/tolower/README.md | 5 +- subjects/toupper/README.md | 5 +- subjects/traits/README.md | 4 +- subjects/trimatoi/README.md | 5 +- subjects/tuples/README.md | 4 +- subjects/twosum/README.md | 5 +- subjects/ultimatedivmod/README.md | 5 +- subjects/ultimatepointone/README.md | 5 +- subjects/union/README.md | 13 +- subjects/uniqueoccurences/README.md | 7 +- subjects/unmatch/README.md | 5 +- subjects/unwrap_or_expect/README.md | 2 +- subjects/vector_operations/README.md | 4 +- subjects/vehicles/README.md | 4 +- subjects/volumechanger/README.md | 5 +- subjects/wdmatch/README.md | 13 +- subjects/wget/README.md | 24 ++-- subjects/ztail/README.md | 6 +- 324 files changed, 1047 insertions(+), 1280 deletions(-) diff --git a/docs/addition_of_exercise_draft.md b/docs/addition_of_exercise_draft.md index 7614115d..83bab153 100644 --- a/docs/addition_of_exercise_draft.md +++ b/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$ +$ ``` --- diff --git a/subjects/abort/README.md b/subjects/abort/README.md index 2699d236..f1a9b7b6 100644 --- a/subjects/abort/README.md +++ b/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$ +$ ``` diff --git a/subjects/activebits/README.md b/subjects/activebits/README.md index 12c2168b..1ee3b24b 100644 --- a/subjects/activebits/README.md +++ b/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$ +$ ``` diff --git a/subjects/adding/README.md b/subjects/adding/README.md index 9a4b9308..9da6b4b4 100644 --- a/subjects/adding/README.md +++ b/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$ +$ ``` diff --git a/subjects/adding_twice/README.md b/subjects/adding_twice/README.md index 4055a896..93ffbd05 100644 --- a/subjects/adding_twice/README.md +++ b/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$ +$ ``` diff --git a/subjects/addlinkednumbers/README.md b/subjects/addlinkednumbers/README.md index b509af27..37b79426 100644 --- a/subjects/addlinkednumbers/README.md +++ b/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$ +$ ``` diff --git a/subjects/addprimesum/README.md b/subjects/addprimesum/README.md index 3c392971..fceffc5a 100644 --- a/subjects/addprimesum/README.md +++ b/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$ +$ ``` diff --git a/subjects/advancedsortwordarr/README.md b/subjects/advancedsortwordarr/README.md index d6e7f91a..7052b9a0 100644 --- a/subjects/advancedsortwordarr/README.md +++ b/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$ +$ ``` diff --git a/subjects/alphacount/README.md b/subjects/alphacount/README.md index e0bff875..9e35d6cd 100644 --- a/subjects/alphacount/README.md +++ b/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$ +$ ``` diff --git a/subjects/alphamirror/README.md b/subjects/alphamirror/README.md index edfb537d..9cc8a414 100644 --- a/subjects/alphamirror/README.md +++ b/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 . +$ ``` diff --git a/subjects/any/README.md b/subjects/any/README.md index f9ca5e6a..2ffb56b4 100644 --- a/subjects/any/README.md +++ b/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$ +$ ``` diff --git a/subjects/appendrange/README.md b/subjects/appendrange/README.md index 894d5f5e..63fb05a4 100644 --- a/subjects/appendrange/README.md +++ b/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$ +$ ``` diff --git a/subjects/arrange_it/README.md b/subjects/arrange_it/README.md index e991fd8a..1da5cfbc 100644 --- a/subjects/arrange_it/README.md +++ b/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$ +$ ``` diff --git a/subjects/arrays/README.md b/subjects/arrays/README.md index 543a6237..c0f2c3cf 100644 --- a/subjects/arrays/README.md +++ b/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$ +$ ``` diff --git a/subjects/ascii-art/README.md b/subjects/ascii-art/README.md index 8acc1c9d..34696297 100644 --- a/subjects/ascii-art/README.md +++ b/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$ +$ ``` diff --git a/subjects/ascii-art/fs/README.md b/subjects/ascii-art/fs/README.md index e8e274eb..9fafef05 100644 --- a/subjects/ascii-art/fs/README.md +++ b/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$ +$ ``` diff --git a/subjects/ascii-art/justify/README.md b/subjects/ascii-art/justify/README.md index 648df8a4..3b6cb656 100644 --- a/subjects/ascii-art/justify/README.md +++ b/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$ | +|$ | ``` diff --git a/subjects/ascii-art/output/README.md b/subjects/ascii-art/output/README.md index ec84de5e..68afb1a6 100644 --- a/subjects/ascii-art/output/README.md +++ b/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$ +$ ``` diff --git a/subjects/ascii-art/reverse/README.md b/subjects/ascii-art/reverse/README.md index dde0400d..e46ebdc3 100644 --- a/subjects/ascii-art/reverse/README.md +++ b/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$ +$ ``` diff --git a/subjects/atoi/README.md b/subjects/atoi/README.md index 291067ba..b5f2f33f 100644 --- a/subjects/atoi/README.md +++ b/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$ +$ ``` diff --git a/subjects/atoibase/README.md b/subjects/atoibase/README.md index 6c6f1cb5..95d30f88 100644 --- a/subjects/atoibase/README.md +++ b/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$ +$ ``` diff --git a/subjects/balancedstring/README.md b/subjects/balancedstring/README.md index a409dd40..ca300a74 100644 --- a/subjects/balancedstring/README.md +++ b/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'. diff --git a/subjects/banner/README.md b/subjects/banner/README.md index 93697348..3580ba91 100644 --- a/subjects/banner/README.md +++ b/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$ +$ ``` diff --git a/subjects/basicatoi/README.md b/subjects/basicatoi/README.md index 804b5913..e91fd4bc 100644 --- a/subjects/basicatoi/README.md +++ b/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$ +$ ``` diff --git a/subjects/basicatoi2/README.md b/subjects/basicatoi2/README.md index b5f9779b..704ca49e 100644 --- a/subjects/basicatoi2/README.md +++ b/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$ +$ ``` diff --git a/subjects/basicjoin/README.md b/subjects/basicjoin/README.md index 68715a5d..c04ce24e 100644 --- a/subjects/basicjoin/README.md +++ b/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$ +$ ``` diff --git a/subjects/bigger/README.md b/subjects/bigger/README.md index 81a54d5f..11e1b175 100644 --- a/subjects/bigger/README.md +++ b/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$ +$ ``` diff --git a/subjects/blood_types/README.md b/subjects/blood_types/README.md index aea3b28a..0c469c6d 100644 --- a/subjects/blood_types/README.md +++ b/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$ +$ ``` diff --git a/subjects/blood_types_s/README.md b/subjects/blood_types_s/README.md index 6a37e178..e8bcdf2c 100644 --- a/subjects/blood_types_s/README.md +++ b/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$ +$ ``` diff --git a/subjects/boolean/README.md b/subjects/boolean/README.md index 5bfabd87..e098eb92 100644 --- a/subjects/boolean/README.md +++ b/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 ``` diff --git a/subjects/border_cross/README.md b/subjects/border_cross/README.md index 3ee9ebae..d7d7e3b7 100644 --- a/subjects/border_cross/README.md +++ b/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$ +$ ``` diff --git a/subjects/borrow/README.md b/subjects/borrow/README.md index fd2977c4..ef4d7b44 100644 --- a/subjects/borrow/README.md +++ b/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$ +$ ``` diff --git a/subjects/borrow_box/README.md b/subjects/borrow_box/README.md index 69cce5bb..7518656a 100644 --- a/subjects/borrow_box/README.md +++ b/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$ +$ ``` diff --git a/subjects/borrow_me_the_reference/README.md b/subjects/borrow_me_the_reference/README.md index c2c529bd..0acde16a 100644 --- a/subjects/borrow_me_the_reference/README.md +++ b/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$ +$ ``` diff --git a/subjects/box_it/README.md b/subjects/box_it/README.md index d084bf14..60ea2492 100644 --- a/subjects/box_it/README.md +++ b/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$ +$ ``` diff --git a/subjects/box_recursion/README.md b/subjects/box_recursion/README.md index 04cc3721..47288a5f 100644 --- a/subjects/box_recursion/README.md +++ b/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$ +$ ``` diff --git a/subjects/boxing_todo/README.md b/subjects/boxing_todo/README.md index b1373458..508a2507 100644 --- a/subjects/boxing_todo/README.md +++ b/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$ +$ ``` diff --git a/subjects/brackets/README.md b/subjects/brackets/README.md index 7c54e241..0fc53b62 100644 --- a/subjects/brackets/README.md +++ b/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 . +$ ``` diff --git a/subjects/brackets_matching/README.md b/subjects/brackets_matching/README.md index 67aa9c6c..21960986 100644 --- a/subjects/brackets_matching/README.md +++ b/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 . +$ ``` diff --git a/subjects/brainfuck/README.md b/subjects/brainfuck/README.md index ab31cfe5..e8a83497 100644 --- a/subjects/brainfuck/README.md +++ b/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 . +$ ``` diff --git a/subjects/btreeapplybylevel/README.md b/subjects/btreeapplybylevel/README.md index 090e53c0..ab87ba0a 100644 --- a/subjects/btreeapplybylevel/README.md +++ b/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$ +$ ``` diff --git a/subjects/btreeapplyinorder/README.md b/subjects/btreeapplyinorder/README.md index 66c018a6..322120c7 100644 --- a/subjects/btreeapplyinorder/README.md +++ b/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$ +$ ``` diff --git a/subjects/btreeapplypostorder/README.md b/subjects/btreeapplypostorder/README.md index 018ff4b0..eb03982e 100644 --- a/subjects/btreeapplypostorder/README.md +++ b/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$ +$ ``` diff --git a/subjects/btreeapplypreorder/README.md b/subjects/btreeapplypreorder/README.md index 259ec701..0174916f 100644 --- a/subjects/btreeapplypreorder/README.md +++ b/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$ +$ ``` diff --git a/subjects/btreedeletenode/README.md b/subjects/btreedeletenode/README.md index 696d80e3..198c1319 100644 --- a/subjects/btreedeletenode/README.md +++ b/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$ +$ ``` diff --git a/subjects/btreeinsertdata/README.md b/subjects/btreeinsertdata/README.md index 43f83930..1d32ee4b 100644 --- a/subjects/btreeinsertdata/README.md +++ b/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$ +$ ``` diff --git a/subjects/btreeisbinary/README.md b/subjects/btreeisbinary/README.md index 218e4d5f..2b85cbb3 100644 --- a/subjects/btreeisbinary/README.md +++ b/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$ +$ ``` diff --git a/subjects/btreelevelcount/README.md b/subjects/btreelevelcount/README.md index 070f3c0f..3cae87f8 100644 --- a/subjects/btreelevelcount/README.md +++ b/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$ +$ ``` diff --git a/subjects/btreemax/README.md b/subjects/btreemax/README.md index 2ede56bb..682d58c1 100644 --- a/subjects/btreemax/README.md +++ b/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$ +$ ``` diff --git a/subjects/btreemin/README.md b/subjects/btreemin/README.md index 0658646f..62c4b6be 100644 --- a/subjects/btreemin/README.md +++ b/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$ +$ ``` diff --git a/subjects/btreeprintroot/README.md b/subjects/btreeprintroot/README.md index 6d167e9c..7d07ec94 100644 --- a/subjects/btreeprintroot/README.md +++ b/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$ +$ ``` diff --git a/subjects/btreesearchitem/README.md b/subjects/btreesearchitem/README.md index 0a8b6672..a44478bd 100644 --- a/subjects/btreesearchitem/README.md +++ b/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$ +$ ``` diff --git a/subjects/btreetransplant/README.md b/subjects/btreetransplant/README.md index 5aea88c3..64c1f921 100644 --- a/subjects/btreetransplant/README.md +++ b/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$ +$ ``` diff --git a/subjects/capitalize/README.md b/subjects/capitalize/README.md index 7f9013bf..21db1cf0 100644 --- a/subjects/capitalize/README.md +++ b/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$ +$ ``` diff --git a/subjects/capitalizing/README.md b/subjects/capitalizing/README.md index 0da98ebb..fc58d000 100644 --- a/subjects/capitalizing/README.md +++ b/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$ +$ ``` diff --git a/subjects/card_deck/README.md b/subjects/card_deck/README.md index 226b91d6..ae4f29aa 100644 --- a/subjects/card_deck/README.md +++ b/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$ +$ ``` diff --git a/subjects/cat/README.md b/subjects/cat/README.md index 5c2e505a..cb59935e 100644 --- a/subjects/cat/README.md +++ b/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 < quest8T.txt +$ echo '"Programming is a skill best acquired by practice and example rather than from books" by Alan Turing' > quest8.txt +$ cat < 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$ +$ ``` diff --git a/subjects/changeorder/README.md b/subjects/changeorder/README.md index c05a8e73..cde1092f 100644 --- a/subjects/changeorder/README.md +++ b/subjects/changeorder/README.md @@ -54,7 +54,7 @@ func main() { Its output: ```console -$ go build -$ ./main +$ go run . 1 -> 3 -> 5 -> 2 -> 4 +$ ``` diff --git a/subjects/changes/README.md b/subjects/changes/README.md index faf87021..2e732535 100644 --- a/subjects/changes/README.md +++ b/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$ +$ ``` diff --git a/subjects/chunk/README.md b/subjects/chunk/README.md index 56fbeb8b..2b2db41d 100644 --- a/subjects/chunk/README.md +++ b/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$ +$ ``` diff --git a/subjects/cipher/README.md b/subjects/cipher/README.md index a5451b1d..fb47b68c 100644 --- a/subjects/cipher/README.md +++ b/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$ +$ ``` diff --git a/subjects/circle/README.md b/subjects/circle/README.md index cfb88a6f..9eff933b 100644 --- a/subjects/circle/README.md +++ b/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$ +$ ``` diff --git a/subjects/cl-camp2/README.md b/subjects/cl-camp2/README.md index eb3cf141..100a88d7 100644 --- a/subjects/cl-camp2/README.md +++ b/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$ +$ ``` diff --git a/subjects/cl-camp4/README.md b/subjects/cl-camp4/README.md index 16b70f3d..85e681c2 100644 --- a/subjects/cl-camp4/README.md +++ b/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$ +$ ``` diff --git a/subjects/cl-camp5/README.md b/subjects/cl-camp5/README.md index f2572ab3..d5b91a5f 100644 --- a/subjects/cl-camp5/README.md +++ b/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 diff --git a/subjects/cl-camp6/README.md b/subjects/cl-camp6/README.md index dfdf403e..6d44293b 100644 --- a/subjects/cl-camp6/README.md +++ b/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$ +$ ``` diff --git a/subjects/cl-camp7/README.md b/subjects/cl-camp7/README.md index b59ae8ea..a4e09797 100644 --- a/subjects/cl-camp7/README.md +++ b/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$ +$ ``` diff --git a/subjects/cleanstr/README.md b/subjects/cleanstr/README.md index 6929b5d9..71041d32 100644 --- a/subjects/cleanstr/README.md +++ b/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$ ``` diff --git a/subjects/closures/README.md b/subjects/closures/README.md index bc051236..f5c805e0 100644 --- a/subjects/closures/README.md +++ b/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$ +$ ``` diff --git a/subjects/collatzcountdown/README.md b/subjects/collatzcountdown/README.md index e6759c81..2b6255ca 100644 --- a/subjects/collatzcountdown/README.md +++ b/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$ +$ ``` diff --git a/subjects/collect/README.md b/subjects/collect/README.md index 8370798d..a92b58cb 100644 --- a/subjects/collect/README.md +++ b/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$ +$ ``` diff --git a/subjects/comcheck/README.md b/subjects/comcheck/README.md index 60425d65..a468d465 100644 --- a/subjects/comcheck/README.md +++ b/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$ +$ ``` diff --git a/subjects/commits_stats/README.md b/subjects/commits_stats/README.md index 9d42fcaa..8f2e576b 100644 --- a/subjects/commits_stats/README.md +++ b/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$ +$ ``` diff --git a/subjects/compact/README.md b/subjects/compact/README.md index 67ca5cce..bfeb7f8a 100644 --- a/subjects/compact/README.md +++ b/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$ +$ ``` diff --git a/subjects/compare/README.md b/subjects/compare/README.md index c63eedf2..cbfee090 100644 --- a/subjects/compare/README.md +++ b/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$ +$ ``` diff --git a/subjects/concat/README.md b/subjects/concat/README.md index b2cd81ee..e909d342 100644 --- a/subjects/concat/README.md +++ b/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$ +$ ``` diff --git a/subjects/concatparams/README.md b/subjects/concatparams/README.md index 83b449f9..fdbc9b26 100644 --- a/subjects/concatparams/README.md +++ b/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$ +$ ``` diff --git a/subjects/convertbase/README.md b/subjects/convertbase/README.md index 21f2cf04..e4094cc0 100644 --- a/subjects/convertbase/README.md +++ b/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$ +$ ``` diff --git a/subjects/copy/README.md b/subjects/copy/README.md index 3e8a78eb..4196039e 100644 --- a/subjects/copy/README.md +++ b/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$ +$ ``` diff --git a/subjects/costumeprofit/README.md b/subjects/costumeprofit/README.md index 057d9e94..d9c33ded 100644 --- a/subjects/costumeprofit/README.md +++ b/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 +$ ``` diff --git a/subjects/countdown/README.md b/subjects/countdown/README.md index d3454498..d016a6cf 100644 --- a/subjects/countdown/README.md +++ b/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$ +$ ``` diff --git a/subjects/countif/README.md b/subjects/countif/README.md index 31a32fda..441e2379 100644 --- a/subjects/countif/README.md +++ b/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$ +$ ``` diff --git a/subjects/counting_words/README.md b/subjects/counting_words/README.md index 242a9454..ea17ba18 100644 --- a/subjects/counting_words/README.md +++ b/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$ +$ ``` diff --git a/subjects/createelem/README.md b/subjects/createelem/README.md index 9acb2ff6..58f62a24 100644 --- a/subjects/createelem/README.md +++ b/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$ +$ ``` diff --git a/subjects/delete_prefix/README.md b/subjects/delete_prefix/README.md index bd6577c1..1bd8da36 100644 --- a/subjects/delete_prefix/README.md +++ b/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$ +$ ``` diff --git a/subjects/diamond_creation/README.md b/subjects/diamond_creation/README.md index b49f8044..2cd950b8 100644 --- a/subjects/diamond_creation/README.md +++ b/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$ +$ ``` diff --git a/subjects/display_table/README.md b/subjects/display_table/README.md index d414e73e..30894bec 100644 --- a/subjects/display_table/README.md +++ b/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$ +$ ``` diff --git a/subjects/displaya/README.md b/subjects/displaya/README.md index 48526365..44bde535 100644 --- a/subjects/displaya/README.md +++ b/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$ +$ ``` diff --git a/subjects/displayalpham/README.md b/subjects/displayalpham/README.md index 538ba76e..fb3e08ea 100644 --- a/subjects/displayalpham/README.md +++ b/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$ +$ ``` diff --git a/subjects/displayalrevm/README.md b/subjects/displayalrevm/README.md index 20521121..2d765f07 100644 --- a/subjects/displayalrevm/README.md +++ b/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$ +$ ``` diff --git a/subjects/displayfile/README.md b/subjects/displayfile/README.md index 4fa71638..e4c37dd8 100644 --- a/subjects/displayfile/README.md +++ b/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$ +$ ``` diff --git a/subjects/displayfirstparam/README.md b/subjects/displayfirstparam/README.md index abcdbdfd..eca6db58 100644 --- a/subjects/displayfirstparam/README.md +++ b/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 . +$ ``` diff --git a/subjects/displaylastparam/README.md b/subjects/displaylastparam/README.md index 35ef00f4..2aa218b2 100644 --- a/subjects/displaylastparam/README.md +++ b/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 . +$ ``` diff --git a/subjects/displayz/README.md b/subjects/displayz/README.md index 18173166..621bdb67 100644 --- a/subjects/displayz/README.md +++ b/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 . ``` diff --git a/subjects/division_and_remainder/README.md b/subjects/division_and_remainder/README.md index f79940ed..135bc922 100644 --- a/subjects/division_and_remainder/README.md +++ b/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$ +$ ``` diff --git a/subjects/divmod/README.md b/subjects/divmod/README.md index f8f91cb0..2f97a9d5 100644 --- a/subjects/divmod/README.md +++ b/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$ +$ ``` diff --git a/subjects/doop/README.md b/subjects/doop/README.md index c1f62dd5..122eff22 100644 --- a/subjects/doop/README.md +++ b/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$ +$ ``` diff --git a/subjects/doubtful/README.md b/subjects/doubtful/README.md index 232dd432..df8729cc 100644 --- a/subjects/doubtful/README.md +++ b/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$ +$ ``` diff --git a/subjects/drop_the_thread/README.md b/subjects/drop_the_thread/README.md index a30543e1..e16804f1 100644 --- a/subjects/drop_the_thread/README.md +++ b/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$ +$ ``` diff --git a/subjects/easy_traits/README.md b/subjects/easy_traits/README.md index 5b943c78..929127e2 100644 --- a/subjects/easy_traits/README.md +++ b/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$ +$ ``` diff --git a/subjects/edit_distance/README.md b/subjects/edit_distance/README.md index 4b9c1162..507eab34 100644 --- a/subjects/edit_distance/README.md +++ b/subjects/edit_distance/README.md @@ -37,7 +37,7 @@ fn main() { And its output: ```console -student@ubuntu:~/edit_distance/test$ cargo run +$ cargo run It's necessary to make 2 change(s) to alignment, to get assignment -student@ubuntu:~/edit_distance/test$ +$ ``` diff --git a/subjects/eightqueens/README.md b/subjects/eightqueens/README.md index d2e1dad7..14c0ad80 100644 --- a/subjects/eightqueens/README.md +++ b/subjects/eightqueens/README.md @@ -9,8 +9,7 @@ Recursivity must be used to solve this problem. It should print something like this : ```console -student@ubuntu:~/eightqueens/test$ go build -student@ubuntu:~/eightqueens/test$ ./test +$ go run . 15863724 16837425 17468253 diff --git a/subjects/enigma/README.md b/subjects/enigma/README.md index dbf60828..6f1adb8f 100644 --- a/subjects/enigma/README.md +++ b/subjects/enigma/README.md @@ -74,8 +74,7 @@ func main() { And its output : ```console -student@ubuntu:~/enigma/test$ go build -student@ubuntu:~/enigma/test$ ./test +$ go run . 5 2 7 @@ -85,5 +84,5 @@ After using Enigma 6 5 7 -student@ubuntu:~/enigma/test$ +$ ``` diff --git a/subjects/ephemeris/README.md b/subjects/ephemeris/README.md index 0a5ca7e8..7219875e 100644 --- a/subjects/ephemeris/README.md +++ b/subjects/ephemeris/README.md @@ -35,7 +35,7 @@ In order to get your daily informations out of your favorite websites, you'll ha First, create a new repository named `ephemeris` and run this command line in your terminal, in the repository: ```console -student@ubuntu:~/ephemeris$ npm install puppeteer +$ npm install puppeteer ``` Then, create a new file `ephemeris.mjs` in which you will use the puppeteer module: diff --git a/subjects/error_types/README.md b/subjects/error_types/README.md index cc3e7a27..7e097dfd 100644 --- a/subjects/error_types/README.md +++ b/subjects/error_types/README.md @@ -115,12 +115,12 @@ fn main() { And its output: ```console -student@ubuntu:~/error_types/test$ cargo run +$ cargo run Form { first_name: "Lee", last_name: "Silva", birth: 2015-09-05, sex: Male, birth_location: "Africa", password: "qwqwsa1dty_" } ["Valid first name", "Valid password"] FErr { form_values: ("first_name", ""), date: "2020-12-28 13:29:11", err: "No user name" } FErr { form_values: ("password", "dty_1"), date: "2020-12-28 13:29:11", err: "At least 8 characters" } FErr { form_values: ("password", "asdasASd(_"), date: "2020-12-28 13:29:11", err: "Combination of different ASCII character types (numbers, letters and none alphanumeric characters)" } FErr { form_values: ("password", "asdasASd123SA"), date: "2020-12-28 13:29:11", err: "Combination of different ASCII character types (numbers, letters and none alphanumeric characters)" } -student@ubuntu:~/error_types/test$ +$ ``` diff --git a/subjects/events/README.md b/subjects/events/README.md index 72b39721..4ea9cf18 100644 --- a/subjects/events/README.md +++ b/subjects/events/README.md @@ -110,10 +110,10 @@ fn main() { And its output ```console -student@ubuntu:~/events/test$ cargo run +$ cargo run (Bottom, 50, Go to the doctor) (Top, 30, You have 13H:38M:14S left before the registration ends) (Center, 100, Go to the doctor) (Top, 25, Enjoy your holiday) -student@ubuntu:~/events/test$ +$ ``` diff --git a/subjects/expandstr/README.md b/subjects/expandstr/README.md index 441c5a6a..daf8aee9 100644 --- a/subjects/expandstr/README.md +++ b/subjects/expandstr/README.md @@ -13,12 +13,11 @@ If the number of arguments is not 1, or if there are no word, the program displa ### Usage ```console -student@ubuntu:~/expandstr$ go build -student@ubuntu:~/expandstr$ ./expandstr "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:~/expandstr$ ./expandstr " only it's harder " | cat -e +$ go run . " only it's harder " | cat -e only it's harder$ -student@ubuntu:~/expandstr$ ./expandstr " how funny it is" "did you hear, Mathilde ?" | cat -e -student@ubuntu:~/expandstr$ ./expandstr -student@ubuntu:~/expandstr$ +$ go run . " how funny it is" "did you hear, Mathilde ?" | cat -e +$ go run . +$ ``` diff --git a/subjects/explain/README.md b/subjects/explain/README.md index 2c3d4cd7..3cd09cc6 100644 --- a/subjects/explain/README.md +++ b/subjects/explain/README.md @@ -18,14 +18,14 @@ Write an `explain.sh` file that: ### Usage ```console -student@ubuntu:~/explain/test$ ./explain.sh | cat -e +$ ./explain.sh | cat -e FirstNameOfWitness LastNameOfWitness$ 123456$ Red Ferrari$ FirstNameOfSuspect1 LastNameOfSuspect1$ FirstNameOfSuspect2 LastNameOfSuspect2$ FirstNameOfSuspect3 LastNameOfSuspect3$ -student@ubuntu:~/explain/test$ +$ ``` ### Hint diff --git a/subjects/fib/README.md b/subjects/fib/README.md index 1459c7da..460657fe 100644 --- a/subjects/fib/README.md +++ b/subjects/fib/README.md @@ -38,10 +38,9 @@ func main() { And its output : ```console -student@ubuntu:~/fib/test$ go build -student@ubuntu:~/fib/test$ ./test +$ go run . 0 1 1 -student@ubuntu:~/fib/test$ +$ ``` diff --git a/subjects/fibonacci/README.md b/subjects/fibonacci/README.md index 8ffdf5b1..cb64f04b 100644 --- a/subjects/fibonacci/README.md +++ b/subjects/fibonacci/README.md @@ -43,8 +43,7 @@ func main() { And its output : ```console -student@ubuntu:~/fibonacci/test$ go build -student@ubuntu:~/fibonacci/test$ ./test +$ go run . 3 -student@ubuntu:~/fibonacci/test$ +$ ``` diff --git a/subjects/fibonacci2/README.md b/subjects/fibonacci2/README.md index ef697b14..dd05a6fc 100644 --- a/subjects/fibonacci2/README.md +++ b/subjects/fibonacci2/README.md @@ -39,10 +39,10 @@ fn main() { And its output: ```console -student@ubuntu:~/fibonacci2/test$ cargo run +$ cargo run The element in the position 2 in fibonacci series is 1 The element in the position 4 in fibonacci series is 3 The element in the position 22 in fibonacci series is 17711 The element in the position 20 in fibonacci series is 6765 -student@ubuntu:~/fibonacci2/test$ +$ ``` diff --git a/subjects/filter_table/README.md b/subjects/filter_table/README.md index 0e6e7297..a1663ec1 100644 --- a/subjects/filter_table/README.md +++ b/subjects/filter_table/README.md @@ -82,8 +82,8 @@ fn main() { And its output: ```console -student@ubuntu:~/filter_table/test$ cargo run +$ cargo run Some(Table { headers: ["Name"], body: [["Adam"], ["Adamaris"], ["Ackerley"]] }) Some(Table { headers: ["Name", "Last Name", "ID Number"], body: [["Adam", "Philips", "123456789"], ["Ackerley", "Philips", "123456789"]] }) -student@ubuntu:~/filter_table/test$ +$ ``` diff --git a/subjects/find_factorial/README.md b/subjects/find_factorial/README.md index 4a84d51c..15774435 100644 --- a/subjects/find_factorial/README.md +++ b/subjects/find_factorial/README.md @@ -6,7 +6,7 @@ Complete the **function** `factorial` to return the factorial of a given number. As a reminder the factorial of a number is the product of all the integers from 1 to that number. -Example: the factorial of 6 (written 6!) is 1 * 2 * 3 * 4 * 5 * 6 = 720. +Example: the factorial of 6 (written 6!) is 1 \* 2 \* 3 \* 4 \* 5 \* 6 = 720. Do not forget the rules for 0 and 1. @@ -36,11 +36,11 @@ fn main() { And its output: ```console -student@ubuntu:~/find_factorial/test$ cargo run +$ cargo run The factorial of 0 = 1 The factorial of 1 = 1 The factorial of 5 = 120 The factorial of 10 = 3628800 The factorial of 19 = 121645100408832000 -student@ubuntu:~/find_factorial/test$ +$ ``` diff --git a/subjects/findnextprime/README.md b/subjects/findnextprime/README.md index 4975c347..28f8b3f7 100644 --- a/subjects/findnextprime/README.md +++ b/subjects/findnextprime/README.md @@ -37,9 +37,8 @@ func main() { And its output : ```console -student@ubuntu:~/findnextprime/test$ go build -student@ubuntu:~/findnextprime/test$ ./test +$ go run . 5 5 -student@ubuntu:~/findnextprime/test$ +$ ``` diff --git a/subjects/findprevprime/README.md b/subjects/findprevprime/README.md index 238c5643..cec32ee3 100644 --- a/subjects/findprevprime/README.md +++ b/subjects/findprevprime/README.md @@ -36,9 +36,8 @@ func main() { And its output : ```console -student@ubuntu:~/piscine-go/test$ go build -student@ubuntu:~/piscine-go/test$ ./test +$ go run . 5 3 -student@ubuntu:~/piscine-go/test$ +$ ``` diff --git a/subjects/firstrune/README.md b/subjects/firstrune/README.md index 7c84dc64..c996762d 100644 --- a/subjects/firstrune/README.md +++ b/subjects/firstrune/README.md @@ -36,8 +36,7 @@ func main() { And its output : ```console -student@ubuntu:~/firstrune/test$ go build -student@ubuntu:~/firstrune/test$ ./test +$ go run . HSO -student@ubuntu:~/firstrune/test$ +$ ``` diff --git a/subjects/firstword/README.md b/subjects/firstword/README.md index a1513de5..2f1e5b79 100644 --- a/subjects/firstword/README.md +++ b/subjects/firstword/README.md @@ -13,12 +13,11 @@ Write a program that takes an argument and displays its first word, followed by ### Usage ```console -student@ubuntu:~/firstword/test$ go build -student@ubuntu:~/firstword/test$ ./test "hello there" +$ go run . "hello there" hello -student@ubuntu:~/firstword/test$ ./test "hello ......... bye" +$ go run . "hello ......... bye" hello -student@ubuntu:~/firstword/test$ ./test -student@ubuntu:~/firstword/test$ ./test "hello" "there" -student@ubuntu:~/firstword/test$ +$ go run . +$ go run . "hello" "there" +$ ``` diff --git a/subjects/flags/README.md b/subjects/flags/README.md index 8ad558f8..cfed2dec 100644 --- a/subjects/flags/README.md +++ b/subjects/flags/README.md @@ -13,37 +13,36 @@ This program should : Example of output : ```console -student@ubuntu:~/flags$ go build -student@ubuntu:~/flags$ ./flags --insert=4321 --order asdad +$ go run . --insert=4321 --order asdad 1234aadds -student@ubuntu:~/flags$ ./flags --insert=4321 asdad +$ go run . --insert=4321 asdad asdad4321 -student@ubuntu:~/flags$ ./flags asdad +$ go run . asdad asdad -student@ubuntu:~/flags$ ./flags --order 43a21 +$ go run . --order 43a21 1234a -student@ubuntu:~/flags$ ./flags +$ go run . --insert -i This flag inserts the string into the string passed as argument. --order -o This flag will behave like a boolean, if it is called it will order the argument. -student@ubuntu:~/flags$ -student@ubuntu:~/flags$ ./flags -h +$ +$ go run . -h --insert -i This flag inserts the string into the string passed as argument. --order -o This flag will behave like a boolean, if it is called it will order the argument. -student@ubuntu:~/flags$ -student@ubuntu:~/flags$ ./flags --help +$ +$ go run . --help --insert -i This flag inserts the string into the string passed as argument. --order -o This flag will behave like a boolean, if it is called it will order the argument. -student@ubuntu:~/flags$ +$ ``` diff --git a/subjects/flat_tree/README.md b/subjects/flat_tree/README.md index 5bb23779..f7f93c2f 100644 --- a/subjects/flat_tree/README.md +++ b/subjects/flat_tree/README.md @@ -37,8 +37,8 @@ fn main() { And its output: ```console -student@ubuntu:~/flat_tree/test$ cargo run +$ cargo run [0, 9, 30, 34] ["Horses", "Slow", "kill", "will"] -student@ubuntu:~/flat_tree/test$ +$ ``` diff --git a/subjects/foldint/README.md b/subjects/foldint/README.md index e9ab2439..aec767dc 100644 --- a/subjects/foldint/README.md +++ b/subjects/foldint/README.md @@ -38,8 +38,7 @@ func main() { And its output : ```console -student@ubuntu:~/foldint/test$ go build -student@ubuntu:~/foldint/test$ ./test +$ go run . 99 558 87 @@ -47,5 +46,5 @@ student@ubuntu:~/foldint/test$ ./test 93 0 93 -student@ubuntu:~/foldint/test$ +$ ``` diff --git a/subjects/foreach/README.md b/subjects/foreach/README.md index 141d3913..a7ea1fc9 100644 --- a/subjects/foreach/README.md +++ b/subjects/foreach/README.md @@ -30,8 +30,7 @@ func main() { And its output : ```console -student@ubuntu:~/foreach/test$ go build -student@ubuntu:~/foreach/test$ ./test +$ go run . 123456 -student@ubuntu:~/foreach/test$ +$ ``` diff --git a/subjects/fprime/README.md b/subjects/fprime/README.md index 3ba40f0a..f6054971 100644 --- a/subjects/fprime/README.md +++ b/subjects/fprime/README.md @@ -11,19 +11,18 @@ Write a program that takes a positive `int` and displays its prime factors, foll ### Usage ```console -student@ubuntu:~/fprime/test$ go build -student@ubuntu:~/fprime/test$ ./test 225225 +$ go run . 225225 3*3*5*5*7*11*13 -student@ubuntu:~/fprime/test$ ./test 8333325 +$ go run . 8333325 3*3*5*5*7*11*13*37 -student@ubuntu:~/fprime/test$ ./test 9539 +$ go run . 9539 9539 -student@ubuntu:~/fprime/test$ ./test 804577 +$ go run . 804577 804577 -student@ubuntu:~/fprime/test$ ./test 42 +$ go run . 42 2*3*7 -student@ubuntu:~/fprime/test$ ./test a -student@ubuntu:~/fprime/test$ ./test 0 -student@ubuntu:~/fprime/test$ ./test 1 -student@ubuntu:~/fprime/test$ +$ go run . a +$ go run . 0 +$ go run . 1 +$ ``` diff --git a/subjects/game23/README.md b/subjects/game23/README.md index 83678b7b..4114ca1c 100644 --- a/subjects/game23/README.md +++ b/subjects/game23/README.md @@ -36,10 +36,9 @@ func main() { And its output : ```console -student@ubuntu:~/game23/test$ go build -student@ubuntu:~/game23/test$ ./test +$ go run . 1 -1 2 -student@ubuntu:~/game23/test$ +$ ``` diff --git a/subjects/gcd/README.md b/subjects/gcd/README.md index e21166fe..936f9ac0 100644 --- a/subjects/gcd/README.md +++ b/subjects/gcd/README.md @@ -13,16 +13,15 @@ All arguments tested will be positive `int` values. ### Usage ```console -student@ubuntu:~/gcd$ go build -student@ubuntu:~/gcd$ ./gcd 42 10 | cat -e +$ go run . 42 10 | cat -e 2$ -student@ubuntu:~/gcd$ ./gcd 42 12 +$ go run . 42 12 6 -student@ubuntu:~/gcd$ ./gcd 14 77 +$ go run . 14 77 7 -student@ubuntu:~/gcd$ ./gcd 17 3 +$ go run . 17 3 1 -student@ubuntu:~/gcd$ ./gcd -student@ubuntu:~/gcd$ ./gcd 50 12 4 -student@ubuntu:~/gcd$ +$ go run . +$ go run . 50 12 4 +$ ``` diff --git a/subjects/generics/README.md b/subjects/generics/README.md index 6e7b443d..f53e8b65 100644 --- a/subjects/generics/README.md +++ b/subjects/generics/README.md @@ -27,8 +27,8 @@ fn main() { And its output: ```console -student@ubuntu:~/generics/test$ cargo run +$ cargo run Hello, world! 3 -student@ubuntu:~/generics/test$ +$ ``` diff --git a/subjects/get_products/README.md b/subjects/get_products/README.md index 79ba98bf..27254e7a 100644 --- a/subjects/get_products/README.md +++ b/subjects/get_products/README.md @@ -40,7 +40,7 @@ fn main() { And its output: ```console -student@ubuntu:~/get_products/test$ cargo run +$ cargo run [84, 12, 28, 21] -student@ubuntu:~/get_products/test$ +$ ``` diff --git a/subjects/go-reloaded/README.md b/subjects/go-reloaded/README.md index 95b016af..c7f57d3b 100644 --- a/subjects/go-reloaded/README.md +++ b/subjects/go-reloaded/README.md @@ -70,8 +70,7 @@ func main() { And its output : ```console -student@ubuntu:~/go-reloaded/test$ go build -student@ubuntu:~/go-reloaded/test$ ./test +$ go run . 12345 12345 0 @@ -80,7 +79,7 @@ student@ubuntu:~/go-reloaded/test$ ./test -1234 0 0 -student@ubuntu:~/go-reloaded/test$ +$ ``` --- @@ -129,10 +128,9 @@ func main() { And its output : ```console -student@ubuntu:~/go-reloaded/test$ go build -student@ubuntu:~/go-reloaded/test$ ./test +$ go run . 64 -student@ubuntu:~/go-reloaded/test$ +$ ``` --- @@ -183,12 +181,11 @@ func main() { And its output : ```console -student@ubuntu:~/go-reloaded/test$ go build -student@ubuntu:~/go-reloaded/test$ ./test +$ go run . 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 012, 013, 014, 015, 016, 017, 018, ... 679, 689, 789 012345678, 012345679, ..., 123456789 -student@ubuntu:~/go-reloaded/test$ +$ ``` --- @@ -253,14 +250,13 @@ func main() { And its output : ```console -student@ubuntu:~/go-reloaded/test$ go build -student@ubuntu:~/go-reloaded/test$ ./test +$ go run . 125 -1111101 7D -uoi NV -student@ubuntu:~/go-reloaded/test$ +$ ``` --- @@ -297,29 +293,28 @@ The program has to handle the modulo and division operations by 0 as shown on th ### Usage ```console -student@ubuntu:~/go-reloaded/test$ go build doop.go -student@ubuntu:~/go-reloaded/test$ ./doop -student@ubuntu:~/go-reloaded/test$ ./doop 1 + 1 | cat -e +$ go run . +$ go run . 1 + 1 | cat -e 2$ -student@ubuntu:~/go-reloaded/test$ ./doop hello + 1 | cat -e +$ go run . hello + 1 | cat -e 0$ -student@ubuntu:~/go-reloaded/test$ ./doop 1 p 1 | cat -e +$ go run . 1 p 1 | cat -e 0$ -student@ubuntu:~/go-reloaded/test$ ./doop 1 / 0 | cat -e +$ go run . 1 / 0 | cat -e No division by 0$ -student@ubuntu:~/go-reloaded/test$ ./doop 1 % 0 | cat -e +$ go run . 1 % 0 | cat -e No modulo by 0$ -student@ubuntu:~/go-reloaded/test$ ./doop 9223372036854775807 + 1 +$ go run . 9223372036854775807 + 1 0 -student@ubuntu:~/go-reloaded/test$ ./doop -9223372036854775809 - 3 +$ go run . -9223372036854775809 - 3 0 -student@ubuntu:~/go-reloaded/test$ ./doop 9223372036854775807 "*" 3 +$ go run . 9223372036854775807 "*" 3 0 -student@ubuntu:~/go-reloaded/test$ ./doop 1 "*" 1 +$ go run . 1 "*" 1 1 -student@ubuntu:~/go-reloaded/test$ ./doop 1 "*" -1 +$ go run . 1 "*" -1 -1 -student@ubuntu:~/go-reloaded/test$ +$ ``` --- @@ -379,14 +374,13 @@ func main() { And its output : ```console -student@ubuntu:~/go-reloaded/test$ go build -student@ubuntu:~/go-reloaded/test$ ./test +$ go run . 125 125 125 125 0 -student@ubuntu:~/go-reloaded/test$ +$ ``` --- @@ -432,10 +426,9 @@ func main() { And its output : ```console -student@ubuntu:~/go-reloaded/test$ go build -student@ubuntu:~/go-reloaded/test$ ./test +$ go run . [Hello how are you?] -student@ubuntu:~/go-reloaded/test$ +$ ``` --- @@ -481,10 +474,9 @@ func main() { And its output : ```console -student@ubuntu:~/go-reloaded/test$ go build -student@ubuntu:~/go-reloaded/test$ ./test +$ go run . [Hello how are you?] -student@ubuntu:~/go-reloaded/test$ +$ ``` --- @@ -533,10 +525,9 @@ func main() { And its output : ```console -student@ubuntu:~/go-reloaded/test$ go build -student@ubuntu:~/go-reloaded/test$ ./test +$ go run . 43 -student@ubuntu:~/go-reloaded/test$ +$ ``` --- @@ -561,20 +552,19 @@ Write a **program** that checks the arguments for vowels. Example of output : ```console -student@ubuntu:~/go-reloaded/test$ go build -student@ubuntu:~/go-reloaded/test$ ./rotatevowels "Hello World" | cat -e +$ go run . "Hello World" | cat -e Hollo Werld$ -student@ubuntu:~/go-reloaded/test$ ./rotatevowels "HEllO World" "problem solved" +$ go run . "HEllO World" "problem solved" Hello Werld problom sOlvEd -student@ubuntu:~/go-reloaded/test$ ./rotatevowels "str" "shh" "psst" +$ go run . "str" "shh" "psst" str shh psst -student@ubuntu:~/go-reloaded/test$ ./rotatevowels "happy thoughts" "good luck" +$ go run . "happy thoughts" "good luck" huppy thooghts guod lack -student@ubuntu:~/go-reloaded/test$ ./rotatevowels "aEi" "Ou" +$ go run . "aEi" "Ou" uOi Ea -student@ubuntu:~/go-reloaded/test$ ./rotatevowels +$ go run . -student@ubuntu:~/go-reloaded/test$ +$ ``` --- @@ -622,10 +612,9 @@ func main() { And its output : ```console -student@ubuntu:~/go-reloaded/test$ go build -student@ubuntu:~/go-reloaded/test$ ./test +$ go run . [1 2 3 A B C a b c] -student@ubuntu:~/go-reloaded/test$ +$ ``` --- @@ -664,19 +653,18 @@ Write a program that behaves like a simplified `cat` command. - The program must be submitted inside a folder named `cat`. ```console -student@ubuntu:~/go-reloaded/cat$ go build -student@ubuntu:~/go-reloaded/cat$ ./cat abc +$ go run . abc ERROR: abc: No such file or directory -student@ubuntu:~/go-reloaded/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:~/go-reloaded/cat$ ./cat +$ go run . Hello Hello ^C -student@ubuntu:~/go-reloaded/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:~/go-reloaded/cat$ +$ ``` --- @@ -751,10 +739,9 @@ func main() { And its output : ```console -student@ubuntu:~/go-reloaded/test$ go build -student@ubuntu:~/go-reloaded/test$ ./test +$ go run . 3 -student@ubuntu:~/go-reloaded/test$ +$ ``` --- @@ -834,11 +821,10 @@ func main() { And its output : ```console -student@ubuntu:~/go-reloaded/test$ go build -student@ubuntu:~/go-reloaded/test$ ./test +$ go run . 1 -> 4 -> 9 -> -2 -> 1 -> 2 -> 4 -> 9 -> -student@ubuntu:~/go-reloaded/test$ +$ ``` --- @@ -915,10 +901,9 @@ func main() { And its output : ```console -student@ubuntu:~/go-reloaded/test$ go build -student@ubuntu:~/go-reloaded/test$ ./test +$ go run . -2 -> 3 -> 5 -> 7 -> 9 -> -student@ubuntu:~/go-reloaded/test$ +$ ``` --- @@ -1009,8 +994,7 @@ func main() { And its output : ```console -student@ubuntu:~/go-reloaded/test$ go build -student@ubuntu:~/go-reloaded/test$ ./test +$ go run . ----normal state---- 1 -> ------answer----- @@ -1020,7 +1004,7 @@ student@ubuntu:~/go-reloaded/test$ ./test 1 -> Hello -> 1 -> There -> 1 -> 1 -> How -> 1 -> are -> you -> 1 -> ------answer----- Hello -> There -> How -> are -> you -> -student@ubuntu:~/go-reloaded/test$ +$ ``` --- @@ -1066,13 +1050,12 @@ func main() { And its output : ```console -student@ubuntu:~/go-reloaded/test$ go build -student@ubuntu:~/go-reloaded/test$ ./test +$ go run . 3 4 5 7 -student@ubuntu:~/go-reloaded/test$ +$ ``` --- @@ -1115,13 +1098,12 @@ func main() { And its output : ```console -student@ubuntu:~/go-reloaded/test$ go build -student@ubuntu:~/go-reloaded/test$ ./test +$ go run . 4 1 7 5 -student@ubuntu:~/go-reloaded/test$ +$ ``` --- @@ -1171,8 +1153,7 @@ func main() { And its output : ```console -student@ubuntu:~/go-reloaded/test$ go build -student@ubuntu:~/go-reloaded/test$ ./test +$ go run . Before delete: 1 4 @@ -1182,5 +1163,5 @@ After delete: 1 5 7 -student@ubuntu:~/go-reloaded/test$ +$ ``` diff --git a/subjects/groceries/README.md b/subjects/groceries/README.md index fb94e116..f515f74b 100644 --- a/subjects/groceries/README.md +++ b/subjects/groceries/README.md @@ -47,8 +47,8 @@ fn main() { And its output: ```console -student@ubuntu:~/groceries/test$ cargo run +$ cargo run The groceries list now = ["yogurt", "panetone", "bread", "cheese", "nuts"] The second element of the grocery list is "panetone" -student@ubuntu:~/groceries/test$ +$ ``` diff --git a/subjects/grouping/README.md b/subjects/grouping/README.md index 14f68ee0..3d635f67 100644 --- a/subjects/grouping/README.md +++ b/subjects/grouping/README.md @@ -13,12 +13,11 @@ If the number of arguments is different from 2, if the regular expression is not ### Usage ```console -student@ubuntu:~/grouping/test$ go build -student@ubuntu:~/grouping/test$ ./regbrackets "(a)" "I'm heavy, jumpsuit is on steady, Lighter when I'm lower, higher when I'm heavy" +$ go run . "(a)" "I'm heavy, jumpsuit is on steady, Lighter when I'm lower, higher when I'm heavy" 1: heavy 2: steady 3: heavy -student@ubuntu:~/grouping/test$ ./regbrackets "(e|n)" "I currently have 4 windows opened up… and I don’t know why." +$ go run . "(e|n)" "I currently have 4 windows opened up… and I don’t know why." 1: currently 2: currently 3: have @@ -28,10 +27,10 @@ student@ubuntu:~/grouping/test$ ./regbrackets "(e|n)" "I currently have 4 window 7: and 8: don’t 9: know -student@ubuntu:~/grouping/test$ ./regbrackets "(hi)" "He swore he just saw his sushi move." +$ go run . "(hi)" "He swore he just saw his sushi move." 1: his 2: sushi -student@ubuntu:~/grouping/test$ ./regbrackets "(s)" "" -student@ubuntu:~/grouping/test$ ./regbrackets "i" "Something in the air" -student@ubuntu:~/grouping/test$ +$ go run . "(s)" "" +$ go run . "i" "Something in the air" +$ ``` diff --git a/subjects/halfcontest/README.md b/subjects/halfcontest/README.md index 5ef03540..671c1212 100644 --- a/subjects/halfcontest/README.md +++ b/subjects/halfcontest/README.md @@ -41,10 +41,9 @@ func main() { And its output : ```console -student@ubuntu:~/halfcontest/test$ go build -student@ubuntu:~/halfcontest/test$ ./test +$ go run . 224 1059 1002 -student@ubuntu:~/halfcontest/test$ +$ ``` diff --git a/subjects/handling/README.md b/subjects/handling/README.md index 4340b970..630de8bc 100644 --- a/subjects/handling/README.md +++ b/subjects/handling/README.md @@ -49,7 +49,7 @@ fn main() { And its output: ```console -student@ubuntu:~/handling/test$ cargo run +$ cargo run content to be written -student@ubuntu:~/handling/test$ +$ ``` diff --git a/subjects/hashing/README.md b/subjects/hashing/README.md index 3cd729a2..1cc5ed4b 100644 --- a/subjects/hashing/README.md +++ b/subjects/hashing/README.md @@ -47,9 +47,9 @@ fn main() { And its output; ```console -student@ubuntu:~/hashing/test$ cargo run +$ cargo run mean 3.857142857142857 median 4 mode 5 -student@ubuntu:~/hashing/test$ +$ ``` diff --git a/subjects/hello/README.md b/subjects/hello/README.md index 2b44095e..bdc727b6 100644 --- a/subjects/hello/README.md +++ b/subjects/hello/README.md @@ -7,8 +7,7 @@ Write a program that displays "Hello World!" followed by a newline (`'\n'`). ### Usage ```console -student@ubuntu:~/hello/test$ go build -student@ubuntu:~/hello/test$ ./test +$ go run . Hello World! -student@ubuntu:~/hello/test$ +$ ``` diff --git a/subjects/hiddenp/README.md b/subjects/hiddenp/README.md index b3dbc848..e3e226b3 100644 --- a/subjects/hiddenp/README.md +++ b/subjects/hiddenp/README.md @@ -13,15 +13,14 @@ If the number of arguments is different from 2, the program displays nothing. ### Usage ```console -student@ubuntu:~/hiddenp$ go build -student@ubuntu:~/hiddenp$ ./hiddenp "fgex.;" "tyf34gdgf;'ektufjhgdgex.;.;rtjynur6" | cat -e +$ go run . "fgex.;" "tyf34gdgf;'ektufjhgdgex.;.;rtjynur6" | cat -e 1$ -student@ubuntu:~/hiddenp$ ./hiddenp "abc" "2altrb53c.sse" | cat -e +$ go run . "abc" "2altrb53c.sse" | cat -e 1$ -student@ubuntu:~/hiddenp$ ./hiddenp "abc" "btarc" | cat -e +$ go run . "abc" "btarc" | cat -e 0$ -student@ubuntu:~/hiddenp$ ./hiddenp "DD" "DABC" | cat -e +$ go run . "DD" "DABC" | cat -e 0$ -student@ubuntu:~/hiddenp$ ./hiddenp -student@ubuntu:~/hiddenp$ +$ go run . +$ ``` diff --git a/subjects/highest/README.md b/subjects/highest/README.md index 1b85b9e8..dcd7ea32 100644 --- a/subjects/highest/README.md +++ b/subjects/highest/README.md @@ -55,10 +55,10 @@ fn main() { And its output: ```console -student@ubuntu:~/highest/test$ cargo run +$ cargo run [30, 500, 20, 70] Some(500) Some(70) [500, 70, 30] -student@ubuntu:~/highest/test$ +$ ``` diff --git a/subjects/how_many_references/README.md b/subjects/how_many_references/README.md index e0bec497..f0029e7d 100644 --- a/subjects/how_many_references/README.md +++ b/subjects/how_many_references/README.md @@ -69,12 +69,12 @@ fn main() { And its output: ```console -student@ubuntu:~/how_many_references/test$ cargo run +$ cargo run a: 4 b: 2 c: 2 a: 1 b: 2 c: 2 -student@ubuntu:~/how_many_references/test$ +$ ``` diff --git a/subjects/index/README.md b/subjects/index/README.md index ceb22bf6..bcb7a56e 100644 --- a/subjects/index/README.md +++ b/subjects/index/README.md @@ -34,10 +34,9 @@ func main() { And its output : ```console -student@ubuntu:~/index/test$ go build -student@ubuntu:~/index/test$ ./test +$ go run . 2 1 -1 -student@ubuntu:~/index/test$ +$ ``` diff --git a/subjects/insertion_sort/README.md b/subjects/insertion_sort/README.md index db66ecb4..b5f0a2a3 100644 --- a/subjects/insertion_sort/README.md +++ b/subjects/insertion_sort/README.md @@ -49,8 +49,8 @@ fn main() { And its output: ```console -student@ubuntu:~/insertion_sort/test$ cargo run +$ cargo run [3, 5, 7, 2, 1, 6, 8, 4] [1, 2, 3, 4, 5, 6, 7, 8] -student@ubuntu:~/insertion_sort/test$ +$ ``` diff --git a/subjects/inter/README.md b/subjects/inter/README.md index 5513637b..9991c125 100644 --- a/subjects/inter/README.md +++ b/subjects/inter/README.md @@ -11,10 +11,9 @@ Write a program that takes two `string` and displays, without doubles, the chara ### Usage ```console -student@ubuntu:~/inter/test$ go build -student@ubuntu:~/inter/test$ ./test "padinton" "paqefwtdjetyiytjneytjoeyjnejeyj" +$ go run . "padinton" "paqefwtdjetyiytjneytjoeyjnejeyj" padinto -student@ubuntu:~/inter/test$ ./test ddf6vewg64f twthgdwthdwfteewhrtag6h4ffdhsd +$ go run . ddf6vewg64f twthgdwthdwfteewhrtag6h4ffdhsd df6ewg4 -student@ubuntu:~/inter/test$ +$ ``` diff --git a/subjects/interestingnumber/README.md b/subjects/interestingnumber/README.md index 84708ded..6d51eaf8 100644 --- a/subjects/interestingnumber/README.md +++ b/subjects/interestingnumber/README.md @@ -38,10 +38,9 @@ func main() { And its output : ```console -student@ubuntu:~/interestingnumber/test$ go build -student@ubuntu:~/interestingnumber/test$ ./test +$ go run . 7 7 16 -student@ubuntu:~/interestingnumber/test$ +$ ``` diff --git a/subjects/introduction/README.md b/subjects/introduction/README.md index 5a5cb15a..639dfcec 100644 --- a/subjects/introduction/README.md +++ b/subjects/introduction/README.md @@ -47,9 +47,9 @@ Where `choumi` is your username If the username is `choumi` : ```console -user@host:~/piscine-go$ ./hello.sh +$ ./hello.sh Hello choumi! -user@host:~/piscine-go$ +$ ``` #### 3- go-say-hello diff --git a/subjects/inv_pyramid/README.md b/subjects/inv_pyramid/README.md index e73d705e..d98536ba 100644 --- a/subjects/inv_pyramid/README.md +++ b/subjects/inv_pyramid/README.md @@ -58,7 +58,7 @@ fn main() { And its output ```console -student@ubuntu:~/inv_pyramid/test$ cargo run +$ cargo run " #" " a" " aa" @@ -87,5 +87,5 @@ student@ubuntu:~/inv_pyramid/test$ cargo run " &&&" " &&" " &" -student@ubuntu:~/inv_pyramid/test$ +$ ``` diff --git a/subjects/isalpha/README.md b/subjects/isalpha/README.md index 690c067f..5ef2ae47 100644 --- a/subjects/isalpha/README.md +++ b/subjects/isalpha/README.md @@ -36,11 +36,10 @@ func main() { And its output : ```console -student@ubuntu:~/isalpha/test$ go build -student@ubuntu:~/isalpha/test$ ./test +$ go run . false true false true -student@ubuntu:~/isalpha/test$ +$ ``` diff --git a/subjects/isanagram/README.md b/subjects/isanagram/README.md index 8533d951..44f651b3 100644 --- a/subjects/isanagram/README.md +++ b/subjects/isanagram/README.md @@ -46,11 +46,11 @@ func main() { Its output: -```bash -$ go build -$ ./main +```console +$ go run . true false true true +$ ``` diff --git a/subjects/islower/README.md b/subjects/islower/README.md index f8db2125..80795fe1 100644 --- a/subjects/islower/README.md +++ b/subjects/islower/README.md @@ -34,9 +34,8 @@ func main() { And its output : ```console -student@ubuntu:~/islower/test$ go build -student@ubuntu:~/islower/test$ ./test +$ go run . true false -student@ubuntu:~/islower/test$ +$ ``` diff --git a/subjects/isnumeric/README.md b/subjects/isnumeric/README.md index 8dfe0dd8..b47f44bc 100644 --- a/subjects/isnumeric/README.md +++ b/subjects/isnumeric/README.md @@ -33,9 +33,8 @@ func main() { And its output : ```console -student@ubuntu:~/isnumeric/test$ go build -student@ubuntu:~/isnumeric/test$ ./test +$ go run . true false -student@ubuntu:~/isnumeric/test$ +$ ``` diff --git a/subjects/ispowerof2/README.md b/subjects/ispowerof2/README.md index ac2a67bf..39c06c6f 100644 --- a/subjects/ispowerof2/README.md +++ b/subjects/ispowerof2/README.md @@ -13,14 +13,13 @@ This program must print `true` if the given number is a power of 2, otherwise it ### Usage : ```console -student@ubuntu:~/ispowerof2$ go build -student@ubuntu:~/ispowerof2$ ./ispowerof2 2 | cat -e +$ go run . 2 | cat -e true$ -student@ubuntu:~/ispowerof2$ ./ispowerof2 64 +$ go run . 64 true -student@ubuntu:~/ispowerof2$ ./ispowerof2 513 +$ go run . 513 false -student@ubuntu:~/ispowerof2$ ./ispowerof2 -student@ubuntu:~/ispowerof2$ ./ispowerof2 64 1024 -student@ubuntu:~/ispowerof2$ +$ go run . +$ go run . 64 1024 +$ ``` diff --git a/subjects/isprime/README.md b/subjects/isprime/README.md index 2af2e493..5c2eca75 100644 --- a/subjects/isprime/README.md +++ b/subjects/isprime/README.md @@ -37,9 +37,8 @@ func main() { And its output : ```console -student@ubuntu:~/isprime/test$ go build -student@ubuntu:~/isprime/test$ ./test +$ go run . true false -student@ubuntu:~/isprime/test$ +$ ``` diff --git a/subjects/isprintable/README.md b/subjects/isprintable/README.md index 72a57b4e..a2b4c19b 100644 --- a/subjects/isprintable/README.md +++ b/subjects/isprintable/README.md @@ -34,9 +34,8 @@ func main() { And its output : ```console -student@ubuntu:~/isprintable/test$ go build -student@ubuntu:~/isprintable/test$ ./test +$ go run . true false -student@ubuntu:~/isprintable/test$ +$ ``` diff --git a/subjects/issorted/README.md b/subjects/issorted/README.md index 68bee50b..b55049b1 100644 --- a/subjects/issorted/README.md +++ b/subjects/issorted/README.md @@ -43,9 +43,8 @@ func main() { And its output : ```console -student@ubuntu:~/issorted/test$ go build -student@ubuntu:~/issorted/test$ ./test +$ go run . true false -student@ubuntu:~/issorted/test$ +$ ``` diff --git a/subjects/isupper/README.md b/subjects/isupper/README.md index 6072c511..c67817cc 100644 --- a/subjects/isupper/README.md +++ b/subjects/isupper/README.md @@ -34,9 +34,8 @@ func main() { And its output : ```console -student@ubuntu:~/isupper/test$ go build -student@ubuntu:~/isupper/test$ ./test +$ go run . true false -student@ubuntu:~/isupper/test$ +$ ``` diff --git a/subjects/iterativefactorial/README.md b/subjects/iterativefactorial/README.md index 5de8e08d..419f6c54 100644 --- a/subjects/iterativefactorial/README.md +++ b/subjects/iterativefactorial/README.md @@ -35,8 +35,7 @@ func main() { And its output : ```console -student@ubuntu:~/iterativefactorial/test$ go build -student@ubuntu:~/iterativefactorial/test$ ./test +$ go run . 24 -student@ubuntu:~/iterativefactorial/test$ +$ ``` diff --git a/subjects/iterativepower/README.md b/subjects/iterativepower/README.md index c72edfef..05b90323 100644 --- a/subjects/iterativepower/README.md +++ b/subjects/iterativepower/README.md @@ -35,8 +35,7 @@ func main() { And its output : ```console -student@ubuntu:~/iterativepower/test$ go build -student@ubuntu:~/iterativepower/test$ ./test +$ go run . 64 -student@ubuntu:~/iterativepower/test$ +$ ``` diff --git a/subjects/iterators/README.md b/subjects/iterators/README.md index b8bdbece..099fbef2 100644 --- a/subjects/iterators/README.md +++ b/subjects/iterators/README.md @@ -59,7 +59,7 @@ fn main() { And its output: ```console -student@ubuntu:~/iterators/test$ cargo run +$ cargo run Some((6, 5, 120)) Some((8, 7, 720)) Some((10, 9, 5040)) @@ -67,5 +67,5 @@ Some((10, 9, 5040)) Some((18, 19, 6402373705728000)) Some((20, 21, 121645100408832000)) Some((22, 23, 2432902008176640000)) -student@ubuntu:~/iterators/test$ +$ ``` diff --git a/subjects/join/README.md b/subjects/join/README.md index fd839ccc..7ecf6170 100644 --- a/subjects/join/README.md +++ b/subjects/join/README.md @@ -33,8 +33,7 @@ func main() { And its output : ```console -student@ubuntu:~/join/test$ go build -student@ubuntu:~/join/test$ ./test +$ go run . Hello!: How: are: you? -student@ubuntu:~/join/test$ +$ ``` diff --git a/subjects/lalgebra_scalar/README.md b/subjects/lalgebra_scalar/README.md index 52939a2c..96594b21 100644 --- a/subjects/lalgebra_scalar/README.md +++ b/subjects/lalgebra_scalar/README.md @@ -42,10 +42,10 @@ fn main() { And its output: ```console -student@ubuntu:~/lalgebra_scalar/test$ cargo run +$ cargo run 0.0 0 1.0 1 -student@ubuntu:~/lalgebra_scalar/test$ +$ ``` diff --git a/subjects/lalgebra_vector/README.md b/subjects/lalgebra_vector/README.md index 13cdeea1..cf708846 100644 --- a/subjects/lalgebra_vector/README.md +++ b/subjects/lalgebra_vector/README.md @@ -50,8 +50,8 @@ fn main() { And its output: ```console -student@ubuntu:~/lalgebra_vector/test$ cargo run +$ cargo run Some(3) Some(Vector([5, 1, -6])) -student@ubuntu:~/lalgebra_vector/test$ +$ ``` diff --git a/subjects/lastrune/README.md b/subjects/lastrune/README.md index 59b4baa7..a571729e 100644 --- a/subjects/lastrune/README.md +++ b/subjects/lastrune/README.md @@ -36,8 +36,7 @@ func main() { And its output : ```console -student@ubuntu:~/lastrune/test$ go build -student@ubuntu:~/lastrune/test$ ./test +$ go run . !!! -student@ubuntu:~/lastrune/test$ +$ ``` diff --git a/subjects/lastup/README.md b/subjects/lastup/README.md index f01fc951..8ebfc363 100644 --- a/subjects/lastup/README.md +++ b/subjects/lastup/README.md @@ -28,9 +28,9 @@ fn main() { And its output ```console -student@ubuntu:~/lastup/test$ cargo run +$ cargo run joE iS missinG jilL iS leavinG A hellO therE! -student@ubuntu:~/lastup/test$ +$ ``` diff --git a/subjects/lastword/README.md b/subjects/lastword/README.md index 764150e5..2860a98e 100644 --- a/subjects/lastword/README.md +++ b/subjects/lastword/README.md @@ -13,14 +13,13 @@ Write a program that takes a `string` and displays its last word, followed by a ### Usage ```console -student@ubuntu:~/lastword$ go build -student@ubuntu:~/lastword$ ./lastword "FOR PONY" | cat -e +$ go run . "FOR PONY" | cat -e PONY$ -student@ubuntu:~/lastword$ ./lastword "this ... is sparta, then again, maybe not" | cat -e +$ go run . "this ... is sparta, then again, maybe not" | cat -e not$ -student@ubuntu:~/lastword$ ./lastword " " -student@ubuntu:~/lastword$ ./lastword "a" "b" -student@ubuntu:~/lastword$ ./lastword " lorem,ipsum " | cat -e +$ go run . " " +$ go run . "a" "b" +$ go run . " lorem,ipsum " | cat -e lorem,ipsum$ -student@ubuntu:~/lastword$ +$ ``` diff --git a/subjects/lcm/README.md b/subjects/lcm/README.md index e9091eba..27e090b8 100644 --- a/subjects/lcm/README.md +++ b/subjects/lcm/README.md @@ -30,9 +30,8 @@ func main() { ### Output ```console -student@ubuntu:~/lcm/test$ go build -student@ubuntu:~/lcm/test$ ./test +$ go run . 14 0 -student@ubuntu:~/lcm/test$ +$ ``` diff --git a/subjects/lem-in/README.md b/subjects/lem-in/README.md index fa94d3b9..3ac4a533 100644 --- a/subjects/lem-in/README.md +++ b/subjects/lem-in/README.md @@ -122,7 +122,7 @@ This project will help you learn about : Example 1 : ``` -student$ ./lem-in test0.txt +$ go run . test0.txt 3 ##start 1 23 3 @@ -151,13 +151,13 @@ L1-3 L2-2 L1-4 L2-5 L3-3 L1-0 L2-6 L3-4 L2-0 L3-0 -student$ +$ ``` Example 2 : ``` -student$ ./lem-in test1.txt +$ go run . test1.txt 3 ##start 0 1 0 @@ -174,13 +174,13 @@ L1-3 L2-2 L1-1 L2-3 L3-2 L2-1 L3-3 L3-1 -student$ +$ ``` Example 3 : ``` -student$ ./lem-in test1.txt +$ go run . test1.txt 3 2 5 0 ##start @@ -197,5 +197,5 @@ student$ ./lem-in test1.txt L1-2 L2-3 L1-1 L2-1 L3-2 L3-1 -student$ +$ ``` diff --git a/subjects/lem-in/audit/README.md b/subjects/lem-in/audit/README.md index 492d884b..67a0d1e2 100644 --- a/subjects/lem-in/audit/README.md +++ b/subjects/lem-in/audit/README.md @@ -2,7 +2,7 @@ ###### Has the requirement for the allowed packages been respected? (Reminder for this project: (only [standard packages](https://golang.org/pkg/) -##### Try to run `"./lem-in example00.txt"`. +##### Try to run `go run . example00.txt`. ###### Is the program able to read the ant farm in this standard input? @@ -27,7 +27,7 @@ Lx-y ##### Try running the program with [example00](https://public.01-edu.org/subjects/lem-in/examples/). ``` -student$ ./lem-in example00.txt +$ go run . example00.txt 4 ##start 0 0 3 @@ -45,7 +45,7 @@ L1-1 L2-3 L3-2 L2-1 L3-3 L4-2 L3-1 L4-3 L4-1 -student$ +$ ``` ###### Does it present the quickest path possible with the same number of turns as the result above? @@ -53,7 +53,7 @@ student$ ##### Try running the program with [example01](https://public.01-edu.org/subjects/lem-in/examples/). ``` -student$ ./lem-in example01.txt +$ go run . example01.txt 10 ##start start 1 6 @@ -97,7 +97,7 @@ L1-end L2-end L3-end L4-m L5-k L6-e L7-a L8-c L9-n L10-E L4-end L5-end L6-end L7-m L8-k L9-e L10-a L7-end L8-end L9-end L10-m L10-end -student$ +$ ``` ###### Does it present the quickest path possible with the same number of turns as the result above? @@ -105,7 +105,7 @@ student$ ##### Try running the program with [example02](https://public.01-edu.org/subjects/lem-in/examples/). ``` -student$ ./lem-in example02.txt +$ go run . example02.txt 20 ##start 0 2 0 @@ -119,7 +119,7 @@ student$ ./lem-in example02.txt 3-2 L1-3 L2-3 L3-3 L4-3 L5-3 L6-3 L7-3 L8-3 L9-3 L10-3 L11-3 L12-3 L13-3 L14-3 L15-3 L16-3 L17-3 L18-3 L19-3 L20-3 -student$ +$ ``` ###### Does it present the quickest path possible with the same number of turns as the result above? @@ -127,7 +127,7 @@ student$ ##### Try running the program with [example03](https://public.01-edu.org/subjects/lem-in/examples/). ``` -student$ ./lem-in example03.txt +$ go run . example03.txt 4 4 5 4 ##start @@ -151,7 +151,7 @@ L1-5 L2-4 L3-1 L2-5 L3-4 L4-1 L3-5 L4-4 L4-5 -student$ +$ ``` ###### Does it present the quickest path possible with the same number of turns as the result above? @@ -159,7 +159,7 @@ student$ ##### Try running the program with [example04](https://public.01-edu.org/subjects/lem-in/examples/). ``` -student$ ./lem-in example04.txt +$ go run . example04.txt 9 ##start richard 0 6 @@ -184,7 +184,7 @@ L2-peter L3-peter L4-gilfoyle L5-jimYoung L7-dinish L4-peter L5-peter L6-gilfoyle L7-jimYoung L9-dinish L6-peter L7-peter L8-gilfoyle L9-jimYoung L8-peter L9-peter -student$ +$ ``` ###### Does it present the quickest path possible with the same number of turns as the result above? @@ -192,7 +192,7 @@ student$ ##### Try running the program with [example05](https://public.01-edu.org/subjects/lem-in/examples/). ``` -student$ ./lem-in example05.txt +$ go run . example05.txt 9 #rooms ##start @@ -268,7 +268,7 @@ L2-end L3-A2 L4-D3 L5-D2 L6-I4 L7-A1 L8-A0 L9-E2 L3-end L4-end L5-D3 L6-I5 L7-A2 L8-A1 L9-D2 L5-end L6-end L7-end L8-A2 L9-D3 L8-end L9-end -student$ +$ ``` ###### Does it present the quickest path possible with the same number of turns as the result above? @@ -276,9 +276,9 @@ student$ ##### Try running the program with [badexample00](https://public.01-edu.org/subjects/lem-in/examples/). ``` -student$ ./lem-in badexample00.txt +$ go run . badexample00.txt ERROR: invalid data format -student$ +$ ``` ###### Does it present the right result as above? @@ -286,9 +286,9 @@ student$ ##### Try running the program with [badexample01](https://public.01-edu.org/subjects/lem-in/examples/). ``` -student$ ./lem-in badexample01.txt +$ go run . badexample01.txt ERROR: invalid data format -student$ +$ ``` ###### Does it present at least the result above? diff --git a/subjects/lifetimes/README.md b/subjects/lifetimes/README.md index 2e366166..1196bea1 100644 --- a/subjects/lifetimes/README.md +++ b/subjects/lifetimes/README.md @@ -47,7 +47,7 @@ fn main() { And its output: ```console -student@ubuntu:~/lifetimes/test$ cargo run +$ cargo run Person = Person { name: "Leo", age: 0 } -student@ubuntu:~/lifetimes/test$ +$ ``` diff --git a/subjects/listat/README.md b/subjects/listat/README.md index d5898523..61d02606 100644 --- a/subjects/listat/README.md +++ b/subjects/listat/README.md @@ -49,10 +49,9 @@ func main() { And its output : ```console -student@ubuntu:~/listat/test$ go build -student@ubuntu:~/listat/test$ ./test +$ go run . 1 how are -student@ubuntu:~/listat/test$ +$ ``` diff --git a/subjects/listclear/README.md b/subjects/listclear/README.md index 491ea280..22dae57b 100644 --- a/subjects/listclear/README.md +++ b/subjects/listclear/README.md @@ -58,11 +58,10 @@ func main() { And its output : ```console -student@ubuntu:~/listclear/test$ go build -student@ubuntu:~/listclear/test$ ./test +$ go run . ------list------ I -> 1 -> something -> 2 -> ------updated list------ -student@ubuntu:~/listclear/test$ +$ ``` diff --git a/subjects/listfind/README.md b/subjects/listfind/README.md index 92ae58db..79cb8432 100644 --- a/subjects/listfind/README.md +++ b/subjects/listfind/README.md @@ -58,11 +58,10 @@ func main() { And its output : ```console -student@ubuntu:~/listfind/test$ go build -student@ubuntu:~/listfind/test$ ./test +$ go run . 0xc42000a0a0 hello2 -student@ubuntu:~/listfind/test$ +$ ``` ### Note diff --git a/subjects/listforeach/README.md b/subjects/listforeach/README.md index a7cdde8e..12ef6d7d 100644 --- a/subjects/listforeach/README.md +++ b/subjects/listforeach/README.md @@ -76,11 +76,10 @@ func main() { And its output : ```console -student@ubuntu:~/listforeach/test$ go build -student@ubuntu:~/listforeach/test$ ./test +$ go run . 12 22 32 52 -student@ubuntu:~/listforeach/test$ +$ ``` diff --git a/subjects/listforeachif/README.md b/subjects/listforeachif/README.md index ecde00d8..28a237f6 100644 --- a/subjects/listforeachif/README.md +++ b/subjects/listforeachif/README.md @@ -117,8 +117,7 @@ func main() { And its output : ```console -student@ubuntu:~/listforeachif/test$ go build -student@ubuntu:~/listforeachif/test$ ./test +$ go run . 1->hello->3->there->23->!->54->nil --------function applied-------- 1 @@ -128,6 +127,5 @@ student@ubuntu:~/listforeachif/test$ ./test --------function applied-------- 1->2->3->2->23->2->54->nil -student@ubuntu:~/listforeachif/test$ -student@ubuntu:~/listforeachif/test$ +$ ``` diff --git a/subjects/listlast/README.md b/subjects/listlast/README.md index c7f11316..15cd4d99 100644 --- a/subjects/listlast/README.md +++ b/subjects/listlast/README.md @@ -51,9 +51,8 @@ func main() { And its output : ```console -student@ubuntu:~/listlast/test$ go build -student@ubuntu:~/listlast/test$ ./test +$ go run . 1 -student@ubuntu:~/listlast/test$ +$ ``` diff --git a/subjects/listmerge/README.md b/subjects/listmerge/README.md index e3c6fad5..e639251a 100644 --- a/subjects/listmerge/README.md +++ b/subjects/listmerge/README.md @@ -73,13 +73,12 @@ func main() { And its output : ```console -student@ubuntu:~/listmerge/test$ go build -student@ubuntu:~/listmerge/test$ ./test +$ go run . -----first List------ a -> b -> c -> d -> -----second List------ e -> f -> g -> h -> -----Merged List----- a -> b -> c -> d -> e -> f -> g -> h -> -student@ubuntu:~/listmerge/test$ +$ ``` diff --git a/subjects/listpushback/README.md b/subjects/listpushback/README.md index c0442970..a79ddb28 100644 --- a/subjects/listpushback/README.md +++ b/subjects/listpushback/README.md @@ -52,10 +52,9 @@ func main() { And its output : ```console -student@ubuntu:~/listpushback/test$ go build -student@ubuntu:~/listpushback/test$ ./test +$ go run . Hello man how are you -student@ubuntu:~/listpushback/test$ +$ ``` diff --git a/subjects/listpushfront/README.md b/subjects/listpushfront/README.md index 52f591d1..4ba4d85c 100644 --- a/subjects/listpushfront/README.md +++ b/subjects/listpushfront/README.md @@ -55,8 +55,7 @@ func main() { And its output : ```console -student@ubuntu:~/listpushfront/test$ go build -student@ubuntu:~/listpushfront/test$ ./test +$ go run . how are you man Hello -student@ubuntu:~/listpushfront/test$ +$ ``` diff --git a/subjects/listpushpara/README.md b/subjects/listpushpara/README.md index 5886cf11..dc811e66 100644 --- a/subjects/listpushpara/README.md +++ b/subjects/listpushpara/README.md @@ -9,12 +9,11 @@ Write a program that creates a new linked list and includes each command-line ar And its output : ```console -student@ubuntu:~/listpushpara/test$ go build -student@ubuntu:~/listpushpara/test$ ./listpushparams choumi is the best cat +$ go run . choumi is the best cat cat best the is choumi -student@ubuntu:~/listpushpara/test$ +$ ``` diff --git a/subjects/listpushparams/README.md b/subjects/listpushparams/README.md index d46ae7a2..08679acd 100644 --- a/subjects/listpushparams/README.md +++ b/subjects/listpushparams/README.md @@ -9,12 +9,11 @@ Write a program that creates a new linked list and includes each command-line ar And its output : ```console -student@ubuntu:~/listpushparams/test$ go build -student@ubuntu:~/listpushparams/test$ ./listpushparams choumi is the best cat +$ go run . choumi is the best cat cat best the is choumi -student@ubuntu:~/listpushparams/test$ +$ ``` diff --git a/subjects/listremoveif/README.md b/subjects/listremoveif/README.md index 20e5219d..3fbfbfb7 100644 --- a/subjects/listremoveif/README.md +++ b/subjects/listremoveif/README.md @@ -80,8 +80,7 @@ func main() { And its output : ```console -student@ubuntu:~/listremoveif/test$ go build -student@ubuntu:~/listremoveif/test$ ./test +$ go run . ----normal state---- 1 -> ------answer----- @@ -91,5 +90,5 @@ student@ubuntu:~/listremoveif/test$ ./test 1 -> Hello -> 1 -> There -> 1 -> 1 -> How -> 1 -> are -> you -> 1 -> ------answer----- Hello -> There -> How -> are -> you -> -student@ubuntu:~/listremoveif/test$ +$ ``` diff --git a/subjects/listreverse/README.md b/subjects/listreverse/README.md index cf144e73..3cbbd3f2 100644 --- a/subjects/listreverse/README.md +++ b/subjects/listreverse/README.md @@ -59,13 +59,12 @@ func main() { And its output : ```console -student@ubuntu:~/listreverse/test$ go build -student@ubuntu:~/listreverse/test$ ./test +$ go run . 4 3 2 1 Tail &{1 } Head &{4 0xc42000a140} -student@ubuntu:~/listreverse/test$ +$ ``` diff --git a/subjects/listsize/README.md b/subjects/listsize/README.md index 6c386a10..7a6edbef 100644 --- a/subjects/listsize/README.md +++ b/subjects/listsize/README.md @@ -49,8 +49,7 @@ func main() { And its output : ```console -student@ubuntu:~/listsize/test$ go build -student@ubuntu:~/listsize/test$ ./test +$ go run . 4 -student@ubuntu:~/listsize/test$ +$ ``` diff --git a/subjects/listsort/README.md b/subjects/listsort/README.md index 9219ed7d..debac852 100644 --- a/subjects/listsort/README.md +++ b/subjects/listsort/README.md @@ -71,8 +71,7 @@ func main() { And its output : ```console -student@ubuntu:~/listsort/test$ go build -student@ubuntu:~/listsort/test$ ./test +$ go run . 1 -> 2 -> 3 -> 4 -> 5 -> -student@ubuntu:~/listsort/test$ +$ ``` diff --git a/subjects/logic_number/README.md b/subjects/logic_number/README.md index bae071ee..1775598a 100644 --- a/subjects/logic_number/README.md +++ b/subjects/logic_number/README.md @@ -51,10 +51,10 @@ fn main() { And its output: ```console -student@ubuntu:~/logic_number/test$ cargo run +$ cargo run this number returns true because the number 9 obey the rules of the sequence this number returns false because the number 10 does not obey the rules of the sequence this number returns true because the number 153 obey the rules of the sequence this number returns false because the number 154 does not obey the rules of the sequence -student@ubuntu:~/logic_number/test$ +$ ``` diff --git a/subjects/lunch_queue/README.md b/subjects/lunch_queue/README.md index 913b276b..0c87a382 100644 --- a/subjects/lunch_queue/README.md +++ b/subjects/lunch_queue/README.md @@ -73,7 +73,7 @@ fn main() { And its output: ```console -student@ubuntu:~/lunch_queue/test$ cargo run +$ cargo run Queue { node: Some(Person { name: "Alice", discount: 35, next_person: Some(Person { name: "Ana", discount: 5, next_person: Some(Person { name: "Monica", discount: 15, next_person: Some(Person { name: "Marie", discount: 20, next_person: None }) }) }) }) } Some(("Marie", 20)) Some(("Alice", 35)) @@ -81,5 +81,5 @@ None removed Some(("Marie", 20)) list Queue { node: Some(Person { name: "Alice", discount: 35, next_person: Some(Person { name: "Ana", discount: 5, next_person: Some(Person { name: "Monica", discount: 15, next_person: None }) }) }) } invert Queue { node: Some(Person { name: "Monica", discount: 15, next_person: Some(Person { name: "Ana", discount: 5, next_person: Some(Person { name: "Alice", discount: 35, next_person: None }) }) }) } -student@ubuntu:~/lunch_queue/test$ +$ ``` diff --git a/subjects/makerange/README.md b/subjects/makerange/README.md index 2e60bba5..0ad01a23 100644 --- a/subjects/makerange/README.md +++ b/subjects/makerange/README.md @@ -40,9 +40,8 @@ func main() { And its output : ```console -student@ubuntu:~/makerange/test$ go build -student@ubuntu:~/makerange/test$ ./test +$ go run . [5 6 7 8 9] [] -student@ubuntu:~/makerange/test$ +$ ``` diff --git a/subjects/map/README.md b/subjects/map/README.md index 6492ae11..a087f755 100644 --- a/subjects/map/README.md +++ b/subjects/map/README.md @@ -34,8 +34,7 @@ func main() { And its output : ```console -student@ubuntu:~/map/test$ go build -student@ubuntu:~/map/test$ ./test +$ go run . [false true true false true false] -student@ubuntu:~/map/test$ +$ ``` diff --git a/subjects/matrix/README.md b/subjects/matrix/README.md index ee3cb091..303bc903 100644 --- a/subjects/matrix/README.md +++ b/subjects/matrix/README.md @@ -51,9 +51,9 @@ fn main() { And its output: ```console -student@ubuntu:~/matrix/test$ cargo run +$ cargo run Matrix([[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]]) Matrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) Matrix([[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]]) -student@ubuntu:~/matrix/test$ +$ ``` diff --git a/subjects/matrix_display/README.md b/subjects/matrix_display/README.md index ed8fbe31..11321bec 100644 --- a/subjects/matrix_display/README.md +++ b/subjects/matrix_display/README.md @@ -38,9 +38,9 @@ fn main() { And it's output: ```console -student@ubuntu:~/matrix_display/test$ cargo run +$ cargo run (1 2 3) (4 5 6) (7 8 9) -student@ubuntu:~/matrix_display/test$ +$ ``` diff --git a/subjects/matrix_mult/README.md b/subjects/matrix_mult/README.md index f390fd6d..779a1bc5 100644 --- a/subjects/matrix_mult/README.md +++ b/subjects/matrix_mult/README.md @@ -57,11 +57,11 @@ fn main() { And its output ```console -student@ubuntu:~/matrix_mult/test$ cargo run +$ cargo run [3, 8] [8, 0] Some(Matrix([[1, 0], [0, 0]])) 2 2 -student@ubuntu:~/matrix_mult/test$ +$ ``` diff --git a/subjects/matrix_ops/README.md b/subjects/matrix_ops/README.md index 4c0da724..d78a0ed3 100644 --- a/subjects/matrix_ops/README.md +++ b/subjects/matrix_ops/README.md @@ -52,10 +52,10 @@ fn main() { And its output ```console -student@ubuntu:~/matrix_ops/test$ cargo run +$ cargo run Some(Matrix([[9, 2], [10, 2]])) Some(Matrix([[-2, 2], [1, 4]])) None None -student@ubuntu:~/matrix_ops/test$ +$ ``` diff --git a/subjects/matrix_transposition/README.md b/subjects/matrix_transposition/README.md index b99b66df..eddbc2af 100644 --- a/subjects/matrix_transposition/README.md +++ b/subjects/matrix_transposition/README.md @@ -60,8 +60,8 @@ fn main() { And its output: ```console -student@ubuntu:~/matrix_transposition/test$ cargo run +$ cargo run Original matrix Matrix((1, 3), (4, 5)) Transpose matrix Matrix((1, 4), (3, 5)) -student@ubuntu:~/matrix_transposition/test$ +$ ``` diff --git a/subjects/matrix_transposition_4by3/README.md b/subjects/matrix_transposition_4by3/README.md index b72cd3ed..34a18bbd 100644 --- a/subjects/matrix_transposition_4by3/README.md +++ b/subjects/matrix_transposition_4by3/README.md @@ -63,8 +63,8 @@ fn main() { And its output: ```console -student@ubuntu:~/matrix_transposition_4by3/test$ cargo run +$ cargo run Original matrix Matrix4by3((1, 2, 3), (4, 5, 6), (7, 8, 9), (10, 11, 12)) Transpose matrix Matrix3by4((1, 4, 7, 10), (2, 5, 8, 11), (3, 6, 9, 12)) -student@ubuntu:~/matrix_transposition_4by3/test$ +$ ``` diff --git a/subjects/max/README.md b/subjects/max/README.md index 4f461026..22d43789 100644 --- a/subjects/max/README.md +++ b/subjects/max/README.md @@ -34,8 +34,7 @@ func main() { And its output : ```console -student@ubuntu:~/max/test$ go build -student@ubuntu:~/max/test$ ./test +$ go run . 123 -student@ubuntu:~/max/test$ +$ ``` diff --git a/subjects/merge/README.md b/subjects/merge/README.md index c9377241..b02b5df9 100644 --- a/subjects/merge/README.md +++ b/subjects/merge/README.md @@ -68,8 +68,7 @@ func main() { ### Output ```console -student@ubuntu:~/merge/test$ go build -student@ubuntu:~/merge/test$ ./test +$ go run . [20, 2, 3, 4, 5, 6, 6, 7, 3, 5] -student@ubuntu:~/merge/test$ +$ ``` diff --git a/subjects/name_initials/README.md b/subjects/name_initials/README.md index 48213cd7..f231aff2 100644 --- a/subjects/name_initials/README.md +++ b/subjects/name_initials/README.md @@ -35,7 +35,7 @@ fn main() { And its output ```console -student@ubuntu:~/name_initials/test$ cargo run +$ cargo run ["H. P.", "S. E.", "J. L.", "B. O."] -student@ubuntu:~/name_initials/test$ +$ ``` diff --git a/subjects/nauuo/README.md b/subjects/nauuo/README.md index 95c85e38..08f1a3ad 100644 --- a/subjects/nauuo/README.md +++ b/subjects/nauuo/README.md @@ -41,11 +41,10 @@ func main() { And its output : ```console -student@ubuntu:~/nauuo/test$ go build -student@ubuntu:~/nauuo/test$ ./test +$ go run . ? 0 + - -student@ubuntu:~/nauuo/test$ +$ ``` diff --git a/subjects/nbrconvertalpha/README.md b/subjects/nbrconvertalpha/README.md index 6652777c..ee21124c 100644 --- a/subjects/nbrconvertalpha/README.md +++ b/subjects/nbrconvertalpha/README.md @@ -11,15 +11,14 @@ A flag `--upper` should be implemented. When used the program prints the result ### Usage ```console -student@ubuntu:~/student/test$ go build -student@ubuntu:~/student/test$ ./nbrconvertalpha -student@ubuntu:~/student/test$ ./nbrconvertalpha 8 5 12 12 15 | cat -e +$ go run . +$ go run . 8 5 12 12 15 | cat -e hello$ -student@ubuntu:~/student/test$ ./nbrconvertalpha 12 5 7 5 14 56 4 1 18 25 | cat -e +$ go run . 12 5 7 5 14 56 4 1 18 25 | cat -e legen dary$ -student@ubuntu:~/student/test$ ./nbrconvertalpha 32 86 h | cat -e +$ go run . 32 86 h | cat -e $ -student@ubuntu:~/student/test$ ./nbrconvertalpha --upper 8 5 25 +$ go run . --upper 8 5 25 HEY$ -student@ubuntu:~/student/test$ +$ ``` diff --git a/subjects/nenokku/README.md b/subjects/nenokku/README.md index b4597d6e..f5884a36 100644 --- a/subjects/nenokku/README.md +++ b/subjects/nenokku/README.md @@ -12,10 +12,11 @@ Intersection of words is counted as if it is in your dictionary (see example). Write a program that takes as arguments operations. ```console -$ ./main "? love" "? is" "A loveis" "? love" "? Who" "A Whoareyou" "? is" +$ go run . "? love" "? is" "A loveis" "? love" "? Who" "A Whoareyou" "? is" NO NO YES NO YES +$ ``` diff --git a/subjects/net-cat/README.md b/subjects/net-cat/README.md index ad9e3097..e0b7c943 100644 --- a/subjects/net-cat/README.md +++ b/subjects/net-cat/README.md @@ -63,19 +63,19 @@ This project will help you learn about : ### Usage ```console -student$ go build -student$ ./TCPChat +$ go run . Listening on the port :8989 -student$ ./TCPChat 2525 +$ go run . 2525 Listening on the port :2525 -student$ ./TCPChat 2525 localhost +$ go run . 2525 localhost [USAGE]: ./TCPChat $port +$ ``` - You should answer the client with a linux logo and ask for their name, when connection is received ```console -student$ nc $IP $port +$ nc $IP $port Welcome to TCP-Chat! _nnnn_ dGGGGMMb @@ -101,20 +101,20 @@ _) \.___.,| .' The client : ```console -student$ nc $IP $port +$ nc $IP $port ``` Server: ```console -student$ ./TCPChat 2525 +$ go run . 2525 Listening on the port :2525 ``` Client1 (Yenlik): ```console -student$ nc localhost 2525 +$ nc localhost 2525 Welcome to TCP-Chat! _nnnn_ dGGGGMMb @@ -155,7 +155,7 @@ Lee has left our chat... Client2 (Lee): ```console -student$ nc localhost 2525 +$ nc localhost 2525 Yenliks-MacBook-Air:simpleTCPChat ybokina$ nc localhost 2525 Yenliks-MacBook-Air:simpleTCPChat ybokina$ nc localhost 2525 Welcome to TCP-Chat! diff --git a/subjects/now-get-to-work/README.md b/subjects/now-get-to-work/README.md index ec116b94..77c2eb74 100644 --- a/subjects/now-get-to-work/README.md +++ b/subjects/now-get-to-work/README.md @@ -11,9 +11,9 @@ Submit your solution in the file `my_answer.sh` that will print it when executed ### Utilisation ```console -student@ubuntu:~/now-get-to-work/test$ ./my_answer.sh | cat -e +$ ./my_answer.sh | cat -e John Doe$ -student@ubuntu:~/now-get-to-work/test$ +$ ``` ### Hint diff --git a/subjects/nrune/README.md b/subjects/nrune/README.md index e89ce7fe..0bdc1624 100644 --- a/subjects/nrune/README.md +++ b/subjects/nrune/README.md @@ -40,8 +40,7 @@ func main() { And its output : ```console -student@ubuntu:~/nrune/test$ go build -student@ubuntu:~/nrune/test$ ./test +$ go run . la! -student@ubuntu:~/nrune/test$ +$ ``` diff --git a/subjects/options/README.md b/subjects/options/README.md index a4ec433a..807c4b3c 100644 --- a/subjects/options/README.md +++ b/subjects/options/README.md @@ -21,26 +21,25 @@ Write a program that takes an undefined number of arguments which could be consi ### Usage ```console -student@ubuntu:~/options/test$ go build -student@ubuntu:~/options/test$ ./test | cat -e +$ go run . | cat -e options: abcdefghijklmnopqrstuvwxyz$ -student@ubuntu:~/options/test$ ./test -abc -ijk | cat -e +$ go run . -abc -ijk | cat -e 00000000 00000000 00000111 00000111$ -student@ubuntu:~/options/test$ ./test -z | cat -e +$ go run . -z | cat -e 00000010 00000000 00000000 00000000$ -student@ubuntu:~/options/test$ ./test -abc -hijk | cat -e +$ go run . -abc -hijk | cat -e options: abcdefghijklmnopqrstuvwxyz$ -student@ubuntu:~/options/test$ ./test -h | cat -e +$ go run . -h | cat -e options: abcdefghijklmnopqrstuvwxyz$ -student@ubuntu:~/options/test$ ./test -zh | cat -e +$ go run . -zh | cat -e 00000010 00000000 00000000 10000000$ -student@ubuntu:~/options/test$ ./test -z -h | cat -e +$ go run . -z -h | cat -e options: abcdefghijklmnopqrstuvwxyz$ -student@ubuntu:~/options/test$ ./test -hhhhhh | cat -e +$ go run . -hhhhhh | cat -e options: abcdefghijklmnopqrstuvwxyz$ -student@ubuntu:~/options/test$ ./test -eeeeee | cat -e +$ go run . -eeeeee | cat -e 00000000 00000000 00000000 00010000$ -student@ubuntu:~/options/test$ ./test -% | cat -e +$ go run . -% | cat -e Invalid Option$ -student@ubuntu:~/options/test$ +$ ``` diff --git a/subjects/ordinal/README.md b/subjects/ordinal/README.md index 97631f16..ea5f2bae 100644 --- a/subjects/ordinal/README.md +++ b/subjects/ordinal/README.md @@ -30,10 +30,10 @@ fn main() { And its output ```console -student@ubuntu:~/ordinal/test$ cargo run +$ cargo run 1st 22nd 43rd 47th -student@ubuntu:~/ordinal/test$ +$ ``` diff --git a/subjects/ownership/README.md b/subjects/ownership/README.md index 828ec180..92da716e 100644 --- a/subjects/ownership/README.md +++ b/subjects/ownership/README.md @@ -40,10 +40,10 @@ fn main() { And its output: ```console -student@ubuntu:~/ownership/test$ cargo run +$ cargo run first_subword(helloWorld) = hello first_subword(snake_case) = snake first_subword(CamelCase) = Camel first_subword(just) = just -student@ubuntu:~/ownership/test$ +$ ``` diff --git a/subjects/pangram/README.md b/subjects/pangram/README.md index c94cf52c..d543ba76 100644 --- a/subjects/pangram/README.md +++ b/subjects/pangram/README.md @@ -41,8 +41,8 @@ fn main() { And its output: ```console -student@ubuntu:~/pangram/test$ cargo run +$ cargo run true false -student@ubuntu:~/pangram/test$ +$ ``` diff --git a/subjects/panic/README.md b/subjects/panic/README.md index a3625b0a..58403a39 100644 --- a/subjects/panic/README.md +++ b/subjects/panic/README.md @@ -36,7 +36,7 @@ fn main() { And its output: ```console -student@ubuntu:~/panic/test$ cargo run +$ cargo run File { fd: 3, path: "panic/a.txt", read: true, write: false } -student@ubuntu:~/panic/test$ +$ ``` diff --git a/subjects/paramcount/README.md b/subjects/paramcount/README.md index cb42dbbe..f493e085 100644 --- a/subjects/paramcount/README.md +++ b/subjects/paramcount/README.md @@ -9,12 +9,11 @@ If there is no argument, the program displays `0` followed by a newline. ### Usage ```console -student@ubuntu:~/paramcount$ go build -student@ubuntu:~/paramcount$ ./paramcount 1 2 3 5 7 24 +$ go run . 1 2 3 5 7 24 6 -student@ubuntu:~/paramcount$ ./paramcount 6 12 24 | cat -e +$ go run . 6 12 24 | cat -e 3$ -student@ubuntu:~/paramcount$ ./paramcount | cat -e +$ go run . | cat -e 0$ -student@ubuntu:~/paramcount$ +$ ``` diff --git a/subjects/pig_latin/README.md b/subjects/pig_latin/README.md index 305ebc2f..6055ea60 100644 --- a/subjects/pig_latin/README.md +++ b/subjects/pig_latin/README.md @@ -42,12 +42,12 @@ fn main() { And its output: ```console -student@ubuntu:~/pig_latin/test$ cargo run +$ cargo run iglooay appleay ellohay aresquay enonxay airchay -student@ubuntu:~/pig_latin/test$ +$ ``` diff --git a/subjects/piglatin/README.md b/subjects/piglatin/README.md index c823c0a2..0d7d4390 100644 --- a/subjects/piglatin/README.md +++ b/subjects/piglatin/README.md @@ -16,16 +16,15 @@ If the number of arguments is different from one, the program prints nothing. ### Usage ```console -student@ubuntu:~/student/test$ go build -student@ubuntu:~/student/test$ ./piglatin -student@ubuntu:~/student/test$ ./piglatin pig | cat -e +$ go run . +$ go run . pig | cat -e igpay$ -student@ubuntu:~/student/test$ ./piglatin Is | cat -e +$ go run . Is | cat -e Isay$ -student@ubuntu:~/student/test$ ./piglatin crunch | cat -e +$ go run . crunch | cat -e unchcray$ -student@ubuntu:~/student/test$ ./piglatin crnch | cat -e +$ go run . crnch | cat -e No vowels$ -student@ubuntu:~/student/test$ ./piglatin something else | cat -e -student@ubuntu:~/student/test$ +$ go run . something else | cat -e +$ ``` diff --git a/subjects/point/README.md b/subjects/point/README.md index 06aedd89..7d532066 100644 --- a/subjects/point/README.md +++ b/subjects/point/README.md @@ -30,8 +30,7 @@ func main() { ### Usage ```console -student@ubuntu:~/point$ go build -student@ubuntu:~/point$ ./point +$ go run . x = 42, y = 21 -student@ubuntu:~/point$ +$ ``` diff --git a/subjects/pointone/README.md b/subjects/pointone/README.md index 9d405a6b..bc0b5939 100644 --- a/subjects/pointone/README.md +++ b/subjects/pointone/README.md @@ -34,8 +34,7 @@ func main() { And its output : ```console -student@ubuntu:~/pointone/test$ go build -student@ubuntu:~/pointone/test$ ./test +$ go run . 1 -student@ubuntu:~/pointone/test$ +$ ``` diff --git a/subjects/printalphabetalt/README.md b/subjects/printalphabetalt/README.md index 39c6e682..99526305 100644 --- a/subjects/printalphabetalt/README.md +++ b/subjects/printalphabetalt/README.md @@ -12,9 +12,8 @@ A line is a sequence of characters preceding the [end of line](https://en.wikipe ### Usage ```console -student@ubuntu:~/printalphabetalt$ go build -student@ubuntu:~/printalphabetalt$ ./printalphabetalt +$ go run . aBcDeFgHiJkLmNoPqRsTuVwXyZ zYxWvUtSrQpOnMlKjIhGfEdCbA -student@ubuntu:~/printalphabetalt$ +$ ``` diff --git a/subjects/printalphabetalt2/README.md b/subjects/printalphabetalt2/README.md index 664b1aa1..34d115c5 100644 --- a/subjects/printalphabetalt2/README.md +++ b/subjects/printalphabetalt2/README.md @@ -12,9 +12,8 @@ A line is a sequence of characters preceding the [end of line](https://en.wikipe ### Usage ```console -student@ubuntu:~/printalphabetalt2$ go build -student@ubuntu:~/printalphabetalt2$ ./printalphabetalt2 +$ go run . AbCdEfGhIjKlMnOpQrStUvWxYz ZyXwVuTsRqPoNmLkJiHgFeDcBa -student@ubuntu:~/printalphabetalt2$ +$ ``` diff --git a/subjects/printalphabetg/README.md b/subjects/printalphabetg/README.md index f13c8e09..034cf704 100644 --- a/subjects/printalphabetg/README.md +++ b/subjects/printalphabetg/README.md @@ -9,8 +9,7 @@ A line is a sequence of characters preceding the [end of line](https://en.wikipe ### Usage ```console -student@ubuntu:~/printalphabetg$ go build -student@ubuntu:~/printalphabetg$ ./printalphabetg +$ go run . abcdefg -student@ubuntu:~/printalphabetg$ +$ ``` diff --git a/subjects/printalt/README.md b/subjects/printalt/README.md index 1840aa50..3ef15114 100644 --- a/subjects/printalt/README.md +++ b/subjects/printalt/README.md @@ -11,8 +11,7 @@ Please note that `casting` is not allowed for this exercise! ### Usage ```console -student@ubuntu:~/printalt$ go build -student@ubuntu:~/printalt$ ./printalt +$ go run . azbycxdwevfugthsirjqkplomn -student@ubuntu:~/printalt$ +$ ``` diff --git a/subjects/printalt2/README.md b/subjects/printalt2/README.md index aa1917f1..c838bdc4 100644 --- a/subjects/printalt2/README.md +++ b/subjects/printalt2/README.md @@ -11,8 +11,7 @@ Please note that `casting` is not allowed for this exercise! ### Usage ```console -student@ubuntu:~/printalt2$ go build -student@ubuntu:~/printalt2$ ./printalt2 +$ go run . zaybxcwdveuftgshriqjpkolnm -student@ubuntu:~/printalt2$ +$ ``` diff --git a/subjects/printaltu/README.md b/subjects/printaltu/README.md index c17c8694..c8900f41 100644 --- a/subjects/printaltu/README.md +++ b/subjects/printaltu/README.md @@ -11,8 +11,7 @@ Please note that `casting` is not allowed for this exercise! ### Usage ```console -student@ubuntu:~/printaltu$ go build -student@ubuntu:~/printaltu$ ./printaltu +$ go run . AZBYCXDWEVFUGTHSIRJQKPLOMN -student@ubuntu:~/printaltu$ +$ ``` diff --git a/subjects/printaltu2/README.md b/subjects/printaltu2/README.md index cfa07b6c..71b60c94 100644 --- a/subjects/printaltu2/README.md +++ b/subjects/printaltu2/README.md @@ -11,8 +11,7 @@ Please note that `casting` is not allowed for this exercise! ### Usage ```console -student@ubuntu:~/printaltu2$ go build -student@ubuntu:~/printaltu2$ ./printaltu2 +$ go run . ZAYBXCWDVEUFTGSHRIQJPKOLNM -student@ubuntu:~/printaltu2$ +$ ``` diff --git a/subjects/printbits/README.md b/subjects/printbits/README.md index 67cf8150..15bf2dc6 100644 --- a/subjects/printbits/README.md +++ b/subjects/printbits/README.md @@ -9,14 +9,13 @@ Write a program that takes a number as argument, and prints it in binary value * ### Usage : ```console -student@ubuntu:~/printbits$ go build -student@ubuntu:~/printbits$ ./printbits 1 -00000001student@ubuntu:~/printbits$ -student@ubuntu:~/printbits$ ./printbits 192 -11000000student@ubuntu:~/printbits$ -student@ubuntu:~/printbits$ ./printbits a -00000000student@ubuntu:~/printbits$ -student@ubuntu:~/printbits$ ./printbits 1 1 -student@ubuntu:~/printbits$ ./printbits -student@ubuntu:~/printbits$ +$ go run . 1 +00000001$ +$ go run . 192 +11000000$ +$ go run . a +00000000$ +$ go run . 1 1 +$ go run . +$ ``` diff --git a/subjects/printchessboard/README.md b/subjects/printchessboard/README.md index ac2b10d7..2828a38f 100644 --- a/subjects/printchessboard/README.md +++ b/subjects/printchessboard/README.md @@ -9,14 +9,13 @@ Write a program that takes two integers as arguments and displays the chess desk ### Usage ```console -student@ubuntu:~/printchessboard$ go build -student@ubuntu:~/printchessboard$ ./printchessboard 4 3 | cat -e +$ go run . 4 3 | cat -e # # $ # #$ # # $ -student@ubuntu:~/printchessboard$ ./printchessboard 7 | cat -e +$ go run . 7 | cat -e Error$ -student@ubuntu:~/printchessboard$ ./printchessboard 0 0 | cat -e +$ go run . 0 0 | cat -e Error$ -student@ubuntu:~/printchessboard$ +$ ``` diff --git a/subjects/printhex/README.md b/subjects/printhex/README.md index 22bd75a1..5791e20b 100644 --- a/subjects/printhex/README.md +++ b/subjects/printhex/README.md @@ -10,15 +10,14 @@ Write a program that takes a positive (or zero) number expressed in base 10, and ### Usage ```console -student@ubuntu:~/printhex/test$ go build -student@ubuntu:~/printhex/test$ ./test 10 +$ go run . 10 a -student@ubuntu:~/printhex/test$ ./test 255 +$ go run . 255 ff -student@ubuntu:~/printhex/test$ ./test 5156454 +$ go run . 5156454 4eae66 -student@ubuntu:~/printhex/test$ ./test -student@ubuntu:~/printhex/test$ ./test "123 132 1" | cat -e +$ go run . +$ go run . "123 132 1" | cat -e ERROR$ -student@ubuntu:~/printhex/test$ +$ ``` diff --git a/subjects/printmemory/README.md b/subjects/printmemory/README.md index c097412f..a0e5799a 100644 --- a/subjects/printmemory/README.md +++ b/subjects/printmemory/README.md @@ -31,11 +31,10 @@ func main() { And its output : ```console -student@ubuntu:~/printmemory/test$ go build -student@ubuntu:~/printmemory/test$ ./test | cat -e +$ go run . | cat -e 6800 0000 6500 0000 6c00 0000 6c00 0000 $ 6f00 0000 1000 0000 1500 0000 2a00 0000 $ 0000 0000 0000 0000 $ hello..*..$ -student@ubuntu:~/printmemory/test$ +$ ``` diff --git a/subjects/printnbrbase/README.md b/subjects/printnbrbase/README.md index 333f6041..d7f57b1a 100644 --- a/subjects/printnbrbase/README.md +++ b/subjects/printnbrbase/README.md @@ -54,12 +54,11 @@ func main() { And its output : ```console -student@ubuntu:~/printnbrbase/test$ go build -student@ubuntu:~/printnbrbase/test$ ./test +$ go run . 125 -1111101 7D -uoi NV -student@ubuntu:~/printnbrbase/test$ +$ ``` diff --git a/subjects/printnbrinorder/README.md b/subjects/printnbrinorder/README.md index 0cf6d8c6..96721a8b 100644 --- a/subjects/printnbrinorder/README.md +++ b/subjects/printnbrinorder/README.md @@ -33,8 +33,7 @@ func main() { And its output : ```console -student@ubuntu:~/printnbrinorder/test$ go build -student@ubuntu:~/printnbrinorder/test$ ./test | cat -e +$ go run . | cat -e 1230123$ -student@ubuntu:~/printnbrinorder/test$ +$ ``` diff --git a/subjects/printparams/README.md b/subjects/printparams/README.md index 0f71cc7c..d6acdd7a 100644 --- a/subjects/printparams/README.md +++ b/subjects/printparams/README.md @@ -7,12 +7,11 @@ Write a **program** that prints the arguments received in the command line. Example of output : ```console -student@ubuntu:~/printparams$ go build -student@ubuntu:~/printparams$ ./printparams choumi is the best cat +$ go run . choumi is the best cat choumi is the best cat -student@ubuntu:~/printparams$ +$ ``` diff --git a/subjects/printprogramname/README.md b/subjects/printprogramname/README.md index 05374cb7..889074cd 100644 --- a/subjects/printprogramname/README.md +++ b/subjects/printprogramname/README.md @@ -7,14 +7,14 @@ Write a **program** that prints the name of the program. Example of output : ```console -student@ubuntu:~/printprogramname$ go build main.go -student@ubuntu:~/printprogramname$ ./main +$ go build main.go +$ ./main main -student@ubuntu:~/printprogramname$ go build -student@ubuntu:~/printprogramname$ ./printprogramname | cat -e +$ go build +$ ./printprogramname | cat -e printprogramname$ -student@ubuntu:~/printprogramname$ go build -o Nessy -student@ubuntu:~/printprogramname$ ./Nessy +$ go build -o Nessy +$ ./Nessy Nessy -student@ubuntu:~/printprogramname$ +$ ``` diff --git a/subjects/printrevcomb/README.md b/subjects/printrevcomb/README.md index 810065d1..b565879e 100644 --- a/subjects/printrevcomb/README.md +++ b/subjects/printrevcomb/README.md @@ -11,10 +11,9 @@ These combinations are separated by a comma and a space. Here is an **incomplete** output : ```console -student@ubuntu:~/printrevcomb$ go build -student@ubuntu:~/printrevcomb$ ./printrevcomb | cat -e +$ go run . | cat -e 987, 986, 985, 984, 983, 982, 981, 980, 976, ..., 310, 210$ -student@ubuntu:~/printrevcomb$ +$ ``` `999` or `000` are not valid combinations because the digits are not different. diff --git a/subjects/printreversealphabetalt/README.md b/subjects/printreversealphabetalt/README.md index 1c8d6775..cc08aea3 100644 --- a/subjects/printreversealphabetalt/README.md +++ b/subjects/printreversealphabetalt/README.md @@ -14,9 +14,8 @@ Please note that `casting` is not allowed for this exercise! ### Usage ```console -student@ubuntu:~/printreversealphabetalt$ go build -student@ubuntu:~/printreversealphabetalt$ ./printreversealphabetalt +$ go run . zYxWvUtSrQpOnMlKjIhGfEdCbA aBcDeFgHiJkLmNoPqRsTuVwXyZ -student@ubuntu:~/printreversealphabetalt$ +$ ``` diff --git a/subjects/printreversealphabetalt2/README.md b/subjects/printreversealphabetalt2/README.md index 28d9d64d..8bfbc4f7 100644 --- a/subjects/printreversealphabetalt2/README.md +++ b/subjects/printreversealphabetalt2/README.md @@ -14,9 +14,8 @@ Please note that `casting` is not allowed for this exercise! ### Usage ```console -student@ubuntu:~/printreversealphabetalt2$ go build -student@ubuntu:~/printreversealphabetalt2$ ./printreversealphabetalt2 +$ go run . ZyXwVuTsRqPoNmLkJiHgFeDcBa AbCdEfGhIjKlMnOpQrStUvWxYz -student@ubuntu:~/printreversealphabetalt2$ +$ ``` diff --git a/subjects/printreversealphabetg/README.md b/subjects/printreversealphabetg/README.md index 04705a58..a5d4a8d6 100644 --- a/subjects/printreversealphabetg/README.md +++ b/subjects/printreversealphabetg/README.md @@ -11,8 +11,7 @@ Please note that `casting` is not allowed for this exercise! ### Usage ```console -student@ubuntu:~/printreversealphabetg$ go build -student@ubuntu:~/printreversealphabetg$ ./printreversealphabetg +$ go run . gfedcba -student@ubuntu:~/printreversealphabetg$ +$ ``` diff --git a/subjects/printrot/README.md b/subjects/printrot/README.md index 3d9ace01..f7619be0 100644 --- a/subjects/printrot/README.md +++ b/subjects/printrot/README.md @@ -12,16 +12,15 @@ If the input is invalid the program prints a newline (`'\n'`). ### Usage ```console -student@ubuntu:~/printrot/test$ go build -student@ubuntu:~/printrot/test$ ./test "abc" +$ go run . "abc" -student@ubuntu:~/printrot/test$ ./test "a" +$ go run . "a" abcdefghijklmnopqrstuvwxyz -student@ubuntu:~/printrot/test$ ./test "g" +$ go run . "g" ghijklmnopqrstuvwxyzabcdef -student@ubuntu:~/printrot/test$ ./test "a" "a" +$ go run . "a" "a" -student@ubuntu:~/printrot/test$ ./test "A" +$ go run . "A" -student@ubuntu:~/printrot/test$ +$ ``` diff --git a/subjects/printstr/README.md b/subjects/printstr/README.md index 0a9a4319..8508867b 100644 --- a/subjects/printstr/README.md +++ b/subjects/printstr/README.md @@ -29,8 +29,7 @@ func main() { And its output : ```console -student@ubuntu:~/printstr/test$ go build -student@ubuntu:~/printstr/test$ ./test | cat -e +$ go run . | cat -e Hello World!% -student@ubuntu:~/printstr/test$ +$ ``` diff --git a/subjects/printwordstables/README.md b/subjects/printwordstables/README.md index dafd372d..0c719330 100644 --- a/subjects/printwordstables/README.md +++ b/subjects/printwordstables/README.md @@ -32,11 +32,10 @@ func main() { And its output : ```console -student@ubuntu:~/printwordstables/test$ go build main.go -student@ubuntu:~/printwordstables/test$ ./main +$ go run . Hello how are you? -student@ubuntu:~/printwordstables/test$ +$ ``` diff --git a/subjects/priorprime/README.md b/subjects/priorprime/README.md index a13ba29c..511b6607 100644 --- a/subjects/priorprime/README.md +++ b/subjects/priorprime/README.md @@ -33,8 +33,7 @@ func main() { Its output: ```console -student@ubuntu:~/priorprime/test$ go build -student@ubuntu:~/priorprime/test$ ./priorprime +$ go run . 41 -student@ubuntu:~/priorprime/test$ +$ ``` diff --git a/subjects/profanity_filter/README.md b/subjects/profanity_filter/README.md index ba3d1e76..d56c0160 100644 --- a/subjects/profanity_filter/README.md +++ b/subjects/profanity_filter/README.md @@ -79,10 +79,10 @@ fn main() { And its output: ```console -student@ubuntu:~/profanity_filter/test$ cargo run +$ cargo run (true, "hello there") (false, "ERROR: illegal") (false, "ERROR: illegal") (false, "ERROR: illegal") -student@ubuntu:~/profanity_filter/test$ +$ ``` diff --git a/subjects/project_motion/README.md b/subjects/project_motion/README.md index 536c67ed..28d69108 100644 --- a/subjects/project_motion/README.md +++ b/subjects/project_motion/README.md @@ -61,12 +61,12 @@ fn main() { And its output: ```console -student@ubuntu:~/project_motion/test$ cargo run +$ cargo run Some(Object { distance: 50.0, velocity: 50.0, height: 145.1, time: 1.0 }) Some(Object { distance: 100.0, velocity: 50.0, height: 125.5, time: 2.0 }) Some(Object { distance: 150.0, velocity: 50.0, height: 81.4, time: 3.0 }) Some(Object { distance: 200.0, velocity: 50.0, height: 3.0, time: 4.0 }) None None -student@ubuntu:~/project_motion/test$ +$ ``` diff --git a/subjects/push-swap/README.md b/subjects/push-swap/README.md index 6b1ffdbc..802c0691 100644 --- a/subjects/push-swap/README.md +++ b/subjects/push-swap/README.md @@ -2,7 +2,7 @@ ### Objectives -Push_swap is a very simple and highly effective algorithm.You have at your disposal a list of `int` values, two stacks (`a` and `b`) and a set of instructions. +Push_swap is a very simple and highly effective algorithm. You have at your disposal a list of `int` values, two stacks (`a` and `b`) and a set of instructions. You will have to write 2 programs: @@ -20,7 +20,7 @@ These are the instructions that you can use to sort the stack : - `ss` execute `sa` and `sb` - `ra` rotate stack `a` (shift up all elements of stack `a` by 1, the first element becomes the last one) - `rb` rotate stack `b` -- `rr`execute `ra` and `rb` +- `rr` execute `ra` and `rb` - `rra` reverse rotate `a` (shift down all elements of stack `a` by 1, the last element becomes the first one) - `rrb` reverse rotate `b` - `rrr` execute `rra` and `rrb` @@ -96,7 +96,7 @@ This project will help you learn about : - In case of there are no arguments the program displays nothing (0 instructions). ```console -student$ ./push_swap "2 1 3 6 5 8" +$ go run . "2 1 3 6 5 8" pb pb ra @@ -104,10 +104,10 @@ sa rrr pa pa -student$ ./push_swap "0 one 2 3" +$ go run . "0 one 2 3" Error -student$ ./push_swap -student$ +$ go run . +$ ``` #### The checker program @@ -119,23 +119,23 @@ student$ - In case of there are no arguments the program displays nothing. ```console -student$ ./checker "3 2 1 0" +$ go run ./checker "3 2 1 0" sa rra pb KO -student$ echo -e "rra\npb\nsa\n" | ./checker "3 2 one 0" +$ echo -e "rra\npb\nsa\n" | go run ./checker "3 2 one 0" Error -student$ echo -e "rra\npb\nsa\nrra\npa" +$ echo -e "rra\npb\nsa\nrra\npa" rra pb sa rra pa -student$ echo -e "rra\npb\nsa\nrra\npa" | ./checker "3 2 1 0" +$ echo -e "rra\npb\nsa\nrra\npa" | go run ./checker "3 2 1 0" OK -student$ ./checker -student$ +$ go run ./checker +$ ``` ### Allowed packages @@ -153,10 +153,11 @@ student$ ### Usage ```console -student$ ARG="4 67 3 87 23"; ./push_swap "$ARG" | wc -l +$ ARG="4 67 3 87 23"; ./push_swap "$ARG" | wc -l 6 -student$ ARG="4 67 3 87 23"; ./push_swap "$ARG" | ./checker "$ARG" +$ ARG="4 67 3 87 23"; ./push_swap "$ARG" | go run ./checker "$ARG" OK +$ ``` If the program checker displays KO, it means that your **push_swap** came up with a list of instructions that doesn't sort the list. diff --git a/subjects/quad/README.md b/subjects/quad/README.md index 0bea2327..d8b191d0 100644 --- a/subjects/quad/README.md +++ b/subjects/quad/README.md @@ -37,12 +37,11 @@ func main() { And its output : ```console -student@ubuntu:~/quad/test$ go build -student@ubuntu:~/quad/test$ ./test +$ go run . o---o | | o---o -student@ubuntu:~/quad/test$ +$ ``` Program #2 @@ -60,10 +59,9 @@ func main() { And its output : ```console -student@ubuntu:~/quad/test$ go build -student@ubuntu:~/quad/test$ ./test +$ go run . o---o -student@ubuntu:~/quad/test$ +$ ``` Program #3 @@ -81,10 +79,9 @@ func main() { And its output : ```console -student@ubuntu:~/quad/test$ go build -student@ubuntu:~/quad/test$ ./test +$ go run . o -student@ubuntu:~/quad/test$ +$ ``` Program #4 @@ -102,14 +99,13 @@ func main() { And its output : ```console -student@ubuntu:~/quad/test$ go build -student@ubuntu:~/quad/test$ ./test +$ go run . o | | | o -student@ubuntu:~/quad/test$ +$ ``` --- @@ -151,12 +147,11 @@ func main() { And its output : ```console -student@ubuntu:~/quad/test$ go build -student@ubuntu:~/quad/test$ ./test +$ go run . /***\ * * \***/ -student@ubuntu:~/quad/test$ +$ ``` Program #2 @@ -174,10 +169,9 @@ func main() { And its output : ```console -student@ubuntu:~/quad/test$ go build -student@ubuntu:~/quad/test$ ./test +$ go run . /***\ -student@ubuntu:~/quad/test$ +$ ``` Program #3 @@ -195,10 +189,9 @@ func main() { And its output : ```console -student@ubuntu:~/quad/test$ go build -student@ubuntu:~/quad/test$ ./test +$ go run . / -student@ubuntu:~/quad/test$ +$ ``` Program #4 @@ -216,14 +209,13 @@ func main() { And its output : ```console -student@ubuntu:~/quad/test$ go build -student@ubuntu:~/quad/test$ ./test +$ go run . / * * * \ -student@ubuntu:~/quad/test$ +$ ``` --- @@ -265,12 +257,11 @@ func main() { And its output : ```console -student@ubuntu:~/quad/test$ go build -student@ubuntu:~/quad/test$ ./test +$ go run . ABBBA B B CBBBC -student@ubuntu:~/quad/test$ +$ ``` Program #2 @@ -288,10 +279,9 @@ func main() { And its output : ```console -student@ubuntu:~/quad/test$ go build -student@ubuntu:~/quad/test$ ./test +$ go run . ABBBA -student@ubuntu:~/quad/test$ +$ ``` Program #3 @@ -309,10 +299,9 @@ func main() { And its output : ```console -student@ubuntu:~/quad/test$ go build -student@ubuntu:~/quad/test$ ./test +$ go run . A -student@ubuntu:~/quad/test$ +$ ``` Program #4 @@ -330,14 +319,13 @@ func main() { And its output : ```console -student@ubuntu:~/quad/test$ go build -student@ubuntu:~/quad/test$ ./test +$ go run . A B B B C -student@ubuntu:~/quad/test$ +$ ``` --- @@ -379,12 +367,11 @@ func main() { And its output : ```console -student@ubuntu:~/quad/test$ go build -student@ubuntu:~/quad/test$ ./test +$ go run . ABBBC B B ABBBC -student@ubuntu:~/quad/test$ +$ ``` Program #2 @@ -402,10 +389,9 @@ func main() { And its output : ```console -student@ubuntu:~/quad/test$ go build -student@ubuntu:~/quad/test$ ./test +$ go run . ABBBC -student@ubuntu:~/quad/test$ +$ ``` Program #3 @@ -423,10 +409,9 @@ func main() { And its output : ```console -student@ubuntu:~/quad/test$ go build -student@ubuntu:~/quad/test$ ./test +$ go run . A -student@ubuntu:~/quad/test$ +$ ``` Program #4 @@ -444,14 +429,13 @@ func main() { And its output : ```console -student@ubuntu:~/quad/test$ go build -student@ubuntu:~/quad/test$ ./test +$ go run . A B B B A -student@ubuntu:~/quad/test$ +$ ``` --- @@ -493,12 +477,11 @@ func main() { And its output : ```console -student@ubuntu:~/quad/test$ go build -student@ubuntu:~/quad/test$ ./test +$ go run . ABBBC B B CBBBA -student@ubuntu:~/quad/test$ +$ ``` Program #2 @@ -516,10 +499,9 @@ func main() { And its output : ```console -student@ubuntu:~/quad/test$ go build -student@ubuntu:~/quad/test$ ./test +$ go run . ABBBC -student@ubuntu:~/quad/test$ +$ ``` Program #3 @@ -537,10 +519,9 @@ func main() { And its output : ```console -student@ubuntu:~/quad/test$ go build -student@ubuntu:~/quad/test$ ./test +$ go run . A -student@ubuntu:~/quad/test$ +$ ``` Program #4 @@ -558,12 +539,11 @@ func main() { And its output : ```console -student@ubuntu:~/quad/test$ go build -student@ubuntu:~/quad/test$ ./test +$ go run . A B B B C -student@ubuntu:~/quad/test$ +$ ``` diff --git a/subjects/quadchecker/README.md b/subjects/quadchecker/README.md index 7b5327ce..60dce5fa 100644 --- a/subjects/quadchecker/README.md +++ b/subjects/quadchecker/README.md @@ -17,7 +17,7 @@ Create a program `quadchecker` that takes a `string` as an argument and displays - If it's `quadA` ```console -student@ubuntu:~/quadchecker$ ls -l +$ ls -l -rw-r--r-- 1 student student nov 23 14:30 main.go -rwxr-xr-x 1 student student nov 23 19:18 quadchecker -rwxr-xr-x 1 student student nov 23 19:50 quadA @@ -25,38 +25,35 @@ student@ubuntu:~/quadchecker$ ls -l -rwxr-xr-x 1 student student nov 23 19:50 quadC -rwxr-xr-x 1 student student nov 23 19:50 quadD -rwxr-xr-x 1 student student nov 23 19:50 quadE -student@ubuntu:~/quadchecker$ ./quadA 3 3 | ./quadchecker +$ ./quadA 3 3 | go run . [quadA] [3] [3] -student@ubuntu:~/quadchecker$ -student@ubuntu:~/quadchecker$ -student@ubuntu:~/quadchecker$ -student@ubuntu:~/quadchecker$ +$ ``` - If it's `quadC 1 1` : ```console -student@ubuntu:~/quadchecker$ ./quadC 1 1 +$ ./quadC 1 1 A -student@ubuntu:~/quadchecker$ ./quadD 1 1 +$ ./quadD 1 1 A -student@ubuntu:~/quadchecker$ ./quadE 1 1 +$ ./quadE 1 1 A -student@ubuntu:~/quadchecker$ ./quadC 1 1 | ./quadchecker +$ ./quadC 1 1 | go run . [quadC] [1] [1] || [quadD] [1] [1] || [quadE] [1] [1] -student@ubuntu:~/quadchecker$ +$ ``` - If it's `quadC 1 2` : ```console -student@ubuntu:~/quadchecker$ ./quadE 1 2 +$ ./quadE 1 2 A C -student@ubuntu:~/quadchecker$ ./quadC 1 2 +$ ./quadC 1 2 A C -student@ubuntu:~/quadchecker$ ./quadE 1 2 | ./quadchecker +$ ./quadE 1 2 | go run . [quadC] [1] [2] || [quadE] [1] [2] -student@ubuntu:~/quadchecker$ +$ ``` diff --git a/subjects/queens/README.md b/subjects/queens/README.md index a8fbc947..7a045f84 100644 --- a/subjects/queens/README.md +++ b/subjects/queens/README.md @@ -85,8 +85,8 @@ fn main() { And its output: ```console -student@ubuntu:~/queens/test$ cargo run +$ cargo run Is it possible for the queens to attack each other? => true Is it possible for the queens to attack each other? => false -student@ubuntu:~/queens/test$ +$ ``` diff --git a/subjects/question_mark/README.md b/subjects/question_mark/README.md index 7511bb96..7e420d97 100644 --- a/subjects/question_mark/README.md +++ b/subjects/question_mark/README.md @@ -70,7 +70,7 @@ fn main() { And its output: ```console -student@ubuntu:~/question_mark/test$ cargo run +$ cargo run 1000 -student@ubuntu:~/question_mark/test$ +$ ``` diff --git a/subjects/range/README.md b/subjects/range/README.md index 4820bc5c..51988e96 100644 --- a/subjects/range/README.md +++ b/subjects/range/README.md @@ -11,14 +11,13 @@ If the number of arguments is different from 2 the program prints nothing. ### Usage : ```console -student@ubuntu:~/range$ go build -student@ubuntu:~/range$ ./range 1 3 +$ go run . 1 3 1 2 3 -student@ubuntu:~/range$ ./range -1 2 | cat -e +$ go run . -1 2 | cat -e -1 0 1 2$ -student@ubuntu:~/range$ ./range 0 0 +$ go run . 0 0 0 -student@ubuntu:~/range$ ./range 0 nan | cat -e +$ go run . 0 nan | cat -e strconv.Atoi: parsing "nan": invalid syntax$ -student@ubuntu:~/range$ +$ ``` diff --git a/subjects/reachablenumber/README.md b/subjects/reachablenumber/README.md index dffeeeb9..003901e3 100644 --- a/subjects/reachablenumber/README.md +++ b/subjects/reachablenumber/README.md @@ -35,10 +35,9 @@ func main() { And its output : ```console -student@ubuntu:~/reachablenumber/test$ go build -student@ubuntu:~/reachablenumber/test$ ./test +$ go run . 9 19 36 -student@ubuntu:~/reachablenumber/test$ +$ ``` diff --git a/subjects/rectangle/README.md b/subjects/rectangle/README.md index 42efd061..57f8b629 100644 --- a/subjects/rectangle/README.md +++ b/subjects/rectangle/README.md @@ -45,8 +45,7 @@ func main() { ### Usage ```console -student@ubuntu:~/rectangle/test$ go build -student@ubuntu:~/rectangle/test$ ./test +$ go run . area of the rectangle: 6 -student@ubuntu:~/rectangle/test$ +$ ``` diff --git a/subjects/recursivefactorial/README.md b/subjects/recursivefactorial/README.md index 94d97a26..e996f3de 100644 --- a/subjects/recursivefactorial/README.md +++ b/subjects/recursivefactorial/README.md @@ -35,8 +35,7 @@ func main() { ``` ```console -student@ubuntu:~/recursivefactorial/test$ go build -student@ubuntu:~/recursivefactorial/test$ ./test +$ go run . 24 -student@ubuntu:~/recursivefactorial/test$ +$ ``` diff --git a/subjects/recursivepower/README.md b/subjects/recursivepower/README.md index 51d4a0bb..ffc86df9 100644 --- a/subjects/recursivepower/README.md +++ b/subjects/recursivepower/README.md @@ -36,8 +36,7 @@ func main() { And its output : ```console -student@ubuntu:~/recursivepower/test$ go build -student@ubuntu:~/recursivepower/test$ ./test +$ go run . 64 -student@ubuntu:~/recursivepower/test$ +$ ``` diff --git a/subjects/reduceint/README.md b/subjects/reduceint/README.md index 2f2441c7..b19224f3 100644 --- a/subjects/reduceint/README.md +++ b/subjects/reduceint/README.md @@ -40,10 +40,9 @@ func main() { And its output : ```console -student@ubuntu:~/reduceint/test$ go build -student@ubuntu:~/reduceint/test$ ./test +$ go run . 1000 502 250 -student@ubuntu:~/reduceint/test$ +$ ``` diff --git a/subjects/ref_cell/README.md b/subjects/ref_cell/README.md index dbcd45b7..497bfefd 100644 --- a/subjects/ref_cell/README.md +++ b/subjects/ref_cell/README.md @@ -98,7 +98,7 @@ fn main() { And its output: ```console -student@ubuntu:~/ref_cell/test$ cargo run +$ cargo run ("Info", "you are using up too 40% of your quote") ("Warning", "you have used up over 90% of your quota! Proceeds with precaution") ("Error", "you are over your quota!") @@ -108,5 +108,5 @@ student@ubuntu:~/ref_cell/test$ cargo run "Warning: you have used up over 90% of your quota! Proceeds with precaution", "Error: you are over your quota!" ] -student@ubuntu:~/ref_cell/test$ +$ ``` diff --git a/subjects/repeatalpha/README.md b/subjects/repeatalpha/README.md index 7a34ea9f..9fcaa3e1 100644 --- a/subjects/repeatalpha/README.md +++ b/subjects/repeatalpha/README.md @@ -13,15 +13,14 @@ If the number of arguments is different from 1, the program displays nothing. ### Usage ```console -student@ubuntu:~/repeatalpha$ go build -student@ubuntu:~/repeatalpha$ ./repeatalpha abc | cat -e +$ go run . abc | cat -e abbccc -student@ubuntu:~/repeatalpha$ ./repeatalpha Choumi. | cat -e +$ go run . Choumi. | cat -e CCChhhhhhhhooooooooooooooouuuuuuuuuuuuuuuuuuuuummmmmmmmmmmmmiiiiiiiii.$ -student@ubuntu:~/repeatalpha$ ./repeatalpha "abacadaba 01!" | cat -e +$ go run . "abacadaba 01!" | cat -e abbacccaddddabba 01!$ -student@ubuntu:~/repeatalpha$ ./repeatalpha -student@ubuntu:~/repeatalpha$ ./repeatalpha "" | cat -e +$ go run . +$ go run . "" | cat -e +$ $ -student@ubuntu:~/repeatalpha$ ``` diff --git a/subjects/reverse/README.md b/subjects/reverse/README.md index c71c8f48..4061772f 100644 --- a/subjects/reverse/README.md +++ b/subjects/reverse/README.md @@ -54,8 +54,7 @@ func main() { Its output: ```console -student@ubuntu:~/reverse/test$ go build -student@ubuntu:~/reverse/test$ ./main +$ go run . 5 -> 4 -> 2 -> 3 -> 1 -student@ubuntu:~/reverse/test$ +$ ``` diff --git a/subjects/reverse_it/README.md b/subjects/reverse_it/README.md index 9644382f..a53fdc07 100644 --- a/subjects/reverse_it/README.md +++ b/subjects/reverse_it/README.md @@ -26,8 +26,8 @@ fn main() { And its output: ```console -student@ubuntu:~/reverse_it/test$ cargo run +$ cargo run 321123 -321123 -student@ubuntu:~/reverse_it/test$ +$ ``` diff --git a/subjects/reverse_string/README.md b/subjects/reverse_string/README.md index 4bc9e583..ca0ebeed 100644 --- a/subjects/reverse_string/README.md +++ b/subjects/reverse_string/README.md @@ -37,11 +37,11 @@ fn main() { And its output: ```console -student@ubuntu:~/reverse_string/test$ cargo run +$ cargo run !dlrow ,olleH namoR si eman ym ,olleH !rac ecin a evah I uoY era dlo woH augá elpmaxe na si siht :xe -student@ubuntu:~/reverse_string/test$ +$ ``` diff --git a/subjects/reverserange/README.md b/subjects/reverserange/README.md index 4d962475..6d24cb61 100644 --- a/subjects/reverserange/README.md +++ b/subjects/reverserange/README.md @@ -11,16 +11,15 @@ If the number of arguments is different from 2 the program prints nothing. ### Usage : ```console -student@ubuntu:~/reverserange$ go build -student@ubuntu:~/reverserange$ ./reverserange 1 3 +$ go run . 1 3 3 2 1 -student@ubuntu:~/reverserange$ ./reverserange -1 2 | cat -e +$ go run . -1 2 | cat -e 2 1 0 -1$ -student@ubuntu:~/reverserange$ ./reverserange 0 0 +$ go run . 0 0 0 -student@ubuntu:~/reverserange$ ./reverserange 0 -3 +$ go run . 0 -3 -3 -2 -1 0 -student@ubuntu:~/reverserange$ ./reverserange 0 nan | cat -e +$ go run . 0 nan | cat -e strconv.Atoi: parsing "nan": invalid syntax$ -student@ubuntu:~/reverserange$ +$ ``` diff --git a/subjects/reversestrcap/README.md b/subjects/reversestrcap/README.md index fd67e3c0..300c515b 100644 --- a/subjects/reversestrcap/README.md +++ b/subjects/reversestrcap/README.md @@ -9,13 +9,12 @@ If there are no argument, the program displays nothing. ### Usage ```console -student@ubuntu:~/reversestrcap$ go build -student@ubuntu:~/reversestrcap$ ./reversestrcap "First SMALL TesT" | cat -e +$ go run . "First SMALL TesT" | cat -e firsT smalL tesT$ -student@ubuntu:~/reversestrcap$ ./reversestrcap "SEconD Test IS a LItTLE EasIEr" "bEwaRe IT'S NoT HARd WhEN " " Go a dernier 0123456789 for the road e" | cat -e +$ go run . "SEconD Test IS a LItTLE EasIEr" "bEwaRe IT'S NoT HARd WhEN " " Go a dernier 0123456789 for the road e" | cat -e seconD tesT iS A littlE easieR$ bewarE it'S noT harD wheN $ gO A dernieR 0123456789 foR thE roaD E$ -student@ubuntu:~/reversestrcap$ ./reversestrcap -student@ubuntu:~/reversestrcap$ +$ go run . +$ ``` diff --git a/subjects/revivethreenums/README.md b/subjects/revivethreenums/README.md index c82597a2..046085fc 100644 --- a/subjects/revivethreenums/README.md +++ b/subjects/revivethreenums/README.md @@ -36,10 +36,9 @@ func main() { And its output : ```console -student@ubuntu:~/revivethreenums/test$ go build -student@ubuntu:~/revivethreenums/test$ ./test +$ go run . 3 20 100 -student@ubuntu:~/revivethreenums/test$ +$ ``` diff --git a/subjects/revparams/README.md b/subjects/revparams/README.md index 4e8cb6e0..52408319 100644 --- a/subjects/revparams/README.md +++ b/subjects/revparams/README.md @@ -7,12 +7,11 @@ Write a **program** that prints the arguments received in the command line in a Example of output : ```console -student@ubuntu:~/revparams/test$ go build -student@ubuntu:~/revparams/test$ ./revparams choumi is the best cat +$ go run . choumi is the best cat cat best the is choumi -student@ubuntu:~/revparams/test$ +$ ``` diff --git a/subjects/revwstr/README.md b/subjects/revwstr/README.md index 89c95514..0d606feb 100644 --- a/subjects/revwstr/README.md +++ b/subjects/revwstr/README.md @@ -13,14 +13,13 @@ Write a program that takes a `string` as a parameter, and prints its words in re ### Usage ```console -student@ubuntu:~/revwstr/test$ go build -student@ubuntu:~/revwstr/test$ ./test "the time of contempt precedes that of indifference" +$ go run . "the time of contempt precedes that of indifference" indifference of that precedes contempt of time the -student@ubuntu:~/revwstr/test$ ./test "abcdefghijklm" +$ go run . "abcdefghijklm" abcdefghijklm -student@ubuntu:~/revwstr/test$ ./test "he stared at the mountain" +$ go run . "he stared at the mountain" mountain the at stared he -student@ubuntu:~/revwstr/test$ ./test "" | cat-e +$ go run . "" | cat-e +$ $ -student@ubuntu:~/revwstr/test$ ``` diff --git a/subjects/rgb_match/README.md b/subjects/rgb_match/README.md index 69a4e64d..c188e678 100644 --- a/subjects/rgb_match/README.md +++ b/subjects/rgb_match/README.md @@ -62,7 +62,7 @@ fn main() { And its output: ```console -student@ubuntu:~/rgb_match/test$ cargo run +$ cargo run Color { r: 10, g: 200, b: 255, a: 30 } Color { r: 200, g: 255, b: 10, a: 30 } Color { r: 30, g: 200, b: 10, a: 255 } @@ -79,5 +79,5 @@ Color { r: 30, g: 200, b: 10, a: 255 } Color { r: 255, g: 200, b: 30, a: 10 } Color { r: 255, g: 30, b: 10, a: 200 } -student@ubuntu:~/rgb_match/test$ +$ ``` diff --git a/subjects/robottoorigin/README.md b/subjects/robottoorigin/README.md index 9113f3a9..d73a2fad 100644 --- a/subjects/robottoorigin/README.md +++ b/subjects/robottoorigin/README.md @@ -18,10 +18,9 @@ If the number of arguments is not 1, output nothing. ### Usage ```console -student@ubuntu:~/robottoorigin/test$ go build -student@ubuntu:~/robottoorigin/test$ ./main "UD" +$ go run . "UD" true -student@ubuntu:~/robottoorigin/test$ ./main "LL" +$ go run . "LL" false ``` diff --git a/subjects/roman_numbers/README.md b/subjects/roman_numbers/README.md index e0d09c94..d2afc628 100644 --- a/subjects/roman_numbers/README.md +++ b/subjects/roman_numbers/README.md @@ -53,10 +53,10 @@ fn main() { And its output: ```console -student@ubuntu:~/roman_numbers/test$ cargo run +$ cargo run RomanNumber([X, X, X, I, I]) RomanNumber([I, X]) RomanNumber([X, L, V]) RomanNumber([Nulla]) -student@ubuntu:~/roman_numbers/test$ +$ ``` diff --git a/subjects/roman_numbers_iter/README.md b/subjects/roman_numbers_iter/README.md index fe0e030b..4277708a 100644 --- a/subjects/roman_numbers_iter/README.md +++ b/subjects/roman_numbers_iter/README.md @@ -68,10 +68,10 @@ fn main() { And its output ```console -student@ubuntu:~/roman_numbers_iter/test$ cargo run +$ cargo run RomanNumber([X, X, X, I, I]) RomanNumber([I, X]) RomanNumber([X, L, V]) RomanNumber([Nulla]) -student@ubuntu:~/roman_numbers_iter/test$ +$ ``` diff --git a/subjects/romannumbers/README.md b/subjects/romannumbers/README.md index 68499a8d..f70a72de 100644 --- a/subjects/romannumbers/README.md +++ b/subjects/romannumbers/README.md @@ -36,19 +36,18 @@ The following table gives the Roman numerals for the first few positive integers ## Usage ```console -student@ubuntu:~/romannumbers/test$ go build -student@ubuntu:~/romannumbers/test$ ./rn hello +$ go run . hello ERROR: can not convert to roman digit -student@ubuntu:~/romannumbers/test$ ./rn 123 +$ go run . 123 C+X+X+I+I+I CXXIII -student@ubuntu:~/romannumbers/test$ ./rn 999 +$ go run . 999 (M-C)+(C-X)+(X-I) CMXCIX -student@ubuntu:~/romannumbers/test$ ./rn 3999 +$ go run . 3999 M+M+M+(M-C)+(C-X)+(X-I) MMMCMXCIX -student@ubuntu:~/romannumbers/test$ ./rn 4000 +$ go run . 4000 ERROR: can not convert to roman digit -student@ubuntu:~/romannumbers/test$ +$ ``` diff --git a/subjects/rostring/README.md b/subjects/rostring/README.md index 43d8ee8c..b1b23ada 100644 --- a/subjects/rostring/README.md +++ b/subjects/rostring/README.md @@ -16,14 +16,13 @@ If the number of arguments is different from 1, the program displays a newline. ### Usage ```console -student@ubuntu:~/rostring$ go build -student@ubuntu:~/rostring$ ./rostring "abc " | cat -e +$ go run . "abc " | cat -e abc$ -student@ubuntu:~/rostring$ ./rostring "Let there be light" +$ go run . "Let there be light" there be light Let -student@ubuntu:~/rostring$ ./rostring " AkjhZ zLKIJz , 23y" +$ go run . " AkjhZ zLKIJz , 23y" zLKIJz , 23y AkjhZ -student@ubuntu:~/rostring$ ./rostring | cat -e +$ go run . | cat -e +$ $ -student@ubuntu:~/rostring$ ``` diff --git a/subjects/rot/README.md b/subjects/rot/README.md index 05e5396f..a2ee6973 100644 --- a/subjects/rot/README.md +++ b/subjects/rot/README.md @@ -63,7 +63,7 @@ fn main() { And its output: ```console -student@ubuntu:~/rot/test$ cargo run +$ cargo run The letter "a" becomes: a The letter "m" becomes: m The letter "m" becomes: z @@ -74,5 +74,5 @@ The decoded message is: Ryg aesmuvi nkpd tewzsxq jolbkc foh Your cypher wil be: Xiwxmrk amxl ryqfivw 1 2 3 Your cypher wil be: Fqefuzs The letter "a" becomes: z -student@ubuntu:~/rot/test$ +$ ``` diff --git a/subjects/rot13/README.md b/subjects/rot13/README.md index ec381367..6e2b38f4 100644 --- a/subjects/rot13/README.md +++ b/subjects/rot13/README.md @@ -14,13 +14,12 @@ letters by the letter 13 spaces ahead in alphabetical order. ### Usage ```console -student@ubuntu:~/rot13/test$ go build -student@ubuntu:~/rot13/test$ ./test "abc" +$ go run . "abc" nop -student@ubuntu:~/rot13/test$ ./test "hello there" +$ go run . "hello there" uryyb gurer -student@ubuntu:~/rot13/test$ ./test "HELLO, HELP" +$ go run . "HELLO, HELP" URYYB, URYC -student@ubuntu:~/rot13/test$ ./test -student@ubuntu:~/rot13/test$ +$ go run . +$ ``` diff --git a/subjects/rot14/README.md b/subjects/rot14/README.md index ebac8a41..64924b79 100644 --- a/subjects/rot14/README.md +++ b/subjects/rot14/README.md @@ -37,8 +37,7 @@ func main() { And its output : ```console -student@ubuntu:~/rot14/test$ go build -student@ubuntu:~/rot14/test$ ./test +$ go run . Vszzc Vck ofs Mci -student@ubuntu:~/rot14/test$ +$ ``` diff --git a/subjects/rot21/README.md b/subjects/rot21/README.md index 534fc070..4d633c2f 100644 --- a/subjects/rot21/README.md +++ b/subjects/rot21/README.md @@ -37,11 +37,11 @@ fn main() { And its output: ```console -student@ubuntu:~/rot21/test$ cargo run +$ cargo run The letter "a" becomes: v The letter "m" becomes: h The word "MISS" becomes: HDNN Your cypher wil be: Oznodib iphwzmn 1 2 3 Your cypher wil be: mjo21 rjmfn! -student@ubuntu:~/rot21/test$ +$ ``` diff --git a/subjects/rotatevowels/README.md b/subjects/rotatevowels/README.md index cbff9785..75cfec46 100644 --- a/subjects/rotatevowels/README.md +++ b/subjects/rotatevowels/README.md @@ -11,18 +11,17 @@ Write a **program** that checks the arguments for vowels. Example of output : ```console -student@ubuntu:~/rotatevowels/test$ go build -student@ubuntu:~/rotatevowels/test$ ./rotatevowels "Hello World" | cat -e +$ go run . "Hello World" | cat -e Hollo Werld$ -student@ubuntu:~/rotatevowels/test$ ./rotatevowels "HEllO World" "problem solved" +$ go run . "HEllO World" "problem solved" Hello Werld problom sOlvEd -student@ubuntu:~/rotatevowels/test$ ./rotatevowels "str" "shh" "psst" +$ go run . "str" "shh" "psst" str shh psst -student@ubuntu:~/rotatevowels/test$ ./rotatevowels "happy thoughts" "good luck" +$ go run . "happy thoughts" "good luck" huppy thooghts guod lack -student@ubuntu:~/rotatevowels/test$ ./rotatevowels "aEi" "Ou" +$ go run . "aEi" "Ou" uOi Ea -student@ubuntu:~/rotatevowels/test$ ./rotatevowels +$ go run . -student@ubuntu:~/rotatevowels/test$ +$ ``` diff --git a/subjects/rpncalc/README.md b/subjects/rpncalc/README.md index 8f56d44c..ea82e000 100644 --- a/subjects/rpncalc/README.md +++ b/subjects/rpncalc/README.md @@ -47,16 +47,15 @@ Or: ### Usage ```console -student@ubuntu:~/rpncalc$ go build -student@ubuntu:~/rpncalc$ ./rpncalc "1 2 * 3 * 4 +" | cat -e +$ go run . "1 2 * 3 * 4 +" | cat -e 10$ -student@ubuntu:~/rpncalc$ ./rpncalc "1 2 3 4 +" | cat -e +$ go run . "1 2 3 4 +" | cat -e Error$ -student@ubuntu:~/rpncalc$ ./rpncalc | cat -e +$ go run . | cat -e Error$ -student@ubuntu:~/rpncalc$ ./rpncalc " 1 3 * 2 -" | cat -e +$ go run . " 1 3 * 2 -" | cat -e 1 -student@ubuntu:~/rpncalc$ ./rpncalc " 1 3 * ksd 2 -" | cat -e +$ go run . " 1 3 * ksd 2 -" | cat -e Error$ -student@ubuntu:~/rpncalc$ +$ ``` diff --git a/subjects/sales/README.md b/subjects/sales/README.md index d10c72b3..fbaed37b 100644 --- a/subjects/sales/README.md +++ b/subjects/sales/README.md @@ -95,9 +95,9 @@ fn main() { And its output: ```console -student@ubuntu:~/sales/test$ cargo run +$ cargo run Store { products: [("product A", 1.23), ("product B", 23.1), ("product C", 3.12)] } [1.17, 2.98, 22.07] Cart { items: [("product A", 1.23), ("product B", 23.1), ("product C", 3.12)], receipt: [1.17, 2.98, 22.07] } -student@ubuntu:~/sales/test$ +$ ``` diff --git a/subjects/sametree/README.md b/subjects/sametree/README.md index e73d5123..99538672 100644 --- a/subjects/sametree/README.md +++ b/subjects/sametree/README.md @@ -94,8 +94,7 @@ func main() { ### Output ```console -student@ubuntu:~/sametree/test$ go build -student@ubuntu:~/sametree/test$ ./test +$ go run . true -student@ubuntu:~/sametree/test$ +$ ``` diff --git a/subjects/scores/README.md b/subjects/scores/README.md index 3689e752..75982325 100644 --- a/subjects/scores/README.md +++ b/subjects/scores/README.md @@ -49,9 +49,9 @@ fn main() { And its output ```console -student@ubuntu:~/scores/test$ cargo run +$ cargo run 1 0 14 -student@ubuntu:~/scores/test$ +$ ``` diff --git a/subjects/scytale_cipher/README.md b/subjects/scytale_cipher/README.md index fc8c7624..b996e9c3 100644 --- a/subjects/scytale_cipher/README.md +++ b/subjects/scytale_cipher/README.md @@ -61,8 +61,8 @@ fn main() { And its output ```console -student@ubuntu:~/scytale_cipher/test$ cargo run +$ cargo run "scytale Code" size=6 -> "sec yCtoadle" "scytale Code" size=8 -> "sCcoydtea l e" -student@ubuntu:~/scytale_cipher/test$ +$ ``` diff --git a/subjects/searching/README.md b/subjects/searching/README.md index 38b43691..16323aef 100644 --- a/subjects/searching/README.md +++ b/subjects/searching/README.md @@ -39,7 +39,7 @@ fn main() { And its output: ```console -student@ubuntu:~/searching/test$ cargo run +$ cargo run the element 6 is in the position Some(3) in the array [1, 3, 4, 6, 8, 9, 11] -student@ubuntu:~/searching/test$ +$ ``` diff --git a/subjects/searchreplace/README.md b/subjects/searchreplace/README.md index 1b4cd851..6a3ff8aa 100644 --- a/subjects/searchreplace/README.md +++ b/subjects/searchreplace/README.md @@ -11,11 +11,10 @@ Write a program that takes 3 arguments, the first argument is a `string` in whic ### Usage ```console -student@ubuntu:~/searchreplace/test$ go build -student@ubuntu:~/searchreplace/test$ ./test "hella there" "a" "o" +$ go run . "hella there" "a" "o" hello there -student@ubuntu:~/searchreplace/test$ ./test "abcd" "z" "l" +$ go run . "abcd" "z" "l" abcd -student@ubuntu:~/searchreplace/test$ ./test "something" "a" "o" "b" "c" -student@ubuntu:~/searchreplace/test$ +$ go run . "something" "a" "o" "b" "c" +$ ``` diff --git a/subjects/simple_hash/README.md b/subjects/simple_hash/README.md index f2f93a18..1ad63d73 100644 --- a/subjects/simple_hash/README.md +++ b/subjects/simple_hash/README.md @@ -61,11 +61,11 @@ fn main() { And its output ```console -student@ubuntu:~/simple_hash/test$ cargo run +$ cargo run Does the HashMap contains the name Roman? => false Does the HashMap contains the name Katie? => true Removing Robert () Does the HashMap contains the name Robert? => false Hash {"Katie": 334, "Daniel": 122, "Ashley": 333} -student@ubuntu:~/simple_hash/test$ +$ ``` diff --git a/subjects/slice/README.md b/subjects/slice/README.md index bae9380f..46ab76af 100644 --- a/subjects/slice/README.md +++ b/subjects/slice/README.md @@ -40,8 +40,7 @@ func main(){ ``` ```console -student@ubuntu:~/student/test$ go build -student@ubuntu:~/student/test$ ./test +$ go run . []string{"algorithm", "ascii", "package", "golang"} []string{"ascii", "package"} []string{"ascii", "package", "golang"} diff --git a/subjects/slices_to_map/README.md b/subjects/slices_to_map/README.md index cd3164c8..b0d1a171 100644 --- a/subjects/slices_to_map/README.md +++ b/subjects/slices_to_map/README.md @@ -29,7 +29,7 @@ fn main() { And its output ```console -student@ubuntu:~/slices_to_map/test$ cargo run +$ cargo run {"James": 2, "Liam": 3, "Emma": 23, "Noah": 5, "Olivia": 1} -student@ubuntu:~/slices_to_map/test$ +$ ``` diff --git a/subjects/sortedlistmerge/README.md b/subjects/sortedlistmerge/README.md index 612537bd..440267c7 100644 --- a/subjects/sortedlistmerge/README.md +++ b/subjects/sortedlistmerge/README.md @@ -68,8 +68,7 @@ func main() { And its output : ```console -student@ubuntu:~/sortedlistmerge/test$ go build -student@ubuntu:~/sortedlistmerge/test$ ./test +$ go run . -2 -> 3 -> 5 -> 7 -> 9 -> -student@ubuntu:~/sortedlistmerge/test$ +$ ``` diff --git a/subjects/sortintegertable/README.md b/subjects/sortintegertable/README.md index df3c9c97..d9401e6f 100644 --- a/subjects/sortintegertable/README.md +++ b/subjects/sortintegertable/README.md @@ -34,8 +34,7 @@ func main() { And its output : ```console -student@ubuntu:~/sortintegertable/test$ go build -student@ubuntu:~/sortintegertable/test$ ./test +$ go run . [0 1 2 3 4 5] -student@ubuntu:~/sortintegertable/test$ +$ ``` diff --git a/subjects/sortlistinsert/README.md b/subjects/sortlistinsert/README.md index 913eaf1f..7aa73e47 100644 --- a/subjects/sortlistinsert/README.md +++ b/subjects/sortlistinsert/README.md @@ -69,9 +69,8 @@ func main() { And its output : ```console -student@ubuntu:~/sortlistinsert/test$ go build -student@ubuntu:~/sortlistinsert/test$ ./test +$ go run . 1 -> 4 -> 9 -> -2 -> 1 -> 2 -> 4 -> 9 -> -student@ubuntu:~/sortlistinsert/test$ +$ ``` diff --git a/subjects/sortll/README.md b/subjects/sortll/README.md index 462381ff..cd33ce98 100644 --- a/subjects/sortll/README.md +++ b/subjects/sortll/README.md @@ -52,7 +52,7 @@ func main() { Its output: ```console -$ go build -$ ./main +$ go run . 5 -> 3 -> 3 -> 1 -> 1 +$ ``` diff --git a/subjects/sortparams/README.md b/subjects/sortparams/README.md index 76902184..6850b1fe 100644 --- a/subjects/sortparams/README.md +++ b/subjects/sortparams/README.md @@ -7,8 +7,7 @@ Write a **program** that prints the arguments received in the command line in AS Example of output : ```console -student@ubuntu:~/sortparams$ go build -student@ubuntu:~/sortparams$ ./sortparams 1 a 2 A 3 b 4 C +$ go run . 1 a 2 A 3 b 4 C 1 2 3 @@ -17,5 +16,5 @@ A C a b -student@ubuntu:~/sortparams$ +$ ``` diff --git a/subjects/sortwordarr/README.md b/subjects/sortwordarr/README.md index 4557b396..efebc79e 100644 --- a/subjects/sortwordarr/README.md +++ b/subjects/sortwordarr/README.md @@ -35,8 +35,7 @@ func main() { And its output : ```console -student@ubuntu:~/sortwordarr/test$ go build -student@ubuntu:~/sortwordarr/test$ ./test +$ go run . [1 2 3 A B C a b c] -student@ubuntu:~/sortwordarr/test$ +$ ``` diff --git a/subjects/speed_transformation/README.md b/subjects/speed_transformation/README.md index 3c65749f..7b6f91d1 100644 --- a/subjects/speed_transformation/README.md +++ b/subjects/speed_transformation/README.md @@ -26,7 +26,7 @@ fn main() { And its output: ```console -student@ubuntu:~/speed_transformation/test$ cargo run +$ cargo run 100 km/h is equivalent to 27.77777777777778 m/s -student@ubuntu:~/speed_transformation/test$ +$ ``` diff --git a/subjects/spelling/README.md b/subjects/spelling/README.md index 08aa2881..0b677b1f 100644 --- a/subjects/spelling/README.md +++ b/subjects/spelling/README.md @@ -46,8 +46,8 @@ fn main() { And its output: ```console -student@ubuntu:~/spelling/test$ cargo run +$ cargo run three hundred forty-eight nine thousand nine hundred ninety-six -student@ubuntu:~/spelling/test$ +$ ``` diff --git a/subjects/split/README.md b/subjects/split/README.md index 55c1dec1..5e595067 100644 --- a/subjects/split/README.md +++ b/subjects/split/README.md @@ -35,8 +35,7 @@ func main() { And its output : ```console -student@ubuntu:~/split/test$ go build -student@ubuntu:~/split/test$ ./test +$ go run . []string{"Hello", "how", "are", "you?"} -student@ubuntu:~/split/test$ +$ ``` diff --git a/subjects/splitwhitespaces/README.md b/subjects/splitwhitespaces/README.md index 4e2aa713..fec9f356 100644 --- a/subjects/splitwhitespaces/README.md +++ b/subjects/splitwhitespaces/README.md @@ -34,8 +34,7 @@ func main() { And its output : ```console -student@ubuntu:~/splitwhitespaces/test$ go build -student@ubuntu:~/splitwhitespaces/test$ ./test +$ go run . []string{"Hello", "how", "are", "you?"} -student@ubuntu:~/splitwhitespaces/test$ +$ ``` diff --git a/subjects/sqrt/README.md b/subjects/sqrt/README.md index 9d91a4cd..3e0a14e3 100644 --- a/subjects/sqrt/README.md +++ b/subjects/sqrt/README.md @@ -33,9 +33,8 @@ func main() { And its output : ```console -student@ubuntu:~/sqrt/test$ go build -student@ubuntu:~/sqrt/test$ ./test +$ go run . 2 0 -student@ubuntu:~/sqrt/test$ +$ ``` diff --git a/subjects/stars/README.md b/subjects/stars/README.md index d1e13a0f..e8097d75 100644 --- a/subjects/stars/README.md +++ b/subjects/stars/README.md @@ -30,9 +30,9 @@ fn main() { And its output: ```console -student@ubuntu:~/stars/test$ cargo run +$ cargo run ** **************** ******************************** -student@ubuntu:~/stars/test$ +$ ``` diff --git a/subjects/step_iterator/README.md b/subjects/step_iterator/README.md index e5cb8db0..8da1adae 100644 --- a/subjects/step_iterator/README.md +++ b/subjects/step_iterator/README.md @@ -50,8 +50,8 @@ fn main() { And its output: ```console -student@ubuntu:~/step_iterator/test$ cargo run +$ cargo run 0,10,20,30,40,50,60,70,80,90,100, 0,12,24,36,48,60,72,84,96, -student@ubuntu:~/step_iterator/test$ +$ ``` diff --git a/subjects/stock-exchange-sim/README.md b/subjects/stock-exchange-sim/README.md index 8bc5c5df..4db99396 100644 --- a/subjects/stock-exchange-sim/README.md +++ b/subjects/stock-exchange-sim/README.md @@ -119,17 +119,18 @@ The generated schedule is then saved as a log with the same name. So if you run: ```console -student$ ./stock examples/simple 10 +go run . examples/simple 10 ``` You get this generated schedule: ```console -student$ cat examples/simple.log +$ cat examples/simple.log 0:buy_materiel 10:build_product 40:delivery No more process doable at cycle 61 +$ ``` --- @@ -177,7 +178,7 @@ optimize:(time;client_content) Running the stock exchange program: ```console -student$ ./stock examples/simple 10 +$ go run . examples/simple 10 Main Processes: 0:buy_materiel 10:build_product @@ -188,18 +189,18 @@ Stock: materiel => 0 product => 0 client_content => 1 -student$ +$ ``` Running the checker program: ```console -student$ ./checker examples/simple examples/simple.log +$ go run ./checker examples/simple examples/simple.log Evaluating: 0:buy_materiel Evaluating: 10:build_product Evaluating: 40:delivery Trace completed, no error detected. -student$ +$ ``` --- @@ -207,32 +208,32 @@ student$ Running the stock exchange program with error, you can see the correct file [here](https://public.01-edu.org/subjects/stock-exchange-sim/examples/simple/simple) ```console -student$ cat examples/simple +$ cat examples/simple euro:10 :(euro:8):(material:1):10 build_product:(material:1):(product:1):30 delivery:(product:1):(client_content:1):20 optimize:(time;client_content) -student$ ./stock examples/simple 10 +$ go run . examples/simple 10 Error while parsing `:(euro:8):(material:1):10` -student$ +$ ``` Running the checker program with error, you can see the correct file [here](https://public.01-edu.org/subjects/stock-exchange-sim/examples/simple/simple.log) ```console -student$ cat examples/simple.log +$ cat examples/simple.log 0:buy_materiel 10:build_product 10:build_product 40:delivery # No more process doable at cycle 61 -student$ ./checker examples/simple examples/simple.log +$ go run ./checker examples/simple examples/simple.log Evaluating: 0:buy_materiel Evaluating: 10:build_product Evaluating: 10:build_product Evaluating: 40:delivery Error detected at 10:build_product stock insufficient -student$ +$ ``` diff --git a/subjects/stock-exchange-sim/audit/README.md b/subjects/stock-exchange-sim/audit/README.md index 7536d059..fd3278ab 100644 --- a/subjects/stock-exchange-sim/audit/README.md +++ b/subjects/stock-exchange-sim/audit/README.md @@ -27,7 +27,7 @@ ##### Try to run the stock exchange program with the [simple](https://public.01-edu.org/subjects/stock-exchange-sim/examples/simple/simple) example, `"./stock examples/simple/simple 1"`. ```console -student$ ./stock examples/simple/simple 1 +$ go run . examples/simple/simple 1 Main Processes : 0:buy_materiel 10:build_product @@ -38,7 +38,7 @@ Stock : materiel => 0 product => 0 client_content => 1 -student$ +$ ``` ###### Does the display presents a result similar to the one above (optimizing time;client_content)? @@ -46,7 +46,7 @@ student$ ##### Try to run the stock exchange program with the [build](https://public.01-edu.org/subjects/stock-exchange-sim/examples/build/build) example, `"./stock examples/build/build 10"`. ```console -student$ ./stock examples/build/build 10 +$ go run . examples/build/build 10 Main Processes : 0:do_shelf 0:do_shelf @@ -62,7 +62,7 @@ Stock : background => 0 shelf => 0 cabinet => 1 -student$ +$ ``` ###### Does the display presents a result similar to the one above (optimizing time;cabinet)? @@ -70,7 +70,7 @@ student$ ##### Try to run the stock exchange program with the [seller](https://public.01-edu.org/subjects/stock-exchange-sim/examples/seller/seller) example, `"./stock examples/seller/seller 10"`. ```console -student$ ./stock examples/seller/seller 10 +$ go run . examples/seller/seller 10 Main Processes : 0:optimize_profile 0:code @@ -95,7 +95,7 @@ Stock : skills => 1 fame => 0 euro => 601 -student$ +$ ``` ###### Does the display presents a result similar to the one above (optimizing euro)? @@ -103,7 +103,7 @@ student$ ##### Try to run the stock exchange program with the [fertilizer](https://public.01-edu.org/subjects/stock-exchange-sim/examples/fertilizer/fertilizer) example, `"./stock examples/fertilizer/fertilizer 1"`.(fertilizer example is self-powered and rotates indefinitely) ```console -student$ ./stock examples/fertilizer/fertilizer 1 +$ go run . examples/fertilizer/fertilizer 1 Main Processes : ... 3973515:eat_apple @@ -121,7 +121,7 @@ Stock : fertilizer => 1 happiness => 37846 apple_tree => 0 -student$ +$ ``` ###### Does the display presents a result similar to the one above, (optimizing happiness), choosing a reasonable shutdown condition and showing that the whole process went well for several times? @@ -133,10 +133,10 @@ student$ ##### Try to run the stock exchange program with the [error1](https://public.01-edu.org/subjects/stock-exchange-sim/examples/errors/error1) example, `"./stock examples/errors/error1 1"`. ```console -student$ ./stock examples/errors/error1 1 +$ go run . examples/errors/error1 1 Error while parsing `:(euro:8):(material:1):10` Exiting... -student$ +$ ``` ###### Does the display presents a result similar to the one above, where it shows the error? @@ -144,10 +144,10 @@ student$ ##### Try to run the stock exchange program with the [error2](https://public.01-edu.org/subjects/stock-exchange-sim/examples/errors/error2) example, `"./stock examples/errors/error2 1"`. ```console -student$ ./stock examples/errors/error2 1 +$ go run . examples/errors/error2 1 Missing processes Exiting... -student$ +$ ``` ###### Does the display presents a result similar to the one above, where it shows the error? @@ -155,10 +155,10 @@ student$ ##### Try to run the stock exchange program with the [error3](https://public.01-edu.org/subjects/stock-exchange-sim/examples/errors/error3) example, `"./stock examples/errors/error3 1"`. ```console -student$ ./stock examples/errors/error3 1 +$ go run . examples/errors/error3 1 Error while parsing `optimize:(euro)` Exiting... -student$ +$ ``` ###### Does the display presents a result similar to the one above, where it shows the error? @@ -166,7 +166,7 @@ student$ ##### Try to run the checker program with the [build](https://public.01-edu.org/subjects/stock-exchange-sim/examples/build/build) and the [build.log](https://public.01-edu.org/subjects/stock-exchange-sim/examples/build/build.log) example, `"./checker examples/build/build examples/build/build.log"`. ```console -student$ ./checker examples/build/build examples/build/build.log +$ go run ./checker examples/build/build examples/build/build.log Evaluating: 0:do_shelf Evaluating: 0:do_shelf Evaluating: 0:do_shelf @@ -175,7 +175,7 @@ Evaluating: 0:do_doorknobs Evaluating: 0:do_background Evaluating: 20:do_cabinet Trace completed, no error detected. -student$ +$ ``` ###### Does the display presents a result similar to the one above, where it shows the last cycle and the proof that the sequence is correct? @@ -183,7 +183,7 @@ student$ ##### Try to run the checker program with the [seller](https://public.01-edu.org/subjects/stock-exchange-sim/examples/seller/seller) and the [seller.log](https://public.01-edu.org/subjects/stock-exchange-sim/examples/seller/seller.log)example, `"./checker examples/seller/seller examples/seller/seller.log"`. ```console -student$ ./checker examples/seller/seller examples/seller/seller.log +$ go run ./checker examples/seller/seller examples/seller/seller.log Evaluating: 0:optimize_profile Evaluating: 0:code Evaluating: 1:code @@ -201,7 +201,7 @@ Evaluating: 212:code Evaluating: 222:code Evaluating: 322:sell_skills Trace completed, no error detected. -student$ +$ ``` ###### Does the display presents a result similar to the one above, where it shows the last cycle and the proof that the sequence is correct? @@ -209,7 +209,7 @@ student$ ##### Try to run the checker program with the [testchecker](https://public.01-edu.org/subjects/stock-exchange-sim/examples/checkererror/testchecker) and [testchecker.log](https://public.01-edu.org/subjects/stock-exchange-sim/examples/checkererror/testchecker.log) example, `"./checker examples/checkererror/testchecker examples/checkererror/testchecker.log"`. ```console -student$ ./checker examples/checkererror/testchecker examples/checkererror/testchecker.log +$ go run ./checker examples/checkererror/testchecker examples/checkererror/testchecker.log Evaluating: 0:do_shelf Evaluating: 0:do_shelf Evaluating: 0:do_doorknobs @@ -219,7 +219,7 @@ Evaluating: 20:do_cabinet Error detected at 20:do_cabinet stock insufficient Exiting... -student$ +$ ``` ###### Does the display presents a result similar to the one above, where it shows the last cycle and the proof that the sequence has errors? diff --git a/subjects/string_literals/README.md b/subjects/string_literals/README.md index d7ee0990..ed2c51af 100644 --- a/subjects/string_literals/README.md +++ b/subjects/string_literals/README.md @@ -56,11 +56,11 @@ fn main() { And its output ```console -student@ubuntu:~/string_literals/test$ cargo run +$ cargo run true true true ("ru", "st") 1 -student@ubuntu:~/string_literals/test$ +$ ``` diff --git a/subjects/string_permutation/README.md b/subjects/string_permutation/README.md index 2f27cb41..b2cdd82d 100644 --- a/subjects/string_permutation/README.md +++ b/subjects/string_permutation/README.md @@ -40,7 +40,7 @@ fn main() { And its output ```console -student@ubuntu:~/string_permutation/test$ cargo run +$ cargo run Is `thought` a permutation of `thougth`? = true -student@ubuntu:~/string_permutation/test$ +$ ``` diff --git a/subjects/strings/README.md b/subjects/strings/README.md index 450fd94a..379f3b5d 100644 --- a/subjects/strings/README.md +++ b/subjects/strings/README.md @@ -29,10 +29,10 @@ fn main() { And its output ```console -student@ubuntu:~/strings/test$ cargo run +$ cargo run length of ❤ = 1 length of 形声字 = 3 length of change = 6 length of 😍 = 1 -student@ubuntu:~/strings/test$ +$ ``` diff --git a/subjects/strlen/README.md b/subjects/strlen/README.md index fb43a7ff..f3e4e246 100644 --- a/subjects/strlen/README.md +++ b/subjects/strlen/README.md @@ -33,8 +33,7 @@ func main() { And its output : ```console -student@ubuntu:~/strlen/test$ go build -student@ubuntu:~/strlen/test$ ./test +$ go run . 12 -student@ubuntu:~/strlen/test$ +$ ``` diff --git a/subjects/strrev/README.md b/subjects/strrev/README.md index b31c2239..6236b125 100644 --- a/subjects/strrev/README.md +++ b/subjects/strrev/README.md @@ -36,8 +36,7 @@ func main() { And its output : ```console -student@ubuntu:~/strrev/test$ go build -student@ubuntu:~/strrev/test$ ./test +$ go run . !dlroW olleH -student@ubuntu:~/strrev/test$ +$ ``` diff --git a/subjects/sudoku/README.md b/subjects/sudoku/README.md index a0a1dcfe..197c7330 100644 --- a/subjects/sudoku/README.md +++ b/subjects/sudoku/README.md @@ -13,8 +13,7 @@ Example of output for one valid sudoku : ```console -student@ubuntu:~/sudoku$ go build -student@ubuntu:~/sudoku$ ./sudoku ".96.4...1" "1...6...4" "5.481.39." "..795..43" ".3..8...." "4.5.23.18" ".1.63..59" ".59.7.83." "..359...7" | cat -e +$ go run . ".96.4...1" "1...6...4" "5.481.39." "..795..43" ".3..8...." "4.5.23.18" ".1.63..59" ".59.7.83." "..359...7" | cat -e 3 9 6 2 4 5 7 8 1$ 1 7 8 3 6 9 5 2 4$ 5 2 4 8 1 7 3 9 6$ @@ -24,7 +23,7 @@ student@ubuntu:~/sudoku$ ./sudoku ".96.4...1" "1...6...4" "5.481.39." "..795..43 7 1 2 6 3 8 4 5 9$ 6 5 9 1 7 4 8 3 2$ 8 4 3 5 9 2 1 6 7$ -student@ubuntu:~/sudoku$ +$ ``` #### Example 2: @@ -32,11 +31,11 @@ student@ubuntu:~/sudoku$ Examples of output for invalid input or sudokus : ```console -student@ubuntu:~/sudoku$ ./sudoku 1 2 3 4 | cat -e +$ go run . 1 2 3 4 | cat -e Error$ -student@ubuntu:~/sudoku$ ./sudoku | cat -e +$ go run . | cat -e Error$ -student@ubuntu:~/sudoku$ ./sudoku ".96.4...1" "1...6.1.4" "5.481.39." "..795..43" ".3..8...." "4.5.23.18" ".1.63..59" ".59.7.83." "..359...7" | cat -e +$ go run . ".96.4...1" "1...6.1.4" "5.481.39." "..795..43" ".3..8...." "4.5.23.18" ".1.63..59" ".59.7.83." "..359...7" | cat -e Error$ -student@ubuntu:~/sudoku$ +$ ``` diff --git a/subjects/swap/README.md b/subjects/swap/README.md index aa6ed617..b68f9d93 100644 --- a/subjects/swap/README.md +++ b/subjects/swap/README.md @@ -36,9 +36,8 @@ func main() { And its output : ```console -student@ubuntu:~/swap/test$ go build -student@ubuntu:~/swap/test$ ./test +$ go run . 1 0 -student@ubuntu:~/swap/test$ +$ ``` diff --git a/subjects/sweetproblem/README.md b/subjects/sweetproblem/README.md index 1a7e8b84..1e8153b7 100644 --- a/subjects/sweetproblem/README.md +++ b/subjects/sweetproblem/README.md @@ -36,10 +36,9 @@ func main() { And its output : ```console -student@ubuntu:~/sweetproblem/test$ go build -student@ubuntu:~/sweetproblem/test$ ./test +$ go run . 1 10 9 -student@ubuntu:~/sweetproblem/test$ +$ ``` diff --git a/subjects/switchcase/README.md b/subjects/switchcase/README.md index a5cba601..787a18c2 100644 --- a/subjects/switchcase/README.md +++ b/subjects/switchcase/README.md @@ -13,9 +13,8 @@ Write a program that takes a `string` and reverses the case of all its letters. ### Usage ```console -student@ubuntu:~/switchcase/test$ go build -student@ubuntu:~/switchcase/test$ ./test "SometHingS iS WronG" +$ go run . "SometHingS iS WronG" sOMEThINGs Is wRONg -student@ubuntu:~/switchcase/test$ ./test -student@ubuntu:~/switchcase/test$ +$ go run . +$ ``` diff --git a/subjects/tabmult/README.md b/subjects/tabmult/README.md index 643374c3..4fbfa7d7 100644 --- a/subjects/tabmult/README.md +++ b/subjects/tabmult/README.md @@ -9,8 +9,7 @@ Write a program that displays a number's multiplication table. ### Usage ```console -student@ubuntu:~/tabmult/test$ go build -student@ubuntu:~/tabmult/test$ ./test 9 +$ go run . 9 1 x 9 = 9 2 x 9 = 18 3 x 9 = 27 @@ -20,7 +19,7 @@ student@ubuntu:~/tabmult/test$ ./test 9 7 x 9 = 63 8 x 9 = 72 9 x 9 = 81 -student@ubuntu:~/tabmult/test$ ./test 19 +$ go run . 19 1 x 19 = 19 2 x 19 = 38 3 x 19 = 57 @@ -30,7 +29,7 @@ student@ubuntu:~/tabmult/test$ ./test 19 7 x 19 = 133 8 x 19 = 152 9 x 19 = 171 -student@ubuntu:~/tabmult/test$ ./test +$ go run . -student@ubuntu:~/tabmult/test$ +$ ``` diff --git a/subjects/talking/README.md b/subjects/talking/README.md index ccc58f35..99f8c097 100644 --- a/subjects/talking/README.md +++ b/subjects/talking/README.md @@ -44,11 +44,11 @@ fn main() { And its output: ```console -student@ubuntu:~/talking/test$ cargo run +$ cargo run "There is no need to yell, calm down!" "Sure." "Quiet, I am thinking!" "Interesting" "Just say something!" -student@ubuntu:~/talking/test$ +$ ``` diff --git a/subjects/temperature_conv/README.md b/subjects/temperature_conv/README.md index 88f909d9..5aaae871 100644 --- a/subjects/temperature_conv/README.md +++ b/subjects/temperature_conv/README.md @@ -30,8 +30,8 @@ fn main() { And its output: ```console -student@ubuntu:~/temperature_conv/test$ cargo run +$ cargo run -459.67 F = -273.15 C 0 C = 32 F -student@ubuntu:~/temperature_conv/test$ +$ ``` diff --git a/subjects/tetris-optimizer/README.md b/subjects/tetris-optimizer/README.md index f470a9ec..e5f28628 100644 --- a/subjects/tetris-optimizer/README.md +++ b/subjects/tetris-optimizer/README.md @@ -28,7 +28,7 @@ This project will help you learn about: #### Example of a text File -```console +``` #... #... #... @@ -42,7 +42,7 @@ This project will help you learn about: - If it isn't possible to form a complete square, the program should leave spaces between the tetrominoes. For example: -```console +``` ABB. ABB. A... @@ -51,8 +51,8 @@ A... ## Usage -``` -student@ubuntu:~/tetrisoptimizer$ cat -e sample.txt +```console +$ cat -e sample.txt ...#$ ...#$ ...#$ @@ -92,12 +92,12 @@ $ ###.$ .#..$ ....$ -student@ubuntu:~/tetrisoptimizer$ ./tetrisoptimizer sample.txt | cat -e +$ go run . sample.txt | cat -e ABBBB.$ ACCCEE$ AFFCEE$ A.FFGG$ HHHDDG$ .HDD.G$ -student@ubuntu:~/tetrisoptimizer$ +$ ``` diff --git a/subjects/tic_tac_toe/README.md b/subjects/tic_tac_toe/README.md index 29e60436..5f1084a6 100644 --- a/subjects/tic_tac_toe/README.md +++ b/subjects/tic_tac_toe/README.md @@ -80,9 +80,9 @@ fn main() { And its output ```console -student@ubuntu:~/tic_tac_toe/test$ cargo run +$ cargo run "Tie" "player O won" "player X won" -student@ubuntu:~/tic_tac_toe/test$ +$ ``` diff --git a/subjects/to-git-or-not-to-git/README.md b/subjects/to-git-or-not-to-git/README.md index aa78601f..c9af9a96 100644 --- a/subjects/to-git-or-not-to-git/README.md +++ b/subjects/to-git-or-not-to-git/README.md @@ -18,5 +18,4 @@ curl -s https://[[DOMAIN]]/api/graphql-engine/v1/graphql --data '{"query":"{user $ ./to-git-or-not-to-git.sh 231748 $ -` ``` diff --git a/subjects/to_url/README.md b/subjects/to_url/README.md index 4cb50b10..0328f2f8 100644 --- a/subjects/to_url/README.md +++ b/subjects/to_url/README.md @@ -27,7 +27,7 @@ fn main() { And its output ```console -student@ubuntu:~/to_url/test$ cargo run +$ cargo run Hello, world! to be use as an url is Hello,%20world! -student@ubuntu:~/to_url/test$ +$ ``` diff --git a/subjects/tolower/README.md b/subjects/tolower/README.md index 699377ab..c1906973 100644 --- a/subjects/tolower/README.md +++ b/subjects/tolower/README.md @@ -32,8 +32,7 @@ func main() { And its output : ```console -student@ubuntu:~/tolower/test$ go build -student@ubuntu:~/tolower/test$ ./test +$ go run . hello! how are you? -student@ubuntu:~/tolower/test$ +$ ``` diff --git a/subjects/toupper/README.md b/subjects/toupper/README.md index 1b939fd6..fc6800da 100644 --- a/subjects/toupper/README.md +++ b/subjects/toupper/README.md @@ -32,8 +32,7 @@ func main() { And its output : ```console -student@ubuntu:~/toupper/test$ go build -student@ubuntu:~/toupper/test$ ./test +$ go run . HELLO! HOW ARE YOU? -student@ubuntu:~/toupper/test$ +$ ``` diff --git a/subjects/traits/README.md b/subjects/traits/README.md index a849471a..8f44bde1 100644 --- a/subjects/traits/README.md +++ b/subjects/traits/README.md @@ -92,7 +92,7 @@ fn main() { And its output: ```console -student@ubuntu:~/traits/test$ cargo run +$ cargo run this apple gives 4 units of strength Before eating Player { name: "player1", strength: 1.0, score: 0, money: 0, weapons: ["knife"] } After eating an apple @@ -103,5 +103,5 @@ After eating a steak player1 Strength: 14, Score: 0, Money: 0 Weapons: ["knife"] -student@ubuntu:~/traits/test$ +$ ``` diff --git a/subjects/trimatoi/README.md b/subjects/trimatoi/README.md index 5d1e020d..b3cc223f 100644 --- a/subjects/trimatoi/README.md +++ b/subjects/trimatoi/README.md @@ -44,8 +44,7 @@ func main() { And its output : ```console -student@ubuntu:~/trimatoi/test$ go build -student@ubuntu:~/trimatoi/test$ ./test +$ go run . 12345 12345 12345 @@ -53,5 +52,5 @@ student@ubuntu:~/trimatoi/test$ ./test 1234 -1234 1234 -student@ubuntu:~/trimatoi/test$ +$ ``` diff --git a/subjects/tuples/README.md b/subjects/tuples/README.md index 0efab865..708f8b72 100644 --- a/subjects/tuples/README.md +++ b/subjects/tuples/README.md @@ -54,10 +54,10 @@ fn main() { And its output: ```console -student@ubuntu:~/tuples/test$ cargo run +$ cargo run Student: Student(20, "Pedro", "Domingos") Student first name: Pedro Student last name: Domingos Student Id: 20 -student@ubuntu:~/tuples/test$ +$ ``` diff --git a/subjects/twosum/README.md b/subjects/twosum/README.md index aefc8344..e998d29e 100644 --- a/subjects/twosum/README.md +++ b/subjects/twosum/README.md @@ -32,8 +32,7 @@ func main() { And its output : ```console -student@ubuntu:~/twosum/test$ go build -student@ubuntu:~/twosum/test$ ./test +$ go run . [0 3] -student@ubuntu:~/twosum/test$ +$ ``` diff --git a/subjects/ultimatedivmod/README.md b/subjects/ultimatedivmod/README.md index 4853cbe6..7a966974 100644 --- a/subjects/ultimatedivmod/README.md +++ b/subjects/ultimatedivmod/README.md @@ -40,9 +40,8 @@ func main() { And its output : ```console -student@ubuntu:~/ultimatedivmod/test$ go build -student@ubuntu:~/ultimatedivmod/test$ ./test +$ go run . 6 1 -student@ubuntu:~/ultimatedivmod/test$ +$ ``` diff --git a/subjects/ultimatepointone/README.md b/subjects/ultimatepointone/README.md index 065958e5..4d83936e 100644 --- a/subjects/ultimatepointone/README.md +++ b/subjects/ultimatepointone/README.md @@ -36,8 +36,7 @@ func main() { And its output : ```console -student@ubuntu:~/ultimatepointone/test$ go build -student@ubuntu:~/ultimatepointone/test$ ./test +$ go run . 1 -student@ubuntu:~/ultimatepointone/test$ +$ ``` diff --git a/subjects/union/README.md b/subjects/union/README.md index ed1b72cc..8d7ed3b3 100644 --- a/subjects/union/README.md +++ b/subjects/union/README.md @@ -11,16 +11,15 @@ If the number of arguments is different from 2, then the program displays newlin ### Usage ```console -student@ubuntu:~/union$ go build -student@ubuntu:~/union$ ./union zpadinton paqefwtdjetyiytjneytjoeyjnejeyj | cat -e +$ go run . zpadinton paqefwtdjetyiytjneytjoeyjnejeyj | cat -e zpadintoqefwjy$ -student@ubuntu:~/union$ ./union ddf6vewg64f gtwthgdwthdwfteewhrtag6h4ffdhsd | cat -e +$ go run . ddf6vewg64f gtwthgdwthdwfteewhrtag6h4ffdhsd | cat -e df6vewg4thras$ -student@ubuntu:~/union$ ./union rien "cette phrase ne cache rien" | cat -e +$ go run . rien "cette phrase ne cache rien" | cat -e rienct phas$ -student@ubuntu:~/union$ ./union | cat -e +$ go run . | cat -e +$ +$ go run . rien | cat -e $ -student@ubuntu:~/union$ ./union rien | cat -e $ -student@ubuntu:~/union$ ``` diff --git a/subjects/uniqueoccurences/README.md b/subjects/uniqueoccurences/README.md index 6d829cf3..f7510cfe 100644 --- a/subjects/uniqueoccurences/README.md +++ b/subjects/uniqueoccurences/README.md @@ -11,12 +11,11 @@ Only lower case characters will be given. ### Usage ```console -student@ubuntu:~/uniqueoccurences/test$ go build -student@ubuntu:~/uniqueoccurences/test$ ./main abbaac +$ go run . abbaac true -student@ubuntu:~/uniqueoccurences/test$ ./main ab +$ go run . ab false -student@ubuntu:~/uniqueoccurences/test$ ./main abcacccazb +$ go run . abcacccazb true ``` diff --git a/subjects/unmatch/README.md b/subjects/unmatch/README.md index 2517c80f..ab5a7bc1 100644 --- a/subjects/unmatch/README.md +++ b/subjects/unmatch/README.md @@ -36,8 +36,7 @@ func main() { And its output : ```console -student@ubuntu:~/unmatch/test$ go build -student@ubuntu:~/unmatch/test$ ./test +$ go run . 4 -student@ubuntu:~/unmatch/test$ +$ ``` diff --git a/subjects/unwrap_or_expect/README.md b/subjects/unwrap_or_expect/README.md index 083a56f2..de082b94 100644 --- a/subjects/unwrap_or_expect/README.md +++ b/subjects/unwrap_or_expect/README.md @@ -92,5 +92,5 @@ Ok([2, 4, 6]) [2, 4, 6] Err(("There is a even value in the vector!", [2, 6])) [2, 6] -student@ubuntu:~/unwrap_or_expect/test$ +$ ``` diff --git a/subjects/vector_operations/README.md b/subjects/vector_operations/README.md index 95639cf5..aa054bcb 100644 --- a/subjects/vector_operations/README.md +++ b/subjects/vector_operations/README.md @@ -42,7 +42,7 @@ fn main() { And its output ```console -student@ubuntu:~/vector_operations/test$ cargo run +$ cargo run ThreeDVector { i: 5, j: 12, k: 6 } -student@ubuntu:~/vector_operations/test$ +$ ``` diff --git a/subjects/vehicles/README.md b/subjects/vehicles/README.md index ec066e99..95922f9b 100644 --- a/subjects/vehicles/README.md +++ b/subjects/vehicles/README.md @@ -73,7 +73,7 @@ fn main() { And its output ```console -student@ubuntu:~/vehicles/test$ cargo run +$ cargo run ["Model 3", "Ranger"] -student@ubuntu:~/vehicles/test$ +$ ``` diff --git a/subjects/volumechanger/README.md b/subjects/volumechanger/README.md index 865547ff..ee061137 100644 --- a/subjects/volumechanger/README.md +++ b/subjects/volumechanger/README.md @@ -38,10 +38,9 @@ func main() { And its output : ```console -student@ubuntu:~/volumechanger/test$ go build -student@ubuntu:~/volumechanger/test$ ./test +$ go run . 2 3 2 -student@ubuntu:~/volumechanger/test$ +$ ``` diff --git a/subjects/wdmatch/README.md b/subjects/wdmatch/README.md index 03bc3e55..9fa242ce 100644 --- a/subjects/wdmatch/README.md +++ b/subjects/wdmatch/README.md @@ -11,13 +11,12 @@ If the number of arguments is different from 2, the program displays nothing. ### Usage ```console -student@ubuntu:~/wdmatch/test$ go build -student@ubuntu:~/wdmatch/test$ ./test faya fgvvfdxcacpolhyghbreda +$ go run . faya fgvvfdxcacpolhyghbreda faya -student@ubuntu:~/wdmatch/test$ ./test faya fgvvfdxcacpolhyghbred -student@ubuntu:~/wdmatch/test$ ./test error rrerrrfiiljdfxjyuifrrvcoojh -student@ubuntu:~/wdmatch/test$ ./test "quarante deux" "qfqfsudf arzgsayns tsregfdgs sjytdekuoixq " +$ go run . faya fgvvfdxcacpolhyghbred +$ go run . error rrerrrfiiljdfxjyuifrrvcoojh +$ go run . "quarante deux" "qfqfsudf arzgsayns tsregfdgs sjytdekuoixq " quarante deux -student@ubuntu:~/wdmatch/test$ ./test -student@ubuntu:~/wdmatch/test$ +$ go run . +$ ``` diff --git a/subjects/wget/README.md b/subjects/wget/README.md index 03c15642..d40e83ca 100644 --- a/subjects/wget/README.md +++ b/subjects/wget/README.md @@ -26,7 +26,7 @@ To see more about wget you can visit the manual by using the command `man wget`, Your program must have as arguments the link from where you want to download the file, for instance: ```console -student@ubuntu:~/wget$ ./wget https://pbs.twimg.com/media/EMtmPFLWkAA8CIS.jpg +$ go run . https://pbs.twimg.com/media/EMtmPFLWkAA8CIS.jpg ``` The program should be able to give feedback, displaying the: @@ -44,7 +44,7 @@ The program should be able to give feedback, displaying the: It should look something like this ```console -student@ubuntu:~/wget$ go run . https://pbs.twimg.com/media/EMtmPFLWkAA8CIS.jpg +$ go run . https://pbs.twimg.com/media/EMtmPFLWkAA8CIS.jpg start at 2017-10-14 03:46:06 sending request, awaiting response... status 200 OK content size: 56370 [~0.06MB] @@ -62,7 +62,7 @@ Your program should be able to handle different flags. 1. Download a file and save it under a different name by using the flag `-O` followed by the name you wish to save the file, example: ```console -student@ubuntu:~/wget$ go run . -O=meme.jpg https://pbs.twimg.com/media/EMtmPFLWkAA8CIS.jpg +$ go run . -O=meme.jpg https://pbs.twimg.com/media/EMtmPFLWkAA8CIS.jpg start at 2017-10-14 03:46:06 sending request, awaiting response... status 200 OK content size: 56370 [~0.06MB] @@ -71,7 +71,7 @@ saving file to: ./meme.jpg Downloaded [https://pbs.twimg.com/media/EMtmPFLWkAA8CIS.jpg] finished at 2017-10-14 03:46:07 -student@ubuntu:~/wget$ ls -l +$ ls -l -rw-r--r-- 1 student student 56370 ago 13 16:59 meme.jpg -rw-r--r-- 1 student student 11489 ago 13 10:28 main.go ``` @@ -81,7 +81,7 @@ student@ubuntu:~/wget$ ls -l 2. It should also handle the path to where your file is going to be saved using the flag `-P` followed by the path to where you want to save the file, example: ```console -student@ubuntu:~/wget$ go run . -P=~/Downloads/ -O=meme.jpg https://pbs.twimg.com/media/EMtmPFLWkAA8CIS.jpg +$ go run . -P=~/Downloads/ -O=meme.jpg https://pbs.twimg.com/media/EMtmPFLWkAA8CIS.jpg start at 2017-10-14 03:46:06 sending request, awaiting response... status 200 OK content size: 56370 [~0.06MB] @@ -90,7 +90,7 @@ saving file to: ~/Downloads/meme.jpg Downloaded [https://pbs.twimg.com/media/EMtmPFLWkAA8CIS.jpg] finished at 2017-10-14 03:46:07 -student@ubuntu:~/wget$ ls -l ~/Downloads/meme.jpg +$ ls -l ~/Downloads/meme.jpg -rw-r--r-- 1 student student 56370 ago 13 16:59 /home/student/Downloads/meme.jpg ``` @@ -99,7 +99,7 @@ student@ubuntu:~/wget$ ls -l ~/Downloads/meme.jpg 3. The program should handle speed limit. Basically the program can control the speed of the download by using the flag `--rate-limit`. If you download a huge file you can limit the speed of your download, preventing the program from using the full possible bandwidth of your connection, example: ```console -student@ubuntu:~/wget$ go run . --rate-limit=400k https://pbs.twimg.com/media/EMtmPFLWkAA8CIS.jpg +$ go run . --rate-limit=400k https://pbs.twimg.com/media/EMtmPFLWkAA8CIS.jpg ``` This flag should accept different value types, example: k and M. So you can put the rate limit as `rate-limit=200k` or `rate-limit=2M` @@ -109,12 +109,12 @@ This flag should accept different value types, example: k and M. So you can put 4. Downloading different files should be possible. For this the program will receive the `-i` flag followed by a file name that will contain all links that are to be downloaded. Example: ```console -student@ubuntu:~/wget$ ls +$ ls download.txt main.go -student@ubuntu:~/wget$ cat download.txt +$ cat download.txt http://ipv4.download.thinkbroadband.com/20MB.zip http://ipv4.download.thinkbroadband.com/10MB.zip -student@ubuntu:~/wget$ go run main -i=download.txt +$ go run . -i=download.txt content size: [10485760, 20971520] finished 10MB.zip finished 20MB.zip @@ -142,7 +142,7 @@ Those flags will work based on [Follow links](https://www.gnu.org/software/wget/ example: ```console -student@ubuntu:~/wget$ ./wget --mirror -R=jpg,gif https://example.com +$ go run . --mirror -R=jpg,gif https://example.com ``` - [Directory-Based Limits](https://www.gnu.org/software/wget/manual/wget.html#Directory_002dBased-Limits) (`--exclude` short hand -X) @@ -152,7 +152,7 @@ student@ubuntu:~/wget$ ./wget --mirror -R=jpg,gif https://example.com example: ```console -student@ubuntu:~/wget$ ./wget --mirror -X=/assets,/css https://example.com +$ go run . --mirror -X=/assets,/css https://example.com ``` ### Hint diff --git a/subjects/ztail/README.md b/subjects/ztail/README.md index b5adef70..ae3ea789 100644 --- a/subjects/ztail/README.md +++ b/subjects/ztail/README.md @@ -23,9 +23,9 @@ abcdefghijklmnopqrstuvwxyz Normal cases : ``` -$ ./ztail -c 4 file1.txt +$ go run . -c 4 file1.txt xyz -$ ./ztail -c 4 file1.txt file2.txt +$ go run . -c 4 file1.txt file2.txt ==> file1.txt <== xyz @@ -37,7 +37,7 @@ $ Error cases : ``` -$ ./ztail -c 4 file1.txt nonexisting1.txt file2.txt nonexisting2.txt +$ go run . -c 4 file1.txt nonexisting1.txt file2.txt nonexisting2.txt ==> file1.txt <== xyz open nonexisting1.txt: no such file or directory