diff options
-rw-r--r-- | exercises/primitive_types/primitive_types2/main.go | 11 | ||||
-rw-r--r-- | exercises/primitive_types/primitive_types3/main.go | 11 | ||||
-rw-r--r-- | exercises/primitive_types/primitive_types4/main.go | 15 | ||||
-rw-r--r-- | info.toml | 29 |
4 files changed, 59 insertions, 7 deletions
diff --git a/exercises/primitive_types/primitive_types2/main.go b/exercises/primitive_types/primitive_types2/main.go new file mode 100644 index 0000000..3350a4b --- /dev/null +++ b/exercises/primitive_types/primitive_types2/main.go @@ -0,0 +1,11 @@ +// primitive_types2 +// Make me compile! + +// I AM NOT DONE +package main + +import "fmt" + +func main() { + fmt.Printf("Hello, %s\n", who) // '%s' is used to format strings +} diff --git a/exercises/primitive_types/primitive_types3/main.go b/exercises/primitive_types/primitive_types3/main.go new file mode 100644 index 0000000..e73b5e4 --- /dev/null +++ b/exercises/primitive_types/primitive_types3/main.go @@ -0,0 +1,11 @@ +// primitive_types3 +// Make me compile! + +// I AM NOT DONE +package main + +import "fmt" + +func main() { + fmt.Printf("Hello, %s\n", who) +} diff --git a/exercises/primitive_types/primitive_types4/main.go b/exercises/primitive_types/primitive_types4/main.go new file mode 100644 index 0000000..a4180ca --- /dev/null +++ b/exercises/primitive_types/primitive_types4/main.go @@ -0,0 +1,15 @@ +// primitive_types3 +// Make me compile! + +// I AM NOT DONE +package main + +import "fmt" + +func main() { + var b1 byte = 110 + fmt.Println("byte value for b1:", b1) + + var b2 byte = '' + fmt.Println("representation for b2:", b2) +} @@ -73,15 +73,13 @@ Functions that return values must have return types declared in the function sig name = "if1" path = "exercises/if/if1/main_test.go" mode = "test" -hint = """ -""" +hint = "No hints this time" [[exercises]] name = "if2" path = "exercises/if/if2/main_test.go" mode = "test" -hint = """ -""" +hint = "No hints this time" [[exercises]] name = "switch1" @@ -101,12 +99,29 @@ Switch without a condition is possible, but that case statement needs a boolean name = "switch3" path = "exercises/switch/switch3/main_test.go" mode = "test" -hint = """ -""" +hint = "No hints this time" [[exercises]] name = "primitive_types1" path = "exercises/primitive_types/primitive_types1/main.go" mode = "compile" +hint = "No hints this time" + +[[exercises]] +name = "primitive_types2" +path = "exercises/primitive_types/primitive_types2/main.go" +mode = "compile" +hint = "No hints this time" + +[[exercises]] +name = "primitive_types3" +path = "exercises/primitive_types/primitive_types3/main.go" +mode = "compile" +hint = "'%s' is used to format strings" + +[[exercises]] +name = "primitive_types4" +path = "exercises/primitive_types/primitive_types4/main.go" +mode = "compile" hint = """ -""" +byte can hold from 0 to 255. Could it store a character?""" |