diff --git a/docs/grand-prix-go-curriculum.md b/docs/grand-prix-go-curriculum.md new file mode 100644 index 000000000..98783e5f0 --- /dev/null +++ b/docs/grand-prix-go-curriculum.md @@ -0,0 +1,330 @@ +# Grand Prix Go curriculum + +--- + +## Week One (Lundi 02/12/19 au DImanche 08/12/19) + +### Sprint 1 + +#### Introduction to shell + +Notions: basic usage and interaction with a command line terminal. + +Videos: + +- 1-2 `curl` with the GitHub api and Example of shell file | https://www.youtube.com/watch?v=A0Mqc215igw +- 1-3 `touch`, `chmod` and `echo` | https://www.youtube.com/watch?v=21h-vsuXgDU +- 1-4 `find` and `grep` | https://www.youtube.com/watch?v=7a1JSWHhJlM +- 1-5 `cut`, `sed` and `tr` | https://www.youtube.com/watch?v=Nil7rVP3eMI +- 1-6 `jq` and `wc` | https://www.youtube.com/watch?v=cQmcaOseuiA& + +Exercices: + +- introduction | https://public.01-edu.org/subjects/introduction.en +- make-it-better | https://public.01-edu.org/subjects/make-it-better.en +- to-git-or-not-to-git | https://public.01-edu.org/subjects/to-git-or-not-to-git.en +- who-are-you | https://public.01-edu.org/subjects/who-are-you.en +- cl-camp1 | https://public.01-edu.org/subjects/cl-camp1.en +- cl-camp2 | https://public.01-edu.org/subjects/cl-camp2.en +- cl-camp3 | https://public.01-edu.org/subjects/cl-camp3.en +- cl-camp4 | https://public.01-edu.org/subjects/cl-camp4.en +- cl-camp5 | https://public.01-edu.org/subjects/cl-camp5.en +- cl-camp6 | https://public.01-edu.org/subjects/cl-camp6.en +- cl-camp7 | https://public.01-edu.org/subjects/cl-camp7.en +- cl-camp8 | https://public.01-edu.org/subjects/cl-camp8.en +- now-get-to-work | https://public.01-edu.org/subjects/now-get-to-work.en + +### Sprint 2 + +#### Introduction to Go Lang and basic programmation concepts + +Notions: Variables declaration, Loops, if and else statement, usage of z01.PrintRune function. + +Videos: + +- 02-01-If and Else Statements in Go | https://www.youtube.com/watch?v=rnF1_SfeGE4 +- 02-02-ForLoops | https://www.youtube.com/watch?v=Bt47lx6q2-4 +- 02-03-PrintRune function | https://www.youtube.com/watch?v=o8JrvI3jqoM +- 02-04-Variables Declaration and ascii | https://www.youtube.com/watch?v=RCNOV8m0hJQ + +Exercices: + +- printalphabet | https://public.01-edu.org/subjects/printalphabet.en +- printreversealphabet | https://public.01-edu.org/subjects/printreversealphabet.en +- prindigits | https://public.01-edu.org/subjects/printdigits.en +- isnegative | https://public.01-edu.org/subjects/isnegative.en +- printcomb | https://public.01-edu.org/subjects/printcomb.en +- printcomb2 | https://public.01-edu.org/subjects/printcomb2.en +- printnbr | https://public.01-edu.org/subjects/printnbr.en +- printcombn | https://public.01-edu.org/subjects/printcombn.en + +### Sprint 3 + +#### Introduction to Go Lang and basic programmation concepts II + +Notions: String Manupulation, Range Loops, Pointers, Modulo and Division relative to computer science. + +Videos: + +- 03-01-StringsManipulation | https://www.youtube.com/watch?v=8LplJN_8iOU +- 03-02-RangeLoop | https://www.youtube.com/watch?v=i89N4cjh1-g +- 03-03-Pointers on variables | https://www.youtube.com/watch?v=owVPa5b1BMc +- 03-04-Modulo and Division | https://www.youtube.com/watch?v=NVan-9-Ioec + +Exercices: + +- pointone | https://public.01-edu.org/subjects/pointone.en +- ultimatepointone | https://public.01-edu.org/subjects/ultimatepointone.en +- divmod | https://public.01-edu.org/subjects/divmod.en +- ultimatedivmod | https://public.01-edu.org/subjects/ultimatedivmod.en +- printstr | https://public.01-edu.org/subjects/printstr.en +- strlen | https://public.01-edu.org/subjects/strlen.en +- swap | https://public.01-edu.org/subjects/swap.en +- strrev | https://public.01-edu.org/subjects/strrev.en +- basicatoi | https://public.01-edu.org/subjects/basicatoi.en +- basicatoi2 | https://public.01-edu.org/subjects/basicatoi2.en +- atoi | https://public.01-edu.org/subjects/atoi.en +- sortintegerable | https://public.01-edu.org/subjects/sortintegertable.en + +### Checkpoint 1 (4hours) + +#### Basic functions and programs skills evaluation, based on Sprint 2 and Sprint 3 + +### CLM (Contre La Montre) 1 - Rectangle Drawing + +#### First Group project. Problem resolution. Usage of first knowledge (loop and if/else) + +--- + +## Week Two (Lundi 09/12/2019 à Dimanche 15/12/2019) + +### Sprint 4 + +#### Algorithmia concepts + +Notions: Iterative and recursive programmation + +Videos: + +- 04-01-Iterativity and Recursivity | https://www.youtube.com/watch?v=oCZDdAID5Ik + +Exercices: + +- iterativefactorial | https://public.01-edu.org/subjects/iterativefactorial.en +- recursivefactorial | https://public.01-edu.org/subjects/recursivefactorial.en +- iterativepower | https://public.01-edu.org/subjects/iterativepower.en +- recursivepower | https://public.01-edu.org/subjects/recursivepower.en +- fibonacci | https://public.01-edu.org/subjects/fibonacci.en +- sqrt | https://public.01-edu.org/subjects/sqrt.en +- isprime | https://public.01-edu.org/subjects/isprime.en +- findnextprime | https://public.01-edu.org/subjects/findnextprime.en +- eightqueens | https://public.01-edu.org/subjects/eightqueens.en + +### Sprint 5 + +#### Application of previously viewed concepts. + +Notions: String Manipulation and medium-advanced algorithmia + +Videos: + +- 05-01-Runes, Bytes and Strings | https://www.youtube.com/watch?v=-eIU5ISID64 + +Exercices: + +- firstrune | https://public.01-edu.org/subjects/firstrune.en +- nrune | https://public.01-edu.org/subjects/nrune.en +- lastrune | https://public.01-edu.org/subjects/lastrune.en +- index | https://public.01-edu.org/subjects/index.en +- compare | https://public.01-edu.org/subjects/compare.en +- toupper | https://public.01-edu.org/subjects/toupper.en +- tolower | https://public.01-edu.org/subjects/tolower.en +- capitalize | https://public.01-edu.org/subjects/capitalize.en +- isalpha | https://public.01-edu.org/subjects/isalpha.en +- isnumeric | https://public.01-edu.org/subjects/isnumeric.en +- islower | https://public.01-edu.org/subjects/islower.en +- isupper | https://public.01-edu.org/subjects/isupper.en +- isprintable | https://public.01-edu.org/subjects/isprintable.en +- concat | https://public.01-edu.org/subjects/concat.en +- basicjoin | https://public.01-edu.org/subjects/basicjoin.en +- join | https://public.01-edu.org/subjects/join.en +- printnbrbase | https://public.01-edu.org/subjects/printnbrbase.en +- atoibase | https://public.01-edu.org/subjects/atoibase.en + +### Sprint 6 + +#### Usage of OS.Args + +Notions: Arguments manipulation in programs + +Videos: + +- 06-01-Os.Args | https://www.youtube.com/watch?v=I1xt_TLRhF0 + +Exercices: + +- printprogramname | https://public.01-edu.org/subjects/printprogramname.en +- printparams | https://public.01-edu.org/subjects/printparams.en +- revparams | https://public.01-edu.org/subjects/revparams.en +- sortparams | https://public.01-edu.org/subjects/sortparams.en + +### Sprint 7 + +#### The Memory Allocation in GoLang + +Notions: Usage of Make and Append + +Videos: + +- 07-01-Make and Append methods | https://www.youtube.com/watch?v=2HHVUM0YQuI + +Exercices: + +- appendrange | https://public.01-edu.org/subjects/apprendrange.en +- makerange | https://public.01-edu.org/subjects/makerange.en +- concatparams | https://public.01-edu.org/subjects/concatparams.en +- splitwhitespaces | https://public.01-edu.org/subjects/splitwhitespaces.en +- printwordstables | https://public.01-edu.org/subjects/printwordstables.en +- convertbase | https://public.01-edu.org/subjects/converbase.en +- split | https://public.01-edu.org/subjects/split.en + +### Checkpoint 2 (4hours) + +#### Basic functions and programs skills evaluation, based on Sprint 2 and Sprint 6 + +### CLM (Contre La Montre) 2 - Sudoku + +#### Second Group project. Problem resolution. Usage of Memory manipulation tools + +--- + +## Week Three + Holiday project (Lundi 16/12/2019 à dimache 05/01/2020 ) + +### Sprint 8 + +#### Introduction to Structures and advanced types in GoLang + +Notions: Creation of struct types and file manipulation (Open, Read, Close methods) + +Videos: + +- 08-01-Structures in Go | https://www.youtube.com/watch?v=-24M7r7VuLY +- 08-02-File Manipulation in go | https://www.youtube.com/watch?v=8vUgchQGhcQ + +Exercices: + +- bool | https://public.01-edu.org/subjects/bool.en +- point | https://public.01-edu.org/subjects/point.en +- displayfile | https://public.01-edu.org/subjects/displayfile.en +- cat | https://public.01-edu.org/subjects/cat.en +- ztail | https://public.01-edu.org/subjects/ztail.en + +### Sprint 9 + +#### Functions as argument + +Notions: Advance function prototyping + +Videos: + +- 09-01-Functions as Arguments | https://www.youtube.com/watch?v=lw8jUwsluAE + +Exercices: + +- foreach | https://public.01-edu.org/subjects/foreach.en +- map | https://public.01-edu.org/subjects/map.en +- any | https://public.01-edu.org/subjects/any.en +- countif | https://public.01-edu.org/subjects/countif.en +- issorted | https://public.01-edu.org/subjects/issorted.en +- doop | https://public.01-edu.org/subjects/doop.en +- sortwordarr | https://public.01-edu.org/subjects/sortwordarr.en +- advancedsortwordarr | https://public.01-edu.org/subjects/advancedsortwordarr.en + +### Sprint 10 + +#### Hackathon + +Notions: All previously viewed concepts in team work + +Exercices: + +- rot14 | https://public.01-edu.org/subjects/rot14.en +- abort | https://public.01-edu.org/subjects/abort.en +- collatzcountdown | https://public.01-edu.org/subjects/collatzcountdown.en +- comcheck | https://public.01-edu.org/subjects/comcheck.en +- enigma | https://public.01-edu.org/subjects/enigma.en +- pilot | https://public.01-edu.org/subjects/pilot.en +- fixthemain | https://public.01-edu.org/subjects/fixthemain.en +- compact | https://public.01-edu.org/subjects/compact.en +- activebits | https://public.01-edu.org/subjects/activebits.en +- max | https://public.01-edu.org/subjects/max.en +- join | https://public.01-edu.org/subjects/join.en +- unmatch | https://public.01-edu.org/subjects/unmatch.en + +### Checkpoint 3 (4hours) + +#### Basic functions and programs skills evaluation, based on Sprint 2 and Sprint 8 + +### CLM (Contre La Montre) 3 - File Reader ( Projet pour les 2 semaines de vacances) + +#### Second Group project. Problem resolution. File manipulation based on CLM (Contre La Montre) 1 + +--- + +## Week Four (lundi 06/01/2020 à vendredi 10/01/2020) + +### Sprint 11 + +#### Linked lists in GoLang + +Notions: Pointers manipulation and data structure + +Videos: + +- 11-01-Linked Lists Introduction | https://www.youtube.com/watch?v=EPICVEbylU0 + +Exercices: + +- listpushback | https://public.01-edu.org/subjects/listpushback.en +- listpushfront | https://public.01-edu.org/subjects/listpushfront.en +- listsize | https://public.01-edu.org/subjects/listsize.en +- listlast | https://public.01-edu.org/subjects/listlast.en +- listclear | https://public.01-edu.org/subjects/listclear.en +- listat | https://public.01-edu.org/subjects/listat.en +- listreverse | https://public.01-edu.org/subjects/listreverse.en +- listforeach | https://public.01-edu.org/subjects/listforeach.en +- listforeachif | https://public.01-edu.org/subjects/listforeachif.en +- listfind | https://public.01-edu.org/subjects/listfind.en +- listremoveif | https://public.01-edu.org/subjects/listremoveif.en +- listmerge | https://public.01-edu.org/subjects/listmerge.en +- listsort | https://public.01-edu.org/subjects/listsort.en +- sortlistinsert | https://public.01-edu.org/subjects/sortlistinsert.en +- sortedlistmerge | https://public.01-edu.org/subjects/sortedlistmerge.en + +### Sprint 12 + +#### Binary Trees + +Notions: Advanced Data Structure using binary trees + +Videos: + +- 12-01-Introduction to Binary Trees | https://www.youtube.com/watch?v=3g2WCqWNIVs + +Exercices: + +- btreeinsertdata | https://public.01-edu.org/subjects/btreeinsertdata.en +- btreeapplyinorder | https://public.01-edu.org/subjects/btreeapplyinorder.en +- btreeapplypreorder | https://public.01-edu.org/subjects/btreeapplypreorder.en +- btreesearchitem | https://public.01-edu.org/subjects/btreesearchitem.en +- btreelevelcount | https://public.01-edu.org/subjects/btreelevelcount.en +- btreeisbinary | https://public.01-edu.org/subjects/btreeisbinary.en +- btreeapplylevel | https://public.01-edu.org/subjects/btreeapplylevel.en +- btreemax | https://public.01-edu.org/subjects/btreemax.en +- btreemin | https://public.01-edu.org/subjects/btreemin.en +- btreetransplant | https://public.01-edu.org/subjects/btreetransplant.en +- btreedeletenode | https://public.01-edu.org/subjects/btreedeletenode.en + +### Checkpoint 4 - Final Checkpoint (8hours) + +#### Functions and programs skills evaluation, based on Sprint 2 and Sprint 11 diff --git a/docs/server-installation.md b/docs/server-installation.md new file mode 100644 index 000000000..089c00ee8 --- /dev/null +++ b/docs/server-installation.md @@ -0,0 +1,47 @@ +# Server installation + +## DNS configuration + +One domain and one subdomain must point to the IP address of a [dedicated server](server-requirements.md). + +| FQDN | Record type | Address | +| -------------- | ----------- | ------- | +| {{DOMAIN}} | A | X.X.X.X | +| git.{{DOMAIN}} | A | X.X.X.X | + +## Network configuration + +### Inbound + +| Port | Transport | Application | +| ---- | --------- | ---------------- | +| 22 | TCP | SSH | +| 80 | TCP, UDP | HTTP/(1.1, 2, 3) | +| 443 | TCP, UDP | HTTP/(1.1, 2, 3) | +| 521 | TCP | SSH | + +### Outbound + +| Port | Transport | Application | +| ---- | --------- | ----------- | +| 465 | TCP | SMTP | + +### OS installation + +Download and boot the ISO image `amd64` of [Debian](https://www.debian.org/distrib/netinst) + +Select : + +- "Advanced options ..." +- "... Automated install" + +The network is automatically configured with DHCP, you can also configure it manually. + +At the prompt "Location of initial preconfiguration file:", enter the url : + +``` +raw.githubusercontent.com/01-edu/public/master/scripts/preseed.cfg +``` + +and select "Continue", let us know when the server's remote access is ready, we will configure it. + diff --git a/scripts/preseed.cfg b/scripts/preseed.cfg index 5fdd31b57..76d563394 100644 --- a/scripts/preseed.cfg +++ b/scripts/preseed.cfg @@ -14,8 +14,8 @@ d-i mirror/http/hostname string deb.debian.org d-i mirror/http/directory string /debian d-i mirror/http/proxy string -#d-i netcfg/choose_interface select auto -#d-i netcfg/get_hostname string debian -#d-i netcfg/get_domain string local +# d-i netcfg/choose_interface select auto +# d-i netcfg/get_hostname string debian +# d-i netcfg/get_domain string local d-i hw-detect/load_firmware boolean true diff --git a/subjects/atoiprog.en.md b/subjects/atoiprog.en.md index a786abfb1..221178409 100644 --- a/subjects/atoiprog.en.md +++ b/subjects/atoiprog.en.md @@ -1,6 +1,6 @@ ## atoiprog -##**WARNING! VERY IMPORTANT!** +## **WARNING! VERY IMPORTANT!** For this exercise a function will be tested **with the exam own main**. However the student **still needs** to submit a structured program: diff --git a/subjects/cat.en.md b/subjects/cat.en.md index 67232219f..8e5875d36 100644 --- a/subjects/cat.en.md +++ b/subjects/cat.en.md @@ -24,13 +24,15 @@ Write a program that has the same behaviour as the system's `cat` command-line. ```console student@ubuntu:~/piscine-go/cat$ go build -student@ubuntu:~/piscine-go/cat$ ./cat -Hello -Hello +student@ubuntu:~/piscine-go/cat$ ./cat abc +open abc: no such file or directory student@ubuntu:~/piscine-go/cat$ ./cat quest8.txt "Programming is a skill best acquired by pratice and example rather than from books" by Alan Turing +student@ubuntu:~/piscine-go/cat$ ./cat +Hello +Hello^C student@ubuntu:~/piscine-go/cat$ ./cat 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:~/piscine-go/cat$ ``` diff --git a/subjects/cat.fr.md b/subjects/cat.fr.md index 1ba449896..1d6774358 100644 --- a/subjects/cat.fr.md +++ b/subjects/cat.fr.md @@ -18,17 +18,15 @@ `"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."` -- En cas d'erreur le programme doit imprimer l'erreur. - - L eprogramme doit être rendu dans un dossier nommé `cat`. ### Utilisation: ```console student@ubuntu:~/piscine-go/cat$ go build -student@ubuntu:~/piscine-go/cat$ ./cat -Hello +student@ubuntu:~/piscine-go/cat$ ./cat Hello There Hello +There student@ubuntu:~/piscine-go/cat$ ./cat quest8.txt "Programming is a skill best acquired by pratice and example rather than from books" by Alan Turing student@ubuntu:~/piscine-go/cat$ ./cat quest8.txt quest8T.txt diff --git a/subjects/cl-camp3.en.md b/subjects/cl-camp3.en.md index e10fd90db..5372dcba5 100644 --- a/subjects/cl-camp3.en.md +++ b/subjects/cl-camp3.en.md @@ -6,8 +6,8 @@ Create a file `look`, which will look for and show, in the current directory and its sub-folders all the files : -- starting with an `a` and, -- all the files ending with a `z` and, +- starting with an `a` or, +- all the files ending with a `z` or, - all files starting with `z` and ending with `a!`. ### Hint diff --git a/subjects/convertbase.en.md b/subjects/convertbase.en.md index 9c4f1e592..ba136e610 100644 --- a/subjects/convertbase.en.md +++ b/subjects/convertbase.en.md @@ -2,7 +2,7 @@ ### Instructions -Write a function that returns the convertion of a `string` number from one `string` baseFrom to one `string` baseTo. +Write a function that returns the conversion of a `string` number from one `string` baseFrom to one `string` baseTo. Only valid bases will be tested. diff --git a/subjects/disclaimer.en.md b/subjects/disclaimer.en.md index 29b469c63..31b6bacc1 100644 --- a/subjects/disclaimer.en.md +++ b/subjects/disclaimer.en.md @@ -1,4 +1,4 @@ -##**WARNING! VERY IMPORTANT!** +## **WARNING! VERY IMPORTANT!** For this exercise a function will be tested **with the exam own main**. However the student **still needs** to submit a structured program: diff --git a/subjects/disclaimer.fr.md b/subjects/disclaimer.fr.md index 85f821d63..ed4eaf663 100644 --- a/subjects/disclaimer.fr.md +++ b/subjects/disclaimer.fr.md @@ -1,4 +1,4 @@ -##**AVERTISSEMENT! TRÈS IMPORTANT!** +## **AVERTISSEMENT! TRÈS IMPORTANT!** Pour cet exercice une fonction sera testée **avec le main de l'examen**. Cependant l'étudiant **doit quand même** rendre un programme structuré: diff --git a/subjects/doop.en.md b/subjects/doop.en.md index fd67dc190..3a1331854 100644 --- a/subjects/doop.en.md +++ b/subjects/doop.en.md @@ -10,10 +10,16 @@ The program has to be used with three arguments: - An operator - Another value +You should use `int64`. + +The following operators are considered valid: `+`, `-`, `/`, `*`, `%`. + In case of an invalid operator the programs prints `0`. In case of an invalid number of arguments the program prints nothing. +In case of overflow the program prints `Overflow`. + The program has to handle the modulo and division operations by 0 as shown on the output examples below. `fmt.Print` is authorized. @@ -33,6 +39,12 @@ student@ubuntu:~/piscine-go/test$ ./doop 1 / 0 | cat -e No division by 0$ student@ubuntu:~/piscine-go/test$ ./doop 1 % 0 | cat -e No Modulo by 0$ +student@ubuntu:~/piscine-go/test$ ./doop 9223372036854775807 + 1 +Overflow +student@ubuntu:~/piscine-go/test$ ./doop -9223372036854775809 "*" 3 +Overflow +student@ubuntu:~/piscine-go/test$ ./doop 9223372036854775807 "*" 3 +Overflow student@ubuntu:~/piscine-go/test$ ./doop 1 "*" 1 1 student@ubuntu:~/piscine-go/test$ ./doop 1 "*" -1 diff --git a/subjects/eightqueens.en.md b/subjects/eightqueens.en.md index bad19e06a..9ea155188 100644 --- a/subjects/eightqueens.en.md +++ b/subjects/eightqueens.en.md @@ -25,7 +25,7 @@ The solutions will be printed in ascending order. ### Expected function ```go -package main +package piscine func EightQueens() { diff --git a/subjects/explain.en.md b/subjects/explain.en.md index a3962cf5f..9d130b1ab 100644 --- a/subjects/explain.en.md +++ b/subjects/explain.en.md @@ -13,7 +13,7 @@ Write an `explain.sh` file that: - displays the first and last name of your key witness - displays the interview number of this witness - displays the colour and the make of the car of the suspects -- displays the names of the 3 other main suspects that were not arrested (in the order that they should have appeared during the investigation) +- displays the names of the 3 other main suspects that were not arrested (in alphabetical order of their last name) ### Usage diff --git a/subjects/firstruneprog.en.md b/subjects/firstruneprog.en.md index c747c00be..7e9fa6792 100644 --- a/subjects/firstruneprog.en.md +++ b/subjects/firstruneprog.en.md @@ -1,8 +1,8 @@ ## firstruneprog -## **WARNING! VERY IMPORTANT!** - -For this exercise a function will be tested **with the exam own main**. However the student **still needs** to submit a structured program: +> ### **WARNING! VERY IMPORTANT!** +> +> For this exercise a function will be tested **with the exam own main**. However the student **still needs** to submit a structured program This means that: diff --git a/subjects/fprime.en.md b/subjects/fprime.en.md index 0c4ad4baf..c33dd89b1 100644 --- a/subjects/fprime.en.md +++ b/subjects/fprime.en.md @@ -10,8 +10,6 @@ Write a program that takes a positive `int` and displays its prime factors, foll - The input, when there is one, will always be valid. -- In this exercise the primes factor of 1 is considered as 1. - ### Usage ```console @@ -31,6 +29,6 @@ student@ubuntu:~/piscine-go/test$ ./test a student@ubuntu:~/piscine-go/test$ ./test 0 student@ubuntu:~/piscine-go/test$ ./test 1 -1 + student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/fprime.fr.md b/subjects/fprime.fr.md index 3aa55c3d0..b0602105f 100644 --- a/subjects/fprime.fr.md +++ b/subjects/fprime.fr.md @@ -28,5 +28,7 @@ student@ubuntu:~/piscine-go/test$ ./test a student@ubuntu:~/piscine-go/test$ ./test 0 +student@ubuntu:~/piscine-go/test$ ./test 1 + student@ubuntu:~/piscine-go/test$ ``` diff --git a/subjects/introduction.en.md b/subjects/introduction.en.md index c1f9074d6..ffe99fdbc 100644 --- a/subjects/introduction.en.md +++ b/subjects/introduction.en.md @@ -12,7 +12,7 @@ Once created, clone that repository on your desktop. If your username was `choumi` this is the command that will need to be used : -`git clone git@git.alem.school:choumi/piscine-go.git` +`git clone git@git.01.alem.school:choumi/piscine-go.git` This command needs to be adapted with **your own username**. diff --git a/subjects/isalpha.en.md b/subjects/isalpha.en.md index 298a9f020..09b52f81d 100644 --- a/subjects/isalpha.en.md +++ b/subjects/isalpha.en.md @@ -2,7 +2,7 @@ ### Instructions -Write a function that returns `true` if the `string` passed in parameter only contains alphanumerical characters, and that returns `false` otherwise. +Write a function that returns `true` if the `string` passed in parameter only contains alphanumerical characters or is empty, and that returns `false` otherwise. ### Expected function diff --git a/subjects/itoabase.en.md b/subjects/itoabase.en.md index ec8d29fd6..33338b168 100644 --- a/subjects/itoabase.en.md +++ b/subjects/itoabase.en.md @@ -1,16 +1,5 @@ ## itoabase -## **WARNING! VERY IMPORTANT!** - -For this exercise a function will be tested **with the exam own main**. However the student **still needs** to submit a structured program: - -This means that: - -- The package needs to be named `package main`. -- The submitted code needs one declared function main(```func main()```) even if empty. -- The function main declared needs to **also pass** the `Restrictions Checker`(illegal functions tester). It is advised for the student to just empty the function main after its own testings are done. -- Every other rules are obviously the same than for a `program`. - ### Instructions Write a function that: diff --git a/subjects/printnbrbase.en.md b/subjects/printnbrbase.en.md index 15880adc4..226c1ba22 100644 --- a/subjects/printnbrbase.en.md +++ b/subjects/printnbrbase.en.md @@ -17,7 +17,7 @@ The function has to manage negative numbers. (as shown in the example) ### Expected function ```go -func PrintNbrBase(nbr int, base string) () { +func PrintNbrBase(nbr int, base string) { } ``` diff --git a/subjects/printnbrbase.fr.md b/subjects/printnbrbase.fr.md index af3ee3a41..4031792bc 100644 --- a/subjects/printnbrbase.fr.md +++ b/subjects/printnbrbase.fr.md @@ -17,7 +17,7 @@ La fonction doit gérer les nombres négatifs (comme montré sur l'exemple). ### Fonction attendue ```go -func PrintNbrBase(nbr int, base string) () { +func PrintNbrBase(nbr int, base string) { } ``` diff --git a/subjects/printparams.en.md b/subjects/printparams.en.md index c521b866c..b11a9357e 100644 --- a/subjects/printparams.en.md +++ b/subjects/printparams.en.md @@ -7,12 +7,12 @@ Write a **program** that prints the arguments received in the command line. Example of output : ```console -student@ubuntu:~/piscine-go/test$ go build -student@ubuntu:~/piscine-go/test$ ./printparams choumi is the best cat +student@ubuntu:~/piscine-go/printparams$ go build +student@ubuntu:~/piscine-go/printparams$ ./printparams choumi is the best cat choumi is the best cat -student@ubuntu:~/piscine-go/test$ +student@ubuntu:~/piscine-go/printparams$ ``` diff --git a/subjects/printparams.fr.md b/subjects/printparams.fr.md index e2b50f961..fba7e7dd8 100644 --- a/subjects/printparams.fr.md +++ b/subjects/printparams.fr.md @@ -7,12 +7,12 @@ Exemple de résultat : ```console -student@ubuntu:~/piscine-go/test$ go build -student@ubuntu:~/piscine-go/test$ ./printparams choumi is the best cat +student@ubuntu:~/piscine-go/printparams$ go build +student@ubuntu:~/piscine-go/printparams$ ./printparams choumi is the best cat choumi is the best cat -student@ubuntu:~/piscine-go/test$ +student@ubuntu:~/piscine-go/printparams$ ``` diff --git a/subjects/raid1a.en.md b/subjects/raid1a.en.md index 76e234420..1daad823e 100644 --- a/subjects/raid1a.en.md +++ b/subjects/raid1a.en.md @@ -2,9 +2,9 @@ ### Instructions -Write a function `Raid1a` that prints a **valid** square of width `x` and of height `y`. +Write a function `Raid1a` that prints a **valid** rectangle of width `x` and of height `y`. -The function must draw the squares as in the examples. +The function must draw the rectangles as in the examples. ### Expected function @@ -24,7 +24,6 @@ Program #1 package main import ( - "fmt" student "./student" ) @@ -50,7 +49,6 @@ Program #2 package main import ( - "fmt" student "./student" ) @@ -74,7 +72,6 @@ Program #3 package main import ( - "fmt" student "./student" ) @@ -98,7 +95,6 @@ Program #4 package main import ( - "fmt" student "./student" ) diff --git a/subjects/raid1a.fr.md b/subjects/raid1a.fr.md index 877c76d2a..66d64b9bc 100644 --- a/subjects/raid1a.fr.md +++ b/subjects/raid1a.fr.md @@ -2,9 +2,9 @@ ### Instructions -Écrire une fonction `Raid1a` qui affiche un carré **valide** de largeur `x` et de hauteur `y`. +Écrire une fonction `Raid1a` qui affiche un rectangle **valide** de largeur `x` et de hauteur `y`. -Cette fonction doit dessiner les carrés comme sur les examples. +Cette fonction doit dessiner les rectangles comme sur les examples. ### Fonction attendue @@ -24,7 +24,6 @@ Programme #1 package main import ( - "fmt" student "./student" ) @@ -50,7 +49,6 @@ Programme #2 package main import ( - "fmt" student "./student" ) @@ -74,7 +72,6 @@ Programme #3 package main import ( - "fmt" student "./student" ) @@ -98,7 +95,6 @@ Programme #4 package main import ( - "fmt" student "./student" ) diff --git a/subjects/raid1b.en.md b/subjects/raid1b.en.md index f096ab6c4..8e304afe5 100644 --- a/subjects/raid1b.en.md +++ b/subjects/raid1b.en.md @@ -2,9 +2,9 @@ ### Instructions -Write a function `Raid1b` that prints a **valid** square of width `x` and of height `y`. +Write a function `Raid1b` that prints a **valid** rectangle of width `x` and of height `y`. -The function must draw the squares as in the examples. +The function must draw the rectangles as in the examples. ### Expected function @@ -24,7 +24,6 @@ Program #1 package main import ( - "fmt" student "./student" ) @@ -50,7 +49,6 @@ Program #2 package main import ( - "fmt" student "./student" ) @@ -74,7 +72,6 @@ Program #3 package main import ( - "fmt" student "./student" ) @@ -98,7 +95,6 @@ Program #4 package main import ( - "fmt" student "./student" ) diff --git a/subjects/raid1b.fr.md b/subjects/raid1b.fr.md index 1289e39be..d2dc34f82 100644 --- a/subjects/raid1b.fr.md +++ b/subjects/raid1b.fr.md @@ -2,9 +2,9 @@ ### Instructions -Écrire une fonction `Raid1b` qui affiche un carré **valide** de largeur `x` et de hauteur `y`. +Écrire une fonction `Raid1b` qui affiche un rectangle **valide** de largeur `x` et de hauteur `y`. -Cette fonction doit dessiner les carrés comme sur les examples. +Cette fonction doit dessiner les rectangles comme sur les examples. ### Fonction attendue @@ -24,7 +24,6 @@ Programme #1 package main import ( - "fmt" student "./student" ) @@ -50,7 +49,6 @@ Programme #2 package main import ( - "fmt" student "./student" ) @@ -74,7 +72,6 @@ Programme #3 package main import ( - "fmt" student "./student" ) @@ -98,7 +95,6 @@ Programme #4 package main import ( - "fmt" student "./student" ) diff --git a/subjects/raid1c.en.md b/subjects/raid1c.en.md index 003be5d65..5aaf8a1a6 100644 --- a/subjects/raid1c.en.md +++ b/subjects/raid1c.en.md @@ -2,9 +2,9 @@ ### Instructions -Write a function `Raid1c` that prints a **valid** square of width `x` and of height `y`. +Write a function `Raid1c` that prints a **valid** rectangle of width `x` and of height `y`. -The function must draw the squares as in the examples. +The function must draw the rectangles as in the examples. ### Expected function @@ -24,7 +24,6 @@ Program #1 package main import ( - "fmt" student "./student" ) @@ -50,7 +49,6 @@ Program #2 package main import ( - "fmt" student "./student" ) @@ -74,7 +72,6 @@ Program #3 package main import ( - "fmt" student "./student" ) @@ -98,7 +95,6 @@ Program #4 package main import ( - "fmt" student "./student" ) diff --git a/subjects/raid1c.fr.md b/subjects/raid1c.fr.md index d064867a6..c6613aa5d 100644 --- a/subjects/raid1c.fr.md +++ b/subjects/raid1c.fr.md @@ -2,9 +2,9 @@ ### Instructions -Écrire une fonction `Raid1c` qui affiche un carré **valide** de largeur `x` et de hauteur `y`. +Écrire une fonction `Raid1c` qui affiche un rectangle **valide** de largeur `x` et de hauteur `y`. -Cette fonction doit dessiner les carrés comme sur les examples. +Cette fonction doit dessiner les rectangles comme sur les examples. ### Fonction attendue @@ -24,7 +24,6 @@ Programme #1 package main import ( - "fmt" student "./student" ) @@ -50,7 +49,6 @@ Programme #2 package main import ( - "fmt" student "./student" ) @@ -74,7 +72,6 @@ Programme #3 package main import ( - "fmt" student "./student" ) @@ -98,7 +95,6 @@ Programme #4 package main import ( - "fmt" student "./student" ) diff --git a/subjects/raid1d.en.md b/subjects/raid1d.en.md index c1ae6d8d7..691d4010e 100644 --- a/subjects/raid1d.en.md +++ b/subjects/raid1d.en.md @@ -2,9 +2,9 @@ ### Instructions -Write a function `Raid1d` that prints a **valid** square of width `x` and of height `y`. +Write a function `Raid1d` that prints a **valid** rectangle of width `x` and of height `y`. -The function must draw the squares as in the examples. +The function must draw the rectangles as in the examples. ### Expected function @@ -24,7 +24,6 @@ Program #1 package main import ( - "fmt" student "./student" ) @@ -50,7 +49,6 @@ Program #2 package main import ( - "fmt" student "./student" ) @@ -74,7 +72,6 @@ Program #3 package main import ( - "fmt" student "./student" ) @@ -98,7 +95,6 @@ Program #4 package main import ( - "fmt" student "./student" ) diff --git a/subjects/raid1d.fr.md b/subjects/raid1d.fr.md index 9cbdc161c..d889014ea 100644 --- a/subjects/raid1d.fr.md +++ b/subjects/raid1d.fr.md @@ -2,9 +2,9 @@ ### Instructions -Écrire une fonction `Raid1d` qui affiche un carré **valide** de largeur `x` et de hauteur `y`. +Écrire une fonction `Raid1d` qui affiche un rectangle **valide** de largeur `x` et de hauteur `y`. -Cette fonction doit dessiner les carrés comme sur les examples. +Cette fonction doit dessiner les rectangles comme sur les examples. ### Fonction attendue @@ -24,7 +24,6 @@ Programme #1 package main import ( - "fmt" student "./student" ) @@ -50,7 +49,6 @@ Programme #2 package main import ( - "fmt" student "./student" ) @@ -74,7 +72,6 @@ Programme #3 package main import ( - "fmt" student "./student" ) @@ -98,7 +95,6 @@ Programme #4 package main import ( - "fmt" student "./student" ) diff --git a/subjects/raid1e.en.md b/subjects/raid1e.en.md index 94cbce370..055dcfa39 100644 --- a/subjects/raid1e.en.md +++ b/subjects/raid1e.en.md @@ -2,9 +2,9 @@ ### Instructions -Write a function `Raid1e` that prints a **valid** square of width `x` and of height `y`. +Write a function `Raid1e` that prints a **valid** rectangle of width `x` and of height `y`. -The function must draw the squares as in the examples. +The function must draw the rectangles as in the examples. ### Expected function @@ -24,7 +24,6 @@ Program #1 package main import ( - "fmt" student "./student" ) @@ -50,7 +49,6 @@ Program #2 package main import ( - "fmt" student "./student" ) @@ -74,7 +72,6 @@ Program #3 package main import ( - "fmt" student "./student" ) @@ -98,7 +95,6 @@ Program #4 package main import ( - "fmt" student "./student" ) diff --git a/subjects/raid1e.fr.md b/subjects/raid1e.fr.md index 4b7124a1e..acf2878f5 100644 --- a/subjects/raid1e.fr.md +++ b/subjects/raid1e.fr.md @@ -2,9 +2,9 @@ ### Instructions -Écrire une fonction `Raid1e` qui affiche un carré **valide** de largeur `x` et de hauteur `y`. +Écrire une fonction `Raid1e` qui affiche un rectangle **valide** de largeur `x` et de hauteur `y`. -Cette fonction doit dessiner les carrés comme sur les examples. +Cette fonction doit dessiner les rectangles comme sur les examples. ### Fonction attendue @@ -24,7 +24,6 @@ Programme #1 package main import ( - "fmt" student "./student" ) @@ -50,7 +49,6 @@ Programme #2 package main import ( - "fmt" student "./student" ) @@ -74,7 +72,6 @@ Programme #3 package main import ( - "fmt" student "./student" ) @@ -98,7 +95,6 @@ Programme #4 package main import ( - "fmt" student "./student" ) diff --git a/subjects/reversebits.en.md b/subjects/reversebits.en.md index 7ed4ddadc..7ae7fd193 100644 --- a/subjects/reversebits.en.md +++ b/subjects/reversebits.en.md @@ -13,12 +13,12 @@ This means that: ### Instructions -Write a function that takes a `byte`, reverses it, `bit` by `bit` (like the -example) and returns the result. +Write a function that takes a `byte`, reverses it `bit` by `bit` (as shown in the example) and returns the result. ### Expected function ```go + func ReverseBits(oct byte) byte { } diff --git a/subjects/reversebits.fr.md b/subjects/reversebits.fr.md index 96e03ec8f..cd08a4502 100644 --- a/subjects/reversebits.fr.md +++ b/subjects/reversebits.fr.md @@ -21,6 +21,7 @@ Cela signifie que: func ReverseBits(oct byte) byte { } + ``` Exemple: diff --git a/subjects/rot14.en.md b/subjects/rot14.en.md index a31914774..3a3694441 100644 --- a/subjects/rot14.en.md +++ b/subjects/rot14.en.md @@ -2,9 +2,7 @@ ### Instructions -Write a function `rot14` that returns the `string` within the parameter transformed into a `rot14 string`. - -- There is the need to know what `rot13` stands for. +Write a function `rot14` that returns the `string` within the parameter transformed into a `rot14 string`, that replaces a letter with the 14th letter after it, in the alphabet. ### Expected function diff --git a/subjects/sortparams.en.md b/subjects/sortparams.en.md index eb586885f..06dcf0078 100644 --- a/subjects/sortparams.en.md +++ b/subjects/sortparams.en.md @@ -7,8 +7,8 @@ Write a **program** that prints the arguments received in the command line in AS Example of output : ```console -student@ubuntu:~/piscine-go/test$ go build -student@ubuntu:~/piscine-go/test$ ./sortparams 1 a 2 A 3 b 4 C +student@ubuntu:~/piscine-go/sortparams$ go build +student@ubuntu:~/piscine-go/sortparams$ ./sortparams 1 a 2 A 3 b 4 C 1 2 3 @@ -17,5 +17,5 @@ A C a b -student@ubuntu:~/piscine-go/test$ +student@ubuntu:~/piscine-go/sortparams$ ``` diff --git a/subjects/splitprog.fr.md b/subjects/splitprog.fr.md index 195450470..c43f92248 100644 --- a/subjects/splitprog.fr.md +++ b/subjects/splitprog.fr.md @@ -1,5 +1,17 @@ ## splitprog +## **AVERTISSEMENT! TRÈS IMPORTANT!** + +Pour cet exercice une fonction sera testée **avec le main de l'examen**. Cependant l'étudiant **doit quand même** rendre un programme structuré: + +Cela signifie que: + +- Le package doit être nommé `package main`. +- Le code rendu doit avoir une fonction main déclarée(```func main()```) même si elle est vide. +- La fonction main déclarée doit **aussi passer** le `Restrictions Checker`(le testeur de fonctions illégales). Il est conseillé à l'étudiant de rendre une fonction main vide après ses tests finis. +- Toutes les autres régles sont les mêmes que pour un `programme`. + + ### Instructions Écrire une fonction qui sépare les mots d'une `string`, qui les met dans un tableau de `string`. @@ -32,6 +44,7 @@ func main() { } ``` + Et son résultat : ```console diff --git a/subjects/unavailable.en.md b/subjects/unavailable.en.md new file mode 100644 index 000000000..caef4db19 --- /dev/null +++ b/subjects/unavailable.en.md @@ -0,0 +1,3 @@ +# Unavailable + +This subject is currently unavailable for you. diff --git a/subjects/unavailable.fr.md b/subjects/unavailable.fr.md new file mode 100644 index 000000000..6be8cf6a6 --- /dev/null +++ b/subjects/unavailable.fr.md @@ -0,0 +1,3 @@ +# Indisponible + +Ce sujet est actuellement indisponible pour vous.