aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--exercises/variables/variables5/main.go13
-rw-r--r--exercises/variables/variables6/main.go16
-rw-r--r--info.toml14
3 files changed, 43 insertions, 0 deletions
diff --git a/exercises/variables/variables5/main.go b/exercises/variables/variables5/main.go
new file mode 100644
index 0000000..1ab0e24
--- /dev/null
+++ b/exercises/variables/variables5/main.go
@@ -0,0 +1,13 @@
+// variables5
+// Make me compile!
+
+// I AM NOT DONE
+package main
+
+import "fmt"
+
+const Pi
+
+func main() {
+ fmt.Println(Pi)
+}
diff --git a/exercises/variables/variables6/main.go b/exercises/variables/variables6/main.go
new file mode 100644
index 0000000..428befc
--- /dev/null
+++ b/exercises/variables/variables6/main.go
@@ -0,0 +1,16 @@
+// variables6
+// Make me compile!
+
+// I AM NOT DONE
+package main
+
+import "fmt"
+
+const x = 10
+
+func main() {
+ fmt.Println(x)
+
+ x = x + 1
+ fmt.Println(x)
+}
diff --git a/info.toml b/info.toml
index 40c4c26..753e7af 100644
--- a/info.toml
+++ b/info.toml
@@ -27,6 +27,20 @@ hint = """
Variables can be redeclared in new blocks, but it is missing something. What is it?."""
[[exercises]]
+name = "variables5"
+path = "exercises/variables/variables5/main.go"
+mode = "compile"
+hint = """
+Constants need initialization."""
+
+[[exercises]]
+name = "variables6"
+path = "exercises/variables/variables6/main.go"
+mode = "compile"
+hint = """
+Constants can't be changed."""
+
+[[exercises]]
name = "functions1"
path = "exercises/functions/functions1/main.go"
mode = "compile"