From f6f9520b5e7e9dbc03469e2b77776fc28ebd83a7 Mon Sep 17 00:00:00 2001 From: Inanc Gumus Date: Wed, 5 Dec 2018 19:48:28 +0300 Subject: [PATCH] fix: array exercises grammar mistakes --- 14-arrays/exercises/01-declare-empty/main.go | 17 +++++++++++------ 14-arrays/exercises/05-fix/main.go | 2 ++ 14-arrays/exercises/06-compare/main.go | 1 + 14-arrays/exercises/07-assign/main.go | 6 ++++++ .../exercises/10-hipsters-love-search/main.go | 8 ++++---- 14-arrays/exercises/12-sorter/main.go | 3 ++- 14-arrays/exercises/13-word-finder/main.go | 5 +++-- 7 files changed, 29 insertions(+), 13 deletions(-) diff --git a/14-arrays/exercises/01-declare-empty/main.go b/14-arrays/exercises/01-declare-empty/main.go index 0a2da5f..62f3e41 100644 --- a/14-arrays/exercises/01-declare-empty/main.go +++ b/14-arrays/exercises/01-declare-empty/main.go @@ -12,12 +12,17 @@ package main // // 1. Declare and print the following arrays with their types: // -// 1. The names of your best three friends -// 2. The distances to five different locations -// 3. A data buffer with five bytes of capacity -// 4. Currency exchange ratios only for a single currency -// 5. Up/Down status of four different web servers -// 6. A byte array that doesn't occupy memory space +// 1. The names of your best three friends (names array) +// +// 2. The distances to five different locations (distances array) +// +// 3. A data buffer with five bytes of capacity (data array) +// +// 4. Currency exchange ratios only for a single currency (ratios array) +// +// 5. Up/Down status of four different web servers (alives array) +// +// 6. A byte array that doesn't occupy memory space (zero array) // // 2. Print only the types of the same arrays. // diff --git a/14-arrays/exercises/05-fix/main.go b/14-arrays/exercises/05-fix/main.go index 913a1db..93dc346 100644 --- a/14-arrays/exercises/05-fix/main.go +++ b/14-arrays/exercises/05-fix/main.go @@ -4,7 +4,9 @@ package main // EXERCISE: Fix // // 1. Uncomment the code +// // 2. And fix the problems +// // 3. BONUS: Simplify the code // --------------------------------------------------------- diff --git a/14-arrays/exercises/06-compare/main.go b/14-arrays/exercises/06-compare/main.go index 15b2b2d..31e105b 100644 --- a/14-arrays/exercises/06-compare/main.go +++ b/14-arrays/exercises/06-compare/main.go @@ -6,6 +6,7 @@ import "fmt" // EXERCISE: Compare the Arrays // // 1. Uncomment the code +// // 2. Fix the problems so that arrays become comparable // // EXPECTED OUTPUT diff --git a/14-arrays/exercises/07-assign/main.go b/14-arrays/exercises/07-assign/main.go index cc84f9d..51ffdcd 100644 --- a/14-arrays/exercises/07-assign/main.go +++ b/14-arrays/exercises/07-assign/main.go @@ -4,11 +4,17 @@ package main // EXERCISE: Assign the Arrays // // 1. Create an array named books +// // 2. Add book titles to the array +// // 3. Create two more copies of the array named: upper and lower +// // 4. Change the book titles to uppercase in the upper array only +// // 5. Change the book titles to lowercase in the lower array only +// // 6. Print all the arrays +// // 7. Observe that the arrays are not connected when they're copied. // // NOTE diff --git a/14-arrays/exercises/10-hipsters-love-search/main.go b/14-arrays/exercises/10-hipsters-love-search/main.go index da8496a..066b5e3 100644 --- a/14-arrays/exercises/10-hipsters-love-search/main.go +++ b/14-arrays/exercises/10-hipsters-love-search/main.go @@ -8,11 +8,11 @@ package main // --------------------------------------------------------- -// EXERCISE: Hipster's Love Search Engine +// EXERCISE: Hipster's Love Bookstore Search Engine // -// Your goal is to let people search for books of Hipster's Love Bookstore. +// Your goal is to allow people to search for books. // -// 1. Create an array with these book titles: +// 1. Create an array with the following book titles: // Kafka's Revenge // Stay Golden // Everythingship @@ -22,7 +22,7 @@ package main // // 3. Search for the books in the books array // -// 4. When the programs find the book, print it. +// 4. When the program finds the book, print it. // 5. Otherwise, print that the book doesn't exist. // // 6. Handle the errors. diff --git a/14-arrays/exercises/12-sorter/main.go b/14-arrays/exercises/12-sorter/main.go index 59acf01..1766241 100644 --- a/14-arrays/exercises/12-sorter/main.go +++ b/14-arrays/exercises/12-sorter/main.go @@ -19,7 +19,8 @@ package main // + You can use the bubble-sort algorithm to sort the numbers. // Please watch this: https://youtu.be/nmhjrI-aW5o?t=7 // -// + When swapping for elements, do not check for the last element. +// + When swapping the elements, do not check for the last element. +// // Or, you will receive this error: // "panic: runtime error: index out of range" // diff --git a/14-arrays/exercises/13-word-finder/main.go b/14-arrays/exercises/13-word-finder/main.go index 2c1b6d5..9fbe0cd 100644 --- a/14-arrays/exercises/13-word-finder/main.go +++ b/14-arrays/exercises/13-word-finder/main.go @@ -21,8 +21,9 @@ package main // + The search and the filtering should be case insensitive // // HINT -// + strings.Fields function converts a given string a slice. -// You can find its example in the worder finder program that I've mentioned +// + strings.Fields function converts a given string to a slice. +// +// You can find its example in the word finder program that I've mentioned // above. // // EXPECTED OUTPUT