2 ;; copyright info at bottom
3 (use-modules (skribilo source c))
8 :title (source :language c [square()\;])
10 (p [here's the output of ,(prog (source :language c [square()\;]))])
13 (image :file "square.png" :height 500))
14 (p [openscad draws a square for the code
15 ,(source :language c [square()\;]).])
16 (p [there are a couple other things worth noting here.
17 square is followed by an open and close parenthesis
18 ,(source :language c [()]), and then by a semicolon
19 ,(source :language c [\;])]))
23 (p [here's the output of ,(source :language c [square(1)\;])])
26 (image :file "square1.png" :height 500))
27 (p [note that it's identical to the
28 ,(source :language c [square()\;]) output. this is because
29 by default, openscad guesses a value of 1 whenever a value
30 is left unspecified.]))
34 (p [here's the output of ,(source :language c [square(2)\;])])
37 (image :file "square2.png" :height 500))
38 (p [note that it is twice the size of the prior 2 examples.]))
42 (p [here's the output of ,(source :language c [square(3)\;])])
43 (p [how big do you expect this square to be?])
46 (image :file "square3.png" :height 500)))
48 :title [quiz on square 1 2 3]
51 :title [questions for simplest square]
52 (p [what's the code for the simplest square?])
53 (p [where is the bottom right corner of the simplest square?]))))
55 ;; Copyright 2016 daniel watson
57 ;; This file is part of challenge-bot.
59 ;; challenge-bot is free software: you can redistribute it and/or modify
60 ;; it under the terms of the GNU Affero General Public License as
61 ;; published by the Free Software Foundation, either version 3 of the
62 ;; License, or (at your option) any later version.
64 ;; challenge-bot is distributed in the hope that it will be useful,
65 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
66 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
67 ;; GNU Affero General Public License for more details.
69 ;; You should have received a copy of the GNU Affero General Public
70 ;; License along with challenge-bot. If not, see
71 ;; <http://www.gnu.org/licenses/>.