- Develop facility in block-based programming by creating custom blocks and drawing on the stage.
- Explore the concept of recursion by encoding the Fibonacci sequence.
- Understand how block-based programming fosters learning by visualizing units of computation.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xquery version "3.1"; | |
let $date := "July 15, 2022" | |
let $tokens := fn:tokenize($date, " ") | |
let $month := | |
switch ($tokens[1]) | |
case "January" return "01" | |
case "February" return "02" | |
case "March" return "03" | |
case "April" return "04" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(: Thanks to friends at NashFP, especially Mike K. and Mark Wutka :) | |
declare function local:fibC($n as xs:integer, $memo as map(*), $con) { | |
if (map:contains($memo, $n)) then $con(map:get($memo, $n), $memo) | |
else | |
local:fibC($n - 1, $memo, | |
(: n1 = fib(n - 1) :) | |
function($n1 as xs:integer, $memo as map(*)) { | |
local:fibC($n - 2, $memo, | |
(: n2 = fib(n - 2) :) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xquery version "3.1"; | |
declare function local:fac($n as xs:int) as xs:int { | |
if ($n = 0) then 1 | |
else if ($n = 1) then 1 | |
else $n * local:fac($n - 1) | |
}; | |
declare function local:hFac($n as xs:int) as xs:int { | |
fn:fold-right(1 to $n, 1, function($a, $b) { $a * $b }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Letter | English | French | German | Spanish | Portuguese | Esperanto | Italian | Turkish | Swedish | Polish | Dutch | Danish | Icelandic | Finnish | Czech | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
a | 8.167 | 7.636 | 6.516 | 11.525 | 14.634 | 12.117 | 11.745 | 12.920 | 9.383 | 10.503 | 7.486 | 6.025 | 10.110 | 12.217 | 8.421 | |
b | 1.492 | 0.901 | 1.886 | 2.215 | 1.043 | 0.980 | 0.927 | 2.844 | 1.535 | 1.740 | 1.584 | 2.000 | 1.043 | 0.281 | 0.822 | |
c | 2.782 | 3.260 | 2.732 | 4.019 | 3.882 | 0.776 | 4.501 | 1.463 | 1.486 | 3.895 | 1.242 | 0.565 | 0 | 0.281 | 0.740 | |
d | 4.253 | 3.669 | 5.076 | 5.010 | 4.992 | 3.044 | 3.736 | 5.206 | 4.702 | 3.725 | 5.933 | 5.858 | 1.575 | 1.043 | 3.475 | |
e | 12.702 | 14.715 | 16.396 | 12.181 | 12.570 | 8.995 | 11.792 | 9.912 | 10.149 | 7.352 | 17.324 | 15.453 | 6.418 | 7.968 | 7.562 | |
f | 2.288 | 1.066 | 1.656 | 0.692 | 1.023 | 1.037 | 1.153 | 0.461 | 2.027 | 0.143 | 0.805 | 2.406 | 3.013 | 0.194 | 0.084 | |
g | 2.015 | 0.866 | 3.009 | 1.768 | 1.303 | 1.171 | 1.644 | 1.253 | 2.862 | 1.731 | 3.403 | 4.077 | 4.241 | 0.392 | 0.092 | |
h | 6.094 | 0.737 | 4.577 | 0.703 | 0.781 | 0.384 | 0.636 | 1.212 | 2.090 | 1.015 | 2.380 | 1.621 | 1.871 | 1.851 | 1.356 | |
i | 6.966 | 7.529 | 6.550 | 6.247 | 6.186 | 10.012 | 10.143 | 9.600* | 5.817 | 8.328 | 6.499 | 6.000 | 7.578 | 10.817 | 6.073 |
NewerOlder