From d2d521d62b4962ebf56df86325ee0906ba394be1 Mon Sep 17 00:00:00 2001 From: lee Date: Wed, 2 Jun 2021 17:10:55 +0100 Subject: [PATCH 1/2] test and resources for quest-02 --- subjects/isnegative/README.md | 4 ++++ subjects/printalphabet/README.md | 4 ++++ subjects/printcomb/README.md | 8 ++++++-- subjects/printcomb2/README.md | 4 ++++ subjects/printcombn/README.md | 8 +++++++- subjects/printdigits/README.md | 4 ++++ subjects/printnbr/README.md | 5 +++++ subjects/printreversealphabet/README.md | 4 ++++ 8 files changed, 38 insertions(+), 3 deletions(-) diff --git a/subjects/isnegative/README.md b/subjects/isnegative/README.md index 9dc0803e..faa7a0bc 100644 --- a/subjects/isnegative/README.md +++ b/subjects/isnegative/README.md @@ -37,3 +37,7 @@ F T $ ``` + +### Notions + +- [01-edu/z01](https://github.com/01-edu/z01) diff --git a/subjects/printalphabet/README.md b/subjects/printalphabet/README.md index 02f1983e..20911807 100644 --- a/subjects/printalphabet/README.md +++ b/subjects/printalphabet/README.md @@ -13,3 +13,7 @@ $ go run . abcdefghijklmnopqrstuvwxyz $ ``` + +### Notions + +- [01-edu/z01](https://github.com/01-edu/z01) diff --git a/subjects/printcomb/README.md b/subjects/printcomb/README.md index a98f0325..bb2dee3d 100644 --- a/subjects/printcomb/README.md +++ b/subjects/printcomb/README.md @@ -36,6 +36,10 @@ $ go run . | cat -e $ ``` -`000` or `999` are not valid combinations because the digits are not different. +- `000` or `999` are not valid combinations because the digits are not different. -`987` should not be shown because the first digit is not less than the second. +- `987` should not be shown because the first digit is not less than the second. + +### Notions + +- [01-edu/z01](https://github.com/01-edu/z01) diff --git a/subjects/printcomb2/README.md b/subjects/printcomb2/README.md index 76119a3e..620b46d7 100644 --- a/subjects/printcomb2/README.md +++ b/subjects/printcomb2/README.md @@ -35,3 +35,7 @@ $ go run . | cat -e 00 01, 00 02, 00 03, ..., 00 98, 00 99, 01 02, 01 03, ..., 97 98, 97 99, 98 99$ $ ``` + +### Notions + +- [01-edu/z01](https://github.com/01-edu/z01) diff --git a/subjects/printcombn/README.md b/subjects/printcombn/README.md index 35585d57..0e3f6eb2 100644 --- a/subjects/printcombn/README.md +++ b/subjects/printcombn/README.md @@ -8,7 +8,7 @@ below are your references for the **printing format** expected. -- (for n = 1) '0, 1, 2, 3, ...8, 9' +- (for n = 1) '0, 1, 2, 3, ..., 8, 9' - (for n = 3) '012, 013, 014, 015, 016, 017, 018, 019, 023,...689, 789' @@ -45,3 +45,9 @@ $ go run . 012345678, 012345679, ..., 123456789 $ ``` + +> Be mindful of your program efficiency to avoid timeouts. + +### Notions + +- [01-edu/z01](https://github.com/01-edu/z01) diff --git a/subjects/printdigits/README.md b/subjects/printdigits/README.md index 40381764..edb285b7 100644 --- a/subjects/printdigits/README.md +++ b/subjects/printdigits/README.md @@ -13,3 +13,7 @@ $ go run . 0123456789 $ ``` + +### Notions + +- [01-edu/z01](https://github.com/01-edu/z01) diff --git a/subjects/printnbr/README.md b/subjects/printnbr/README.md index a32d5116..34b332a0 100644 --- a/subjects/printnbr/README.md +++ b/subjects/printnbr/README.md @@ -40,3 +40,8 @@ $ go run . -1230123 $ ``` + +### Notions + +- [01-edu/z01](https://github.com/01-edu/z01) +- [numeric types](https://golang.org/ref/spec#Numeric_types) diff --git a/subjects/printreversealphabet/README.md b/subjects/printreversealphabet/README.md index f15e0b17..a1edc8c7 100644 --- a/subjects/printreversealphabet/README.md +++ b/subjects/printreversealphabet/README.md @@ -15,3 +15,7 @@ $ go run . zyxwvutsrqponmlkjihgfedcba $ ``` + +### Notions + +- [01-edu/z01](https://github.com/01-edu/z01) From 661eeae5bc39e1b1a8c8787f1dc9228db588fae0 Mon Sep 17 00:00:00 2001 From: lee Date: Wed, 2 Jun 2021 17:33:44 +0100 Subject: [PATCH 2/2] test and resources for quest-03 --- subjects/atoi/README.md | 6 +++++- subjects/basicatoi/README.md | 6 +++++- subjects/basicatoi2/README.md | 8 ++++++-- subjects/divmod/README.md | 10 +++++++--- subjects/pointone/README.md | 6 +++++- subjects/printstr/README.md | 4 ++++ subjects/strrev/README.md | 2 +- subjects/swap/README.md | 6 +++++- subjects/ultimatedivmod/README.md | 10 +++++++--- subjects/ultimatepointone/README.md | 6 +++++- 10 files changed, 50 insertions(+), 14 deletions(-) diff --git a/subjects/atoi/README.md b/subjects/atoi/README.md index 99e6d291..19da105d 100644 --- a/subjects/atoi/README.md +++ b/subjects/atoi/README.md @@ -8,7 +8,7 @@ - For this exercise the handling of the signs + or - **does have** to be taken into account. -- This function will **only** have to return the `int`. For this exercise the `error` result of atoi is not required. +- This function will **only** have to return the `int`. For this exercise the `error` result of `Atoi` is not required. ### Expected function @@ -56,3 +56,7 @@ $ go run . 0 $ ``` + +### Notions + +- [strconv/Atoi](https://golang.org/pkg/strconv/#Atoi) diff --git a/subjects/basicatoi/README.md b/subjects/basicatoi/README.md index 7f3c9cdd..174ded4a 100644 --- a/subjects/basicatoi/README.md +++ b/subjects/basicatoi/README.md @@ -4,7 +4,7 @@ - Write a function that simulates the behaviour of the `Atoi` function in Go. `Atoi` transforms a number defined as a `string` in a number defined as an `int`. -- Atoi returns `0` if the `string` is not considered as a valid number. For this exercise **only valid** `string` will be tested. They will only contain one or several digits as characters. +- `Atoi` returns `0` if the `string` is not considered as a valid number. For this exercise **only valid** `string` will be tested. They will only contain one or several digits as characters. - For this exercise the handling of the signs `+` or `-` does not have to be taken into account. @@ -46,3 +46,7 @@ $ go run . 0 $ ``` + +### Notions + +- [strconv/Atoi](https://golang.org/pkg/strconv/#Atoi) diff --git a/subjects/basicatoi2/README.md b/subjects/basicatoi2/README.md index ed4e88a5..615b08f2 100644 --- a/subjects/basicatoi2/README.md +++ b/subjects/basicatoi2/README.md @@ -4,11 +4,11 @@ - Write a function that simulates the behaviour of the `Atoi` function in Go. `Atoi` transforms a number defined as a `string` in a number defined as an `int`. -- Atoi returns `0` if the `string` is not considered as a valid number. For this exercise **non-valid `string` chains will be tested**. Some will contain non-digits characters. +- `Atoi` returns `0` if the `string` is not considered as a valid number. For this exercise **non-valid `string` chains will be tested**. Some will contain non-digits characters. - For this exercise the handling of the signs `+` or `-` does not have to be taken into account. -- This function will **only** have to return the `int`. For this exercise the `error` return of atoi is not required. +- This function will **only** have to return the `int`. For this exercise the `error` return of `Atoi` is not required. ### Expected function @@ -48,3 +48,7 @@ $ go run . 0 $ ``` + +### Notions + +- [strconv/Atoi](https://golang.org/pkg/strconv/#Atoi) diff --git a/subjects/divmod/README.md b/subjects/divmod/README.md index 70d12264..30ca56f8 100644 --- a/subjects/divmod/README.md +++ b/subjects/divmod/README.md @@ -12,9 +12,9 @@ func DivMod(a int, b int, div *int, mod *int) { } ``` -- This function will divide the int **a** and **b**. -- The result of this division will be stored in the int pointed by **div**. -- The remainder of this division will be stored in the int pointed by **mod**. +- This function will divide the `int` **a** and **b**. +- The result of this division will be stored in the `int` pointed by **div**. +- The remainder of this division will be stored in the `int` pointed by **mod**. ### Usage @@ -47,3 +47,7 @@ $ go run . 1 $ ``` + +### Notions + +- [Pointers](https://golang.org/ref/spec#Pointer_types) diff --git a/subjects/pointone/README.md b/subjects/pointone/README.md index 458caee3..8ab4b4e7 100644 --- a/subjects/pointone/README.md +++ b/subjects/pointone/README.md @@ -2,7 +2,7 @@ ### Instructions -- Write a function that takes a **pointer to an int** as argument and gives to this int the value of 1. +- Write a function that takes a **pointer to an `int`** as argument and gives to this `int` the value of 1. ### Expected function @@ -38,3 +38,7 @@ $ go run . 1 $ ``` + +### Notions + +- [Pointers](https://golang.org/ref/spec#Pointer_types) diff --git a/subjects/printstr/README.md b/subjects/printstr/README.md index 8d6f20c3..2d272318 100644 --- a/subjects/printstr/README.md +++ b/subjects/printstr/README.md @@ -33,3 +33,7 @@ $ go run . | cat -e Hello World!% $ ``` + +### Notions + +- [01-edu/z01](https://github.com/01-edu/z01) diff --git a/subjects/strrev/README.md b/subjects/strrev/README.md index 314aa244..741abdec 100644 --- a/subjects/strrev/README.md +++ b/subjects/strrev/README.md @@ -4,7 +4,7 @@ - Write a function that reverses a `string`. -- This function will **return** the s `string`. +- This function will **return** the reversed `string`. ### Expected function diff --git a/subjects/swap/README.md b/subjects/swap/README.md index 8f29bb0d..0c5b36f1 100644 --- a/subjects/swap/README.md +++ b/subjects/swap/README.md @@ -2,7 +2,7 @@ ### Instructions -- Write a function that swaps the contents of two **pointers to an int** (`*int`). +- Write a function that swaps the contents of two **pointers to an `int`** (`*int`). ### Expected function @@ -41,3 +41,7 @@ $ go run . 0 $ ``` + +### Notions + +- [Pointers](https://golang.org/ref/spec#Pointer_types) diff --git a/subjects/ultimatedivmod/README.md b/subjects/ultimatedivmod/README.md index ff89b802..ee236c6f 100644 --- a/subjects/ultimatedivmod/README.md +++ b/subjects/ultimatedivmod/README.md @@ -12,9 +12,9 @@ func UltimateDivMod(a *int, b *int) { } ``` -- This function will divide the int **a** and **b**. -- The result of this division will be stored in the int pointed by **a**. -- The remainder of this division will be stored in the int pointed by **b**. +- This function will divide the `int` **a** and **b**. +- The result of this division will be stored in the `int` pointed by **a**. +- The remainder of this division will be stored in the `int` pointed by **b**. ### Usage @@ -45,3 +45,7 @@ $ go run . 1 $ ``` + +### Notions + +- [Pointers](https://golang.org/ref/spec#Pointer_types) diff --git a/subjects/ultimatepointone/README.md b/subjects/ultimatepointone/README.md index 0fbfe182..d407179e 100644 --- a/subjects/ultimatepointone/README.md +++ b/subjects/ultimatepointone/README.md @@ -2,7 +2,7 @@ ### Instructions -- Write a function that takes a **pointer to a pointer to a pointer to an int** as argument and gives to this int the value of 1. +- Write a function that takes a **pointer to a pointer to a pointer to an `int`** as argument and gives to this `int` the value of 1. ### Expected function @@ -40,3 +40,7 @@ $ go run . 1 $ ``` + +### Notions + +- [Pointers](https://golang.org/ref/spec#Pointer_types)