refactor: 6th section first two lectures exercises and questions
This commit is contained in:
24
06-variables/02-declarations/exercises/02-bool/main.go
Normal file
24
06-variables/02-declarations/exercises/02-bool/main.go
Normal file
@ -0,0 +1,24 @@
|
||||
// For more tutorials: https://blog.learngoprogramming.com
|
||||
//
|
||||
// Copyright © 2018 Inanc Gumus
|
||||
// Learn Go Programming Course
|
||||
// License: https://creativecommons.org/licenses/by-nc-sa/4.0/
|
||||
//
|
||||
|
||||
package main
|
||||
|
||||
// ---------------------------------------------------------
|
||||
// EXERCISE: Declare bool
|
||||
//
|
||||
// 1. Declare and print a bool variable
|
||||
//
|
||||
// 2. The variable's name should be: isOn
|
||||
//
|
||||
// EXPECTED OUTPUT
|
||||
// false
|
||||
// ---------------------------------------------------------
|
||||
|
||||
func main() {
|
||||
// var ? ?
|
||||
// ?
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
// For more tutorials: https://blog.learngoprogramming.com
|
||||
//
|
||||
// Copyright © 2018 Inanc Gumus
|
||||
// Learn Go Programming Course
|
||||
// License: https://creativecommons.org/licenses/by-nc-sa/4.0/
|
||||
//
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
func main() {
|
||||
var isOn bool
|
||||
fmt.Println(isOn)
|
||||
}
|
Reference in New Issue
Block a user