add: constants exercises
This commit is contained in:
@@ -8,7 +8,8 @@
|
||||
package main
|
||||
|
||||
// ---------------------------------------------------------
|
||||
// EXERCISE
|
||||
// EXERCISE: Minutes in Weeks
|
||||
//
|
||||
// Calculate how many minutes in two weeks.
|
||||
//
|
||||
// STEPS:
|
@@ -10,7 +10,8 @@ package main
|
||||
import "fmt"
|
||||
|
||||
// ---------------------------------------------------------
|
||||
// EXERCISE
|
||||
// EXERCISE: Remove the Magic
|
||||
//
|
||||
// Get rid of the magic numbers in the following code.
|
||||
//
|
||||
// RESTRICTIONS
|
@@ -8,7 +8,8 @@
|
||||
package main
|
||||
|
||||
// ---------------------------------------------------------
|
||||
// EXERCISE
|
||||
// EXERCISE: Constant Length
|
||||
//
|
||||
// Calculate how many characters inside the `home`
|
||||
// constant and print it.
|
||||
//
|
@@ -8,7 +8,8 @@
|
||||
package main
|
||||
|
||||
// ---------------------------------------------------------
|
||||
// EXERCISE
|
||||
// EXERCISE: TAU
|
||||
//
|
||||
// Fix the following program and print the TAU number.
|
||||
//
|
||||
// HINT
|
@@ -8,7 +8,8 @@
|
||||
package main
|
||||
|
||||
// ---------------------------------------------------------
|
||||
// EXERCISE
|
||||
// EXERCISE: Area
|
||||
//
|
||||
// Fix the following program.
|
||||
//
|
||||
// RESTRICTION
|
@@ -8,7 +8,8 @@
|
||||
package main
|
||||
|
||||
// ---------------------------------------------------------
|
||||
// EXERCISE
|
||||
// EXERCISE: No Conversions Allowed
|
||||
//
|
||||
// 1. Fix the program without doing any conversion.
|
||||
// 2. Explain why it doesn't work.
|
||||
//
|
@@ -10,7 +10,8 @@ package main
|
||||
import "fmt"
|
||||
|
||||
// ---------------------------------------------------------
|
||||
// EXERCISE
|
||||
// EXERCISE: Iota Months
|
||||
//
|
||||
// 1. Initialize the constants using iota.
|
||||
// 2. You should find the correct formula for iota.
|
||||
//
|
@@ -10,7 +10,8 @@ package main
|
||||
import "fmt"
|
||||
|
||||
// ---------------------------------------------------------
|
||||
// EXERCISE
|
||||
// EXERCISE: Iota Months #2
|
||||
//
|
||||
// 1. Initialize multiple constants using iota.
|
||||
// 2. Please follow the instructions inside the code.
|
||||
//
|
@@ -10,8 +10,9 @@ package main
|
||||
import "fmt"
|
||||
|
||||
// ---------------------------------------------------------
|
||||
// EXERCISE
|
||||
// Use iota to initialize month constants.
|
||||
// EXERCISE: Iota Seasons
|
||||
//
|
||||
// Use iota to initialize the season constants.
|
||||
//
|
||||
// HINT
|
||||
// You can change the order of the constants.
|
20
10-constants/exercises/README.md
Normal file
20
10-constants/exercises/README.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# Constants
|
||||
|
||||
1. **[Minutes in Weeks](https://github.com/inancgumus/learngo/tree/master/10-constants/exercises/01-minutes-in-weeks)**
|
||||
|
||||
2. **[Remove the Magic](https://github.com/inancgumus/learngo/tree/master/10-constants/exercises/02-remove-the-magic)**
|
||||
|
||||
3. **[Constant Length](https://github.com/inancgumus/learngo/tree/master/10-constants/exercises/03-constant-length)**
|
||||
|
||||
4. **[TAU](https://github.com/inancgumus/learngo/tree/master/10-constants/exercises/04-tau)**
|
||||
|
||||
5. **[Area](https://github.com/inancgumus/learngo/tree/master/10-constants/exercises/05-area)**
|
||||
|
||||
6. **[No Conversions Allowed](https://github.com/inancgumus/learngo/tree/master/10-constants/exercises/06-no-conversions-allowed)**
|
||||
|
||||
7. **[Iota Months](https://github.com/inancgumus/learngo/tree/master/10-constants/exercises/07-iota-months)**
|
||||
|
||||
8. **[Iota Months #2](https://github.com/inancgumus/learngo/tree/master/10-constants/exercises/08-iota-months-2)**
|
||||
|
||||
9. **[Iota Seasons](https://github.com/inancgumus/learngo/tree/master/10-constants/exercises/09-iota-seasons)**
|
||||
|
Reference in New Issue
Block a user