add: exercises and quiz for appending and slicing

This commit is contained in:
Inanc Gumus
2019-01-30 16:47:30 +03:00
parent 1068a0b9cd
commit 8ec394bc10
23 changed files with 928 additions and 63 deletions

View File

@ -0,0 +1,38 @@
package main
// ---------------------------------------------------------
// EXERCISE: Append and Sort Numbers
//
// We'll have a []string that should contain numbers.
//
// Your task is to convert the []string to an int slice.
//
// 1. Get the numbers from the command-line
//
// 2. Append them to an []int
//
// 3. Sort the numbers
//
// 4. Print them
//
// 5. Handle the error cases
//
//
// EXPECTED OUTPUT
//
// go run main.go
// provide a few numbers
//
// go run main.go 4 6 1 3 0 9 2
// [0 1 2 3 4 6 9]
//
// go run main.go a b c
// []
//
// go run main.go 4 a 1 c d 9
// [1 4 9]
//
// ---------------------------------------------------------
func main() {
}