curriculum -> guide, prepend 0- to arduino-to-deck
[challenge-bot] / guide / square.scm
diff --git a/guide/square.scm b/guide/square.scm
new file mode 100644 (file)
index 0000000..7d08b9a
--- /dev/null
@@ -0,0 +1,71 @@
+;; tldr; AGPLv3+
+;; copyright info at bottom
+(use-modules (skribilo source c))
+
+(document
+ :title [square]
+ (chapter
+  :title (source :language c [square()\;])
+  :number #f
+  (p [here's the output of ,(prog (source :language c [square()\;]))])
+  (figure
+   :legend "square();"
+   (image :file "square.png" :height 500))
+  (p [openscad draws  a square for the code
+               ,(source :language c [square()\;]).])
+  (p [there are a couple other things worth noting here.
+            square is followed by an open and close parenthesis
+            ,(source :language c [()]), and then by a semicolon
+            ,(source :language c [\;])]))
+ (chapter
+  :title [square(1)\;]
+  :number #f
+  (p [here's the output of ,(source :language c [square(1)\;])])
+  (figure
+   :legend "square(1);"
+   (image :file "square1.png" :height 500))
+  (p [note that it's identical to the
+           ,(source :language c [square()\;]) output.  this is because
+           by default, openscad guesses a value of 1 whenever a value
+           is left unspecified.]))
+ (chapter
+  :title [square(2)\;]
+  :number #f
+  (p [here's the output of ,(source :language c [square(2)\;])])
+  (figure
+   :legend "square(2);"
+   (image :file "square2.png" :height 500))
+  (p [note that it is twice the size of the prior 2 examples.]))
+ (chapter
+  :title [square(3)\;]
+  :number #f
+  (p [here's the output of ,(source :language c [square(3)\;])])
+  (p [how big do you expect this square to be?])
+  (figure
+   :legend "square(3);"
+   (image :file "square3.png" :height 500)))
+ (chapter
+  :title [quiz on square 1 2 3]
+  :number #f
+  (section
+   :title [questions for simplest square]
+   (p [what's the code for the simplest square?])
+   (p [where is the bottom right corner of the simplest square?]))))
+
+;; Copyright 2016 daniel watson
+
+;; This file is part of challenge-bot.
+
+;; challenge-bot is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU Affero General Public License as
+;; published by the Free Software Foundation, either version 3 of the
+;; License, or (at your option) any later version.
+
+;; challenge-bot is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU Affero General Public License for more details.
+
+;; You should have received a copy of the GNU Affero General Public
+;; License along with challenge-bot.  If not, see
+;; <http://www.gnu.org/licenses/>.