fix: array exercises grammar mistakes
This commit is contained in:
@ -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.
|
||||
//
|
||||
|
@ -4,7 +4,9 @@ package main
|
||||
// EXERCISE: Fix
|
||||
//
|
||||
// 1. Uncomment the code
|
||||
//
|
||||
// 2. And fix the problems
|
||||
//
|
||||
// 3. BONUS: Simplify the code
|
||||
// ---------------------------------------------------------
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
@ -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"
|
||||
//
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user