X-Git-Url: http://challenge-bot.com/repos/?a=blobdiff_plain;f=curriculum%2Fsquare.scm;h=7d08b9a1ea4bfe8188b3c649c31c39e6244cbbf2;hb=aa71ea448888570d0215ac15774f0405e53fd167;hp=4e9722c92569a9e840537eef821059e18e548c50;hpb=6460ba5239ab72625916c224b8cc36e91601cbe0;p=challenge-bot diff --git a/curriculum/square.scm b/curriculum/square.scm index 4e9722c..7d08b9a 100644 --- a/curriculum/square.scm +++ b/curriculum/square.scm @@ -1,2 +1,71 @@ -(document :title [square] - (chapter :title [square()\;])) +;; 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 +;; .