add: go type system exercises

This commit is contained in:
Inanc Gumus
2018-10-27 17:15:30 +03:00
parent 9646e16137
commit 14de3fbf11
13 changed files with 25 additions and 6 deletions

View File

@ -8,7 +8,8 @@
package main
// ---------------------------------------------------------
// EXERCISE
// EXERCISE: Optimal Types
//
// 1. Choose the optimal data types for the given situations.
// 2. Print them all
// 3. Try converting them to lesser data types.

View File

@ -12,7 +12,8 @@ import (
)
// ---------------------------------------------------------
// EXERCISE
// EXERCISE: The Type Problem
//
// Solve the data type problem in the program.
//
// EXPECTED OUTPUT

View File

@ -14,7 +14,8 @@ import (
)
// ---------------------------------------------------------
// EXERCISE
// EXERCISE: Parse Arg Numbers
//
// Use strconv.ParseInt function to get int8, int16, and
// int32, and int64 values from command-line.
//

View File

@ -13,7 +13,8 @@ import (
)
// ---------------------------------------------------------
// EXERCISE
// EXERCISE: Time Multiplier
//
// You should get an argument from the command-line and
// you need to multiply the time duration value `t` with
// the given argument.

View File

@ -8,7 +8,8 @@
package main
// ---------------------------------------------------------
// EXERCISE
// EXERCISE: Refactor Feet to Meter
//
// Remember the feet to meters program?
// Now, it's time to refactor it.
// Define your own Feet and Meters types.

View File

@ -10,7 +10,8 @@ package main
import "fmt"
// ---------------------------------------------------------
// EXERCISE
// EXERCISE: Convert the Types
//
// Convert the variables to appropriate types.
//
// EXPECTED OUTPUT

View File

@ -0,0 +1,13 @@
# Types
1. **[Find the Optimal Types](https://github.com/inancgumus/learngo/tree/master/09-go-type-system/exercises/01-optimal-types)**
2. **[Fix the Type Problem](https://github.com/inancgumus/learngo/tree/master/09-go-type-system/exercises/02-the-type-problem)**
3. **[Parse Arg Numbers](https://github.com/inancgumus/learngo/tree/master/09-go-type-system/exercises/03-parse-arg-numbers)**
4. **[Time Multiplier](https://github.com/inancgumus/learngo/tree/master/09-go-type-system/exercises/04-time-multiplier)**
5. **[Refactor Feet to Meter](https://github.com/inancgumus/learngo/tree/master/09-go-type-system/exercises/05-refactor-feet-to-meter)**
6. **[Convert the Types](https://github.com/inancgumus/learngo/tree/master/09-go-type-system/exercises/06-convert-the-types)**