38 lines
1.1 KiB
Go
Raw Normal View History

2018-12-05 15:02:03 +03:00
package main
// ---------------------------------------------------------
// EXERCISE: Assign the Arrays
//
// 1. Create an array named books
2018-12-05 19:48:28 +03:00
//
2018-12-05 15:02:03 +03:00
// 2. Add book titles to the array
2018-12-05 19:48:28 +03:00
//
2018-12-05 15:02:03 +03:00
// 3. Create two more copies of the array named: upper and lower
2018-12-05 19:48:28 +03:00
//
2018-12-05 15:02:03 +03:00
// 4. Change the book titles to uppercase in the upper array only
2018-12-05 19:48:28 +03:00
//
2018-12-05 15:02:03 +03:00
// 5. Change the book titles to lowercase in the lower array only
2018-12-05 19:48:28 +03:00
//
2018-12-05 15:02:03 +03:00
// 6. Print all the arrays
2018-12-05 19:48:28 +03:00
//
2018-12-05 15:02:03 +03:00
// 7. Observe that the arrays are not connected when they're copied.
//
// NOTE
// Check out the strings package, it has functions to convert letters to
// upper and lower cases.
//
// BONUS
// Invent your own arrays with different types other than string,
// and do some manipulations on them.
//
// EXPECTED OUTPUT
// Note: Don't worry about the book titles here, you can use any title.
//
// books: ["Kafka's Revenge" "Stay Golden" "Everythingship"]
// upper: ["KAFKA'S REVENGE" "STAY GOLDEN" "EVERYTHINGSHIP"]
// lower: ["kafka's revenge" "stay golden" "everythingship"]
// ---------------------------------------------------------
func main() {
}