From 8467b73de60cb0b76bf137ad12d2df818c4fcbe5 Mon Sep 17 00:00:00 2001 From: zainabdnaya Date: Tue, 7 Jun 2022 20:48:56 +0100 Subject: [PATCH 01/18] freat: new Function (buzzinga) --- subjects/buzzinga/README.md | 43 +++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 subjects/buzzinga/README.md diff --git a/subjects/buzzinga/README.md b/subjects/buzzinga/README.md new file mode 100644 index 00000000..be996246 --- /dev/null +++ b/subjects/buzzinga/README.md @@ -0,0 +1,43 @@ +# buzzinga + +### instruction +- Write a function named `buzZinga()` that takes a number as an argument and prints the following: + - If the number is divisible by 3, print `Buz` followed by ('`\n`') + - If the number is divisible by 5, print `Zinga` followed by ('`\n`') + - If the number is divisible by 3 and 5, print `BuzZinga` followed by ('`\n`') + - If the number is not divisible by 3 or 5, print `*` followed by ('`\n`') +### Expected function +```go +func buzZinga(number int) { + +} +``` +### Usage +```go +package main + +func main() { + n := int32(15) + buzZinga(n) +} +``` +And its output : + +```go +$ go run . | cat -e +*$ +*$ +Buz$ +*$ +Zinga$ +Buz$ +*$ +*$ +Buz$ +Zinga$ +*$ +Buz$ +*$ +*$ +BuzZinga$ +``` \ No newline at end of file From fef4b725e33207f272c24cc6f38e991c9835f501 Mon Sep 17 00:00:00 2001 From: zainabdnaya Date: Tue, 7 Jun 2022 21:09:50 +0100 Subject: [PATCH 02/18] freat: new Function (buzzinga) --- subjects/buzzinga/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subjects/buzzinga/README.md b/subjects/buzzinga/README.md index be996246..c95bdc1e 100644 --- a/subjects/buzzinga/README.md +++ b/subjects/buzzinga/README.md @@ -1,6 +1,6 @@ # buzzinga -### instruction +### Instructions - Write a function named `buzZinga()` that takes a number as an argument and prints the following: - If the number is divisible by 3, print `Buz` followed by ('`\n`') - If the number is divisible by 5, print `Zinga` followed by ('`\n`') From 82b6dd14439d01309c9bbe9b22d691f0ff705546 Mon Sep 17 00:00:00 2001 From: zainabdnaya Date: Thu, 9 Jun 2022 17:53:02 +0100 Subject: [PATCH 03/18] feat: add vowels-index --- subjects/vowels-index/README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 subjects/vowels-index/README.md diff --git a/subjects/vowels-index/README.md b/subjects/vowels-index/README.md new file mode 100644 index 00000000..83a71a32 --- /dev/null +++ b/subjects/vowels-index/README.md @@ -0,0 +1,24 @@ +# VowlsIndex + +### Instructions + +- Write a function that takes one argument of type string and returns an array of intergers containing the index of the vowels in the string. +- vowels : [a,i ,e ,u o] + +### Expected function + +```go +func VowelIdx(str string) []int { +} +``` +### Usage + +```console +$ go run . "hello Iyan" +$2 +$5 +$7 +$8 +$9 +``` + \ No newline at end of file From 17fc8ccb9b7a5ec86ad1943ddc6e94c7006bc2f4 Mon Sep 17 00:00:00 2001 From: zainab Dnaya Date: Thu, 9 Jun 2022 17:56:30 +0100 Subject: [PATCH 04/18] Update README.md --- subjects/vowels-index/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subjects/vowels-index/README.md b/subjects/vowels-index/README.md index 83a71a32..0cddda7a 100644 --- a/subjects/vowels-index/README.md +++ b/subjects/vowels-index/README.md @@ -1,4 +1,4 @@ -# VowlsIndex +# vowels-index ### Instructions @@ -21,4 +21,4 @@ $7 $8 $9 ``` - \ No newline at end of file + From ef8a775e68640241208780a05fa85ddceba6d3ae Mon Sep 17 00:00:00 2001 From: Hamza elkhatri <40549481+Hamzaelkhatri@users.noreply.github.com> Date: Thu, 9 Jun 2022 17:57:34 +0100 Subject: [PATCH 05/18] Delete README.md --- subjects/buzzinga/README.md | 43 ------------------------------------- 1 file changed, 43 deletions(-) delete mode 100644 subjects/buzzinga/README.md diff --git a/subjects/buzzinga/README.md b/subjects/buzzinga/README.md deleted file mode 100644 index c95bdc1e..00000000 --- a/subjects/buzzinga/README.md +++ /dev/null @@ -1,43 +0,0 @@ -# buzzinga - -### Instructions -- Write a function named `buzZinga()` that takes a number as an argument and prints the following: - - If the number is divisible by 3, print `Buz` followed by ('`\n`') - - If the number is divisible by 5, print `Zinga` followed by ('`\n`') - - If the number is divisible by 3 and 5, print `BuzZinga` followed by ('`\n`') - - If the number is not divisible by 3 or 5, print `*` followed by ('`\n`') -### Expected function -```go -func buzZinga(number int) { - -} -``` -### Usage -```go -package main - -func main() { - n := int32(15) - buzZinga(n) -} -``` -And its output : - -```go -$ go run . | cat -e -*$ -*$ -Buz$ -*$ -Zinga$ -Buz$ -*$ -*$ -Buz$ -Zinga$ -*$ -Buz$ -*$ -*$ -BuzZinga$ -``` \ No newline at end of file From 4df40dfcf0f532cfb206c0b030aa2f9ad40538a5 Mon Sep 17 00:00:00 2001 From: zainabdnaya Date: Thu, 9 Jun 2022 18:26:44 +0100 Subject: [PATCH 06/18] feat: add vowels-index --- subjects/vowels-index/README.md | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/subjects/vowels-index/README.md b/subjects/vowels-index/README.md index 0cddda7a..0b3608b4 100644 --- a/subjects/vowels-index/README.md +++ b/subjects/vowels-index/README.md @@ -13,12 +13,27 @@ func VowelIdx(str string) []int { ``` ### Usage +```go +package main + +import "fmt" + +func main() { + + res := VowelIdx("hello Iyan") + for _, i := range res { + fmt.Println(i) + } + +} +``` +And its output : ```console -$ go run . "hello Iyan" -$2 -$5 -$7 -$8 -$9 + +$ go run . +$ 1 +$ 4 +$ 6 +$ 8 ``` From d209193a50d2d914c272430133d977fa94e50a5b Mon Sep 17 00:00:00 2001 From: zainabdnaya Date: Thu, 9 Jun 2022 18:28:56 +0100 Subject: [PATCH 07/18] feat: add vowels-index --- subjects/vowels-index/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/subjects/vowels-index/README.md b/subjects/vowels-index/README.md index 0b3608b4..9bb254ff 100644 --- a/subjects/vowels-index/README.md +++ b/subjects/vowels-index/README.md @@ -31,9 +31,9 @@ And its output : ```console $ go run . -$ 1 -$ 4 -$ 6 -$ 8 +1 $ +4 $ +6 $ +8 $ ``` From 10d16dad523bffb182abd1f470397af4716756cd Mon Sep 17 00:00:00 2001 From: zainabdnaya Date: Thu, 9 Jun 2022 18:29:16 +0100 Subject: [PATCH 08/18] feat: add vowels-index --- subjects/vowels-index/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/subjects/vowels-index/README.md b/subjects/vowels-index/README.md index 9bb254ff..dc5cd4d6 100644 --- a/subjects/vowels-index/README.md +++ b/subjects/vowels-index/README.md @@ -31,9 +31,9 @@ And its output : ```console $ go run . -1 $ -4 $ -6 $ -8 $ +1$ +4$ +6$ +8$ ``` From 7b677f1ab822615726d7f30342258a9ab023116c Mon Sep 17 00:00:00 2001 From: zainabdnaya Date: Thu, 9 Jun 2022 18:32:59 +0100 Subject: [PATCH 09/18] feat: add vowels-index --- subjects/vowels-index/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subjects/vowels-index/README.md b/subjects/vowels-index/README.md index dc5cd4d6..8ca023b7 100644 --- a/subjects/vowels-index/README.md +++ b/subjects/vowels-index/README.md @@ -30,7 +30,7 @@ func main() { And its output : ```console -$ go run . +$ go run . | cat -e 1$ 4$ 6$ From cd65a41d3330640b4ce617b990d77af3850d446b Mon Sep 17 00:00:00 2001 From: zainabdnaya Date: Thu, 9 Jun 2022 20:18:50 +0100 Subject: [PATCH 10/18] feat: add solution of vowelsindex.go --- subjects/vowels-index/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subjects/vowels-index/README.md b/subjects/vowels-index/README.md index 8ca023b7..510ec5c9 100644 --- a/subjects/vowels-index/README.md +++ b/subjects/vowels-index/README.md @@ -8,7 +8,7 @@ ### Expected function ```go -func VowelIdx(str string) []int { +func vowelsindex(str string) []int { } ``` ### Usage @@ -20,7 +20,7 @@ import "fmt" func main() { - res := VowelIdx("hello Iyan") + res := vowelsindex("hello Iyan") for _, i := range res { fmt.Println(i) } From 4717e474168fd8b945166cb3da59e3a30ecc7c8f Mon Sep 17 00:00:00 2001 From: zainabdnaya Date: Thu, 9 Jun 2022 20:19:08 +0100 Subject: [PATCH 11/18] feat: add soubject of vowelsindex.go --- subjects/vowels-index/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/subjects/vowels-index/README.md b/subjects/vowels-index/README.md index 510ec5c9..1fb26d79 100644 --- a/subjects/vowels-index/README.md +++ b/subjects/vowels-index/README.md @@ -26,6 +26,7 @@ func main() { } } + ``` And its output : ```console From a43fa3abd36355b6df3af8a0d987955817b1580f Mon Sep 17 00:00:00 2001 From: zainabdnaya Date: Thu, 9 Jun 2022 23:16:30 +0100 Subject: [PATCH 12/18] feat: add soubject of VowelsIndex.go --- subjects/vowels-index/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subjects/vowels-index/README.md b/subjects/vowels-index/README.md index 1fb26d79..7b04c093 100644 --- a/subjects/vowels-index/README.md +++ b/subjects/vowels-index/README.md @@ -8,7 +8,7 @@ ### Expected function ```go -func vowelsindex(str string) []int { +func VowelsIndex(str string) []int { } ``` ### Usage @@ -20,7 +20,7 @@ import "fmt" func main() { - res := vowelsindex("hello Iyan") + res := VowelsIndex("hello Iyan") for _, i := range res { fmt.Println(i) } From 15f6559845a87e46969a76842957d72f60f0f0b0 Mon Sep 17 00:00:00 2001 From: zainabdnaya Date: Wed, 15 Jun 2022 13:07:10 +0100 Subject: [PATCH 13/18] Correcting Vowels-Index subject --- subjects/vowels-index/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/subjects/vowels-index/README.md b/subjects/vowels-index/README.md index 7b04c093..1672070c 100644 --- a/subjects/vowels-index/README.md +++ b/subjects/vowels-index/README.md @@ -1,9 +1,9 @@ -# vowels-index +## vowels-index ### Instructions -- Write a function that takes one argument of type string and returns an array of intergers containing the index of the vowels in the string. -- vowels : [a,i ,e ,u o] +Write a function that takes one argument of type string and returns an array of integers containing the index of the vowels in the string. +- vowels: a, e, i, o, u] ### Expected function @@ -13,6 +13,7 @@ func VowelsIndex(str string) []int { ``` ### Usage +Here is a possible program to test your function ```go package main @@ -30,7 +31,6 @@ func main() { ``` And its output : ```console - $ go run . | cat -e 1$ 4$ From 46b7df8c9e519875ade5e35fce6c19806ecd547e Mon Sep 17 00:00:00 2001 From: zainabdnaya Date: Wed, 15 Jun 2022 13:14:04 +0100 Subject: [PATCH 14/18] Correcting Vowels-Index subject --- subjects/vowels-index/README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/subjects/vowels-index/README.md b/subjects/vowels-index/README.md index 1672070c..f5667924 100644 --- a/subjects/vowels-index/README.md +++ b/subjects/vowels-index/README.md @@ -31,10 +31,10 @@ func main() { ``` And its output : ```console -$ go run . | cat -e -1$ -4$ -6$ -8$ +$ go run . +1 +4 +6 +8 ``` From cd1dee9ab3a07d44c72df9f2e78f540ceb334b70 Mon Sep 17 00:00:00 2001 From: zainabdnaya Date: Wed, 15 Jun 2022 13:15:59 +0100 Subject: [PATCH 15/18] Correcting Vowels-Index subject --- subjects/vowels-index/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/subjects/vowels-index/README.md b/subjects/vowels-index/README.md index f5667924..01ab493a 100644 --- a/subjects/vowels-index/README.md +++ b/subjects/vowels-index/README.md @@ -14,6 +14,7 @@ func VowelsIndex(str string) []int { ### Usage Here is a possible program to test your function + ```go package main From c52e070e8fb0f64457151f29d47be31ac980b74b Mon Sep 17 00:00:00 2001 From: zainabdnaya Date: Tue, 21 Jun 2022 09:44:13 +0100 Subject: [PATCH 16/18] VowelsIndex --- subjects/vowels-index/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subjects/vowels-index/README.md b/subjects/vowels-index/README.md index 01ab493a..a9056bb4 100644 --- a/subjects/vowels-index/README.md +++ b/subjects/vowels-index/README.md @@ -3,7 +3,7 @@ ### Instructions Write a function that takes one argument of type string and returns an array of integers containing the index of the vowels in the string. -- vowels: a, e, i, o, u] +- vowels: [a, e, i, o, u] ### Expected function From 875846bbdf9052acf2b9fcd032f457a1354cb044 Mon Sep 17 00:00:00 2001 From: zainabdnaya Date: Thu, 14 Jul 2022 23:11:56 +0100 Subject: [PATCH 17/18] corrected --- subjects/vowels-index/README.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/subjects/vowels-index/README.md b/subjects/vowels-index/README.md index a9056bb4..a0b4f5c9 100644 --- a/subjects/vowels-index/README.md +++ b/subjects/vowels-index/README.md @@ -21,8 +21,9 @@ package main import "fmt" func main() { + + res := []string{"student", "hello Iyan","bcdfgh", "wOrld", "","AAEO$o;jw"} - res := VowelsIndex("hello Iyan") for _, i := range res { fmt.Println(i) } @@ -31,11 +32,13 @@ func main() { ``` And its output : + ```console $ go run . -1 -4 -6 -8 +[2 4] +[1 4 6 8] +[] +[1] +[] ``` From c0903b687f5e8f627500566ed1398399acb29910 Mon Sep 17 00:00:00 2001 From: zainabdnaya Date: Fri, 15 Jul 2022 15:21:53 +0100 Subject: [PATCH 18/18] corrected --- subjects/vowels-index/README.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/subjects/vowels-index/README.md b/subjects/vowels-index/README.md index a0b4f5c9..3598bfaa 100644 --- a/subjects/vowels-index/README.md +++ b/subjects/vowels-index/README.md @@ -21,15 +21,11 @@ package main import "fmt" func main() { - res := []string{"student", "hello Iyan","bcdfgh", "wOrld", "","AAEO$o;jw"} - for _, i := range res { - fmt.Println(i) + fmt.Println(VowelIdx(i)) } - } - ``` And its output : @@ -40,5 +36,6 @@ $ go run . [] [1] [] +[0 1 2 3 5] ```