diff --git a/AutograderTools.xml b/AutograderTools.xml index dd6d61b..9bddc29 100644 --- a/AutograderTools.xml +++ b/AutograderTools.xml @@ -1,4 +1,4 @@
Acronym Actor's Birthday Anagram Atbash Cipher Compute the Average of a List Between Bigram Autocomplete Caesar Shift Cracking the Caesar Shift with Brute Force Cracking the Caesar Shift with a Partial Solution Cyclic Iterator Factorial FizzBuzz Greet Intro to Infinite Sequences Isogram Leap Year Counting Letter Frequency Counting Letter Frequency as Dictionary Luhn Formula Mapping Over Infinite Sequences Minesweeper Moving Average Pangram Sieve of Eratosthenes Transposing Music Vigenere Cipher
Acronym Actor's Birthday Atbash Cipher Compute the Average of a List Between Bigram Autocomplete Caesar Shift (functional) Caesar Shift Cracking the Caesar Shift with Brute Force Cracking the Caesar Shift with a Partial Solution Cyclic Iterator Factorial Greet Intro to Infinite Sequences Counting Letter Frequency Counting Letter Frequency as Dictionary Luhn Formula (functional) Luhn Formula Mapping Over Infinite Sequences Minesweeper Moving Average Pangram Sieve of Eratosthenes Transposing Music Vigenere Cipher
\ No newline at end of file diff --git a/README.md b/README.md index bb6c178..9d13a6c 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ Feel free to browse the [exercises](./exercises) and open the starter template ( - [Sieve of Eratosthenes](https://editor.netsblox.org#open:https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sieve/template.xml). Available as a [Parsons problem](https://editor.netsblox.org#open:https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sieve/parsons.xml), too! - [Sliding Windows](https://editor.netsblox.org#open:https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sliding-windows/template.xml). - [From Infinite Sequences to Finite Lists](https://editor.netsblox.org#open:https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/take-collect-sequences/template.xml). Available as a [Parsons problem](https://editor.netsblox.org#open:https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/take-collect-sequences/parsons.xml), too! -- [Transposing Music](https://editor.netsblox.org#open:https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/transpose-music/template.xml). Available as a [Parsons problem](https://editor.netsblox.org#open:https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/transpose-music/parsons.xml), too! +- [Transposing Music](https://editor.netsblox.org#open:https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/transpose-music/template.xml). - [Vigenere Cipher](https://editor.netsblox.org#open:https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/vigenere/template.xml). Available as a [Parsons problem](https://editor.netsblox.org#open:https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/vigenere/parsons.xml), too! diff --git a/docs/autograders/acronym.js b/docs/autograders/acronym.js index 482ecf0..bc837e5 100644 --- a/docs/autograders/acronym.js +++ b/docs/autograders/acronym.js @@ -2,7 +2,7 @@ ScrollFrameMorph, nop, HandleMorph, List, Extension, ToggleMorph, BlockMorph, Color, SpriteMorph, localize, TextMorph, MorphicPreferences, WHITE*/ (function() { - const config = {"name":"NetsBlox Exercises","assignments":[{"name":"Acronym","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/acronym/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["I Don't Know"],"output":"IDK"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["President Of The United States"],"output":"POTUS"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Shaking My Head"],"output":"SMH"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Agnetha, Bjorn, Benny, Anni-Frid"],"output":"ABBA"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Zone Improvement Plan"],"output":"ZIP"}]},{"name":"Actor's Birthday","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/actor-birthday/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Keanu Reeves"],"output":"1964-09-02"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Meryl Streep"],"output":"1949-06-22"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Denzel Washington"],"output":"1954-12-28"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Lin-Manuel Miranda"],"output":"1980-01-16"}]},{"name":"Anagram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/anagram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["shepherd","spider"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","ccat"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["olive","ilove"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","CAT"],"output":true}]},{"name":"Atbash Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/atbash/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["abc"],"output":"zyx"},{"name":"should preserve letter case","type":"CustomBlockTest","spec":"encrypt %'message'","function":"iterator fnXYZCBA"},{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["$?! +@"],"output":"$?! +@","name":"should preserve non-letters such as punctuation"}]},{"name":"Between","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/between/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[1,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[3,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,3,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[-6,-5,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[20,-5,5],"output":false}]},{"name":"Bigram Autocomplete","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/bigram-autocomplete/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list","function":"fncatcab"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list with 26 rows","function":"fncatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should contain rows that sum to 100","function":"fn100.5rowcatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return correct probabilities","function":"fn5013catcabchechi"}]},{"name":"Caesar Shift","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/caesar-shift/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["abc",2],"output":"cde"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",100],"output":"()*"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",-50],"output":"\u0012\u0013\u0014"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["with spaces",10],"output":"\u0001s~r*}zkmo}"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["no shift!",0],"output":"no shift!"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["negative wrapping!",-200],"output":"&\u001d\u001f\u0019,!.\u001dX/*\u0019((!&\u001fY"}]},{"name":"Compute the Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average/parsons.xml","tests":[]},{"name":"Compute the Average of a List","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average-list/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","1"]],"output":"1"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","2"]],"output":"1.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["-1","2","4","-3"]],"output":"0.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32"]],"output":-7.4},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32","54"]],"output":2.8333333333333335}]},{"name":"Counting Letter Frequency","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","function":"countabcc11200000000000000000000000"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","function":"counta b ! c26"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","function":"countaAbBcCzZ22200000000000000000000002"}]},{"name":"Counting Letter Frequency as Dictionary","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency-dictionary/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","inputs":["abcc"],"output":[["a",1],["b",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","inputs":["a4cc"],"output":[["a",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","inputs":["xyzZ"],"output":[["x",1],["y",1],["z",2]]}]},{"name":"Cracking the Caesar Shift with Brute Force","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-brute-force/parsons.xml","tests":[{"type":"CustomBlockTest","name":"it should find key when starts with a search word","spec":"find key where %'msg' contains %'words'","function":"code breakerhello world2messagemsg
hello2
"},{"name":"it should find key when using multiple search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces15messagemsg
hellowith15
"},{"name":"it should find key when ends with one of many search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces33messagemsg
hellospaces33
"},{"name":"it should return -1 if cannot decode message","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerno hidden words3messagemsg
hellospaces-1
"}]},{"name":"Cracking the Caesar Shift with a Partial Solution","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-partial-soln/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","c"],"output":2},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["A","a"],"output":32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","A"],"output":-32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["5","0"],"output":-5},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":[".","?"],"output":17}]},{"name":"Cyclic Iterator","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/cyclic-iterator/parsons.xml","tests":[{"name":"block should return a function","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1"},{"name":"sequence should start with the first value in the list","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1messagemsg
1
2424
"},{"name":"sequence should remember position","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn797"},{"name":"sequence should restart after reaching the end","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn777"}]},{"name":"Factorial","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/factorial/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[5],"output":120},{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[0],"output":1},{"type":"CustomBlockTest","name":"should compute the factorial of an unknown input","spec":"factorial %'num'","inputs":[7],"output":5040}]},{"name":"FizzBuzz","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/fizz-buzz/template.xml","tests":[{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[1],"output":1},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-39],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[3],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-50],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[5],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-150],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[15],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[0],"output":"fizzbuzz"}]},{"name":"From Infinite Sequences to Finite Lists","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/take-collect-sequences/parsons.xml","tests":[]},{"name":"Greet","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/greet/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"greet %'person'","name":"greet %'person' should start with \"Hello,\"","function":"blockBrian15Hello"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Bob"],"output":"Hello, Bob!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Alice"],"output":"Hello, Alice!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Cliff"],"output":"Hello, Cliff!"}]},{"name":"Intro to Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/intro-infinite-sequences/parsons.xml","tests":[{"name":"sequence should start with 1","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fnmessagemsg
1
"},{"name":"sequence should remember current position","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"},{"name":"sequence should produce counting numbers","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fntrue"},{"name":"two sequences should iterate independently","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"}]},{"name":"Isogram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/isogram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["letter"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["a"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["arraigning"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect first-order isogram","function":"blocksunflower"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect second-order isogram","function":"blockhorseshoer"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect third-order isogram","function":"blockgeggee"}]},{"name":"Leap Year","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/leap-year/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2015],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1970],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1996],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1960],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2100],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1900],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2000],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2400],"output":true}]},{"name":"Luhn Formula","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/luhn-formula/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"single digits cannot be valid","inputs":["8"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid credit card","inputs":["8273 1232 7352 0569"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"text with non digit is invalid","inputs":["059a"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid long number with even remainder","inputs":["1 2345 6789 1234 5678 9012"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with even digits","inputs":["095 245 88"],"output":true},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with odd number of spaces","inputs":["234 567 891 234"],"output":true}]},{"name":"Mapping Over Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/map-sequence/parsons.xml","tests":[{"name":"map should return another sequence","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map2messagemsg
"},{"name":"new sequence should contain transformed values","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map
by threes3i110true
"}]},{"name":"Minesweeper","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/minesweeper/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","*",""],["*","",""],["","*","*"]]],"output":[[2,"*",1],["*",4,3],[2,"*","*"]],"name":"board w/ mine counts on square board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*"],["*",""],["","*"]]],"output":[["*","*"],["*",4],[2,"*"]],"name":"board w/ mine counts on rectangle board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*","*"],["*","","*"],["","*",""]]],"output":[["*","*","*"],["*",6,"*"],[2,"*",2]],"name":"board w/ mine counts on dense board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","","",""],["","","","*"],["","","",""]]],"output":[[0,0,1,1],[0,0,1,"*"],[0,0,1,1]],"name":"board w/ mine counts on sparse board"}]},{"name":"Moving Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/moving-average/parsons.xml","tests":[{"name":"moving average block should return a list","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn1112"},{"name":"moving average should be computed correctly","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn-104176311.666666666666666744.666666666666667"}]},{"name":"Pangram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/pangram/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","inputs":[""],"output":false},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"lowercase pangram","inputs":["abcdefghijklmnopqrstuvwxyz"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"mixed case pangram","inputs":["abcdefghijkLMNOPQRSTUVWXYZ"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"pangram with extra symbols","inputs":["the quick brown fox jumps over a lazy dog!"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"missing a letter","inputs":["abcdefghijkLMNOPQRSTUVWYZ"],"output":false}]},{"name":"Sieve of Eratosthenes","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sieve/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should not consider 1 prime","inputs":[1],"output":[]},{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should find the all primes up to 5","inputs":[5],"output":[2,3,5]},{"type":"CustomBlockTest","name":"should find the all primes up to 30","spec":"factorial %'num'","inputs":[30],"output":[2,3,5,7,11,13,17,19,23,29]}]},{"name":"Sliding Windows","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sliding-windows/template.xml","tests":[]},{"name":"Transposing Music","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/transpose-music/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["78","1"],"output":"79","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["84","-2"],"output":"82","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["36","5"],"output":"41","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["C2","5"],"output":"41","name":"should accept note names (e.g., \"C4\")"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["50","0"],"output":"50","name":"should return original note when transposing by 0"}]},{"name":"Vigenere Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/vigenere/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["how are you?",["1","2","3","4"]],"output":"iqz$bth$zqxC"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["cba",["1","2","3"]],"output":"ddd"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["wow, negative keys?",["-2","-5","-3"]],"output":"ujt*\u001bkcb^rdsc\u001bhctp="},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["what large keys!",["100","200","300"]],"output":"[0\rXh\u0018E:\u0013Ih\u0017IA\u001f\u0005"}]}]}; + const config = {"name":"NetsBlox Exercises","assignments":[{"name":"Acronym","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/acronym/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["I Don't Know"],"output":"IDK"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["President Of The United States"],"output":"POTUS"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Shaking My Head"],"output":"SMH"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Agnetha, Bjorn, Benny, Anni-Frid"],"output":"ABBA"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Zone Improvement Plan"],"output":"ZIP"}]},{"name":"Actor's Birthday","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/actor-birthday/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Keanu Reeves"],"output":"1964-09-02"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Meryl Streep"],"output":"1949-06-22"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Denzel Washington"],"output":"1954-12-28"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Lin-Manuel Miranda"],"output":"1980-01-16"}]},{"name":"Anagram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/anagram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["shepherd","spider"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","ccat"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["olive","ilove"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","CAT"],"output":true}]},{"name":"Atbash Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/atbash/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["abc"],"output":"zyx"},{"name":"should preserve letter case","type":"CustomBlockTest","spec":"encrypt %'message'","function":"iterator fnXYZCBA"},{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["$?! +@"],"output":"$?! +@","name":"should preserve non-letters such as punctuation"}]},{"name":"Between","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/between/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[1,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[3,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,3,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[-6,-5,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[20,-5,5],"output":false}]},{"name":"Bigram Autocomplete","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/bigram-autocomplete/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list","function":"fncatcab"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list with 26 rows","function":"fncatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should contain rows that sum to 100","function":"fn100.5rowcatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return correct probabilities","function":"fn5013catcabchechi"}]},{"name":"Caesar Shift","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/caesar-shift/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["abc",2],"output":"cde"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",100],"output":"()*"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",-50],"output":"\u0012\u0013\u0014"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["with spaces",10],"output":"\u0001s~r*}zkmo}"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["no shift!",0],"output":"no shift!"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["negative wrapping!",-200],"output":"&\u001d\u001f\u0019,!.\u001dX/*\u0019((!&\u001fY"}]},{"name":"Compute the Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average/parsons.xml","tests":[]},{"name":"Compute the Average of a List","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average-list/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","1"]],"output":"1"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","2"]],"output":"1.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["-1","2","4","-3"]],"output":"0.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32"]],"output":-7.4},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32","54"]],"output":2.8333333333333335}]},{"name":"Counting Letter Frequency","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","function":"countabcc11200000000000000000000000"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","function":"counta b ! c26"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","function":"countaAbBcCzZ22200000000000000000000002"}]},{"name":"Counting Letter Frequency as Dictionary","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency-dictionary/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","inputs":["abcc"],"output":[["a",1],["b",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","inputs":["a4cc"],"output":[["a",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","inputs":["xyzZ"],"output":[["x",1],["y",1],["z",2]]}]},{"name":"Cracking the Caesar Shift with Brute Force","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-brute-force/parsons.xml","tests":[{"type":"CustomBlockTest","name":"it should find key when starts with a search word","spec":"find key where %'msg' contains %'words'","function":"code breakerhello world2messagemsg
hello2
"},{"name":"it should find key when using multiple search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces15messagemsg
hellowith15
"},{"name":"it should find key when ends with one of many search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces33messagemsg
hellospaces33
"},{"name":"it should return -1 if cannot decode message","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerno hidden words3messagemsg
hellospaces-1
"}]},{"name":"Cracking the Caesar Shift with a Partial Solution","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-partial-soln/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","c"],"output":2},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["A","a"],"output":32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","A"],"output":-32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["5","0"],"output":-5},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":[".","?"],"output":17}]},{"name":"Cyclic Iterator","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/cyclic-iterator/parsons.xml","tests":[{"name":"block should return a function","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1"},{"name":"sequence should start with the first value in the list","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1messagemsg
1
2424
"},{"name":"sequence should remember position","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn797"},{"name":"sequence should restart after reaching the end","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn777"}]},{"name":"Factorial","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/factorial/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[5],"output":120},{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[0],"output":1},{"type":"CustomBlockTest","name":"should compute the factorial of an unknown input","spec":"factorial %'num'","inputs":[7],"output":5040}]},{"name":"FizzBuzz","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/fizz-buzz/template.xml","tests":[{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[1],"output":1},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-39],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[3],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-50],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[5],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-150],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[15],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[0],"output":"fizzbuzz"}]},{"name":"From Infinite Sequences to Finite Lists","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/take-collect-sequences/parsons.xml","tests":[]},{"name":"Greet","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/greet/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"greet %'person'","name":"greet %'person' should start with \"Hello,\"","function":"blockBrian15Hello"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Bob"],"output":"Hello, Bob!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Alice"],"output":"Hello, Alice!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Cliff"],"output":"Hello, Cliff!"}]},{"name":"Intro to Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/intro-infinite-sequences/parsons.xml","tests":[{"name":"sequence should start with 1","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fnmessagemsg
1
"},{"name":"sequence should remember current position","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"},{"name":"sequence should produce counting numbers","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fntrue"},{"name":"two sequences should iterate independently","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"}]},{"name":"Isogram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/isogram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["letter"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["a"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["arraigning"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect first-order isogram","function":"blocksunflower"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect second-order isogram","function":"blockhorseshoer"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect third-order isogram","function":"blockgeggee"}]},{"name":"Leap Year","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/leap-year/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2015],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1970],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1996],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1960],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2100],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1900],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2000],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2400],"output":true}]},{"name":"Luhn Formula","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/luhn-formula/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"single digits cannot be valid","inputs":["8"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid credit card","inputs":["8273 1232 7352 0569"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"text with non digit is invalid","inputs":["059a"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid long number with even remainder","inputs":["1 2345 6789 1234 5678 9012"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with even digits","inputs":["095 245 88"],"output":true},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with odd number of spaces","inputs":["234 567 891 234"],"output":true}]},{"name":"Mapping Over Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/map-sequence/parsons.xml","tests":[{"name":"map should return another sequence","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map2messagemsg
"},{"name":"new sequence should contain transformed values","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map
by threes3i110true
"}]},{"name":"Minesweeper","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/minesweeper/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","*",""],["*","",""],["","*","*"]]],"output":[[2,"*",1],["*",4,3],[2,"*","*"]],"name":"board w/ mine counts on square board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*"],["*",""],["","*"]]],"output":[["*","*"],["*",4],[2,"*"]],"name":"board w/ mine counts on rectangle board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*","*"],["*","","*"],["","*",""]]],"output":[["*","*","*"],["*",6,"*"],[2,"*",2]],"name":"board w/ mine counts on dense board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","","",""],["","","","*"],["","","",""]]],"output":[[0,0,1,1],[0,0,1,"*"],[0,0,1,1]],"name":"board w/ mine counts on sparse board"}]},{"name":"Moving Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/moving-average/parsons.xml","tests":[{"name":"moving average block should return a list","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn1112"},{"name":"moving average should be computed correctly","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn-104176311.666666666666666744.666666666666667"}]},{"name":"Pangram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/pangram/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","inputs":[""],"output":false},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"lowercase pangram","inputs":["abcdefghijklmnopqrstuvwxyz"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"mixed case pangram","inputs":["abcdefghijkLMNOPQRSTUVWXYZ"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"pangram with extra symbols","inputs":["the quick brown fox jumps over a lazy dog!"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"missing a letter","inputs":["abcdefghijkLMNOPQRSTUVWYZ"],"output":false}]},{"name":"Sieve of Eratosthenes","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sieve/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should not consider 1 prime","inputs":[1],"output":[]},{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should find the all primes up to 5","inputs":[5],"output":[2,3,5]},{"type":"CustomBlockTest","name":"should find the all primes up to 30","spec":"factorial %'num'","inputs":[30],"output":[2,3,5,7,11,13,17,19,23,29]}]},{"name":"Sliding Windows","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sliding-windows/template.xml","tests":[]},{"name":"Transposing Music","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/transpose-music/template.xml","tests":[{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["78","1"],"output":"79","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["84","-2"],"output":"82","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["36","5"],"output":"41","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["C2","5"],"output":"41","name":"should accept note names (e.g., \"C4\")"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["50","0"],"output":"50","name":"should return original note when transposing by 0"}]},{"name":"Vigenere Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/vigenere/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["how are you?",["1","2","3","4"]],"output":"iqz$bth$zqxC"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["cba",["1","2","3"]],"output":"ddd"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["wow, negative keys?",["-2","-5","-3"]],"output":"ujt*\u001bkcb^rdsc\u001bhctp="},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["what large keys!",["100","200","300"]],"output":"[0\rXh\u0018E:\u0013Ih\u0017IA\u001f\u0005"}]}]}; const [ide] = world.children; class CustomBlockAutograder extends Extension { diff --git a/docs/autograders/actor-birthday.js b/docs/autograders/actor-birthday.js index 11e2cd7..92a667d 100644 --- a/docs/autograders/actor-birthday.js +++ b/docs/autograders/actor-birthday.js @@ -2,7 +2,7 @@ ScrollFrameMorph, nop, HandleMorph, List, Extension, ToggleMorph, BlockMorph, Color, SpriteMorph, localize, TextMorph, MorphicPreferences, WHITE*/ (function() { - const config = {"name":"NetsBlox Exercises","assignments":[{"name":"Acronym","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/acronym/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["I Don't Know"],"output":"IDK"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["President Of The United States"],"output":"POTUS"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Shaking My Head"],"output":"SMH"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Agnetha, Bjorn, Benny, Anni-Frid"],"output":"ABBA"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Zone Improvement Plan"],"output":"ZIP"}]},{"name":"Actor's Birthday","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/actor-birthday/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Keanu Reeves"],"output":"1964-09-02"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Meryl Streep"],"output":"1949-06-22"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Denzel Washington"],"output":"1954-12-28"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Lin-Manuel Miranda"],"output":"1980-01-16"}]},{"name":"Anagram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/anagram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["shepherd","spider"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","ccat"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["olive","ilove"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","CAT"],"output":true}]},{"name":"Atbash Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/atbash/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["abc"],"output":"zyx"},{"name":"should preserve letter case","type":"CustomBlockTest","spec":"encrypt %'message'","function":"iterator fnXYZCBA"},{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["$?! +@"],"output":"$?! +@","name":"should preserve non-letters such as punctuation"}]},{"name":"Between","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/between/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[1,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[3,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,3,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[-6,-5,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[20,-5,5],"output":false}]},{"name":"Bigram Autocomplete","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/bigram-autocomplete/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list","function":"fncatcab"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list with 26 rows","function":"fncatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should contain rows that sum to 100","function":"fn100.5rowcatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return correct probabilities","function":"fn5013catcabchechi"}]},{"name":"Caesar Shift","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/caesar-shift/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["abc",2],"output":"cde"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",100],"output":"()*"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",-50],"output":"\u0012\u0013\u0014"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["with spaces",10],"output":"\u0001s~r*}zkmo}"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["no shift!",0],"output":"no shift!"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["negative wrapping!",-200],"output":"&\u001d\u001f\u0019,!.\u001dX/*\u0019((!&\u001fY"}]},{"name":"Compute the Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average/parsons.xml","tests":[]},{"name":"Compute the Average of a List","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average-list/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","1"]],"output":"1"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","2"]],"output":"1.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["-1","2","4","-3"]],"output":"0.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32"]],"output":-7.4},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32","54"]],"output":2.8333333333333335}]},{"name":"Counting Letter Frequency","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","function":"countabcc11200000000000000000000000"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","function":"counta b ! c26"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","function":"countaAbBcCzZ22200000000000000000000002"}]},{"name":"Counting Letter Frequency as Dictionary","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency-dictionary/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","inputs":["abcc"],"output":[["a",1],["b",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","inputs":["a4cc"],"output":[["a",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","inputs":["xyzZ"],"output":[["x",1],["y",1],["z",2]]}]},{"name":"Cracking the Caesar Shift with Brute Force","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-brute-force/parsons.xml","tests":[{"type":"CustomBlockTest","name":"it should find key when starts with a search word","spec":"find key where %'msg' contains %'words'","function":"code breakerhello world2messagemsg
hello2
"},{"name":"it should find key when using multiple search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces15messagemsg
hellowith15
"},{"name":"it should find key when ends with one of many search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces33messagemsg
hellospaces33
"},{"name":"it should return -1 if cannot decode message","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerno hidden words3messagemsg
hellospaces-1
"}]},{"name":"Cracking the Caesar Shift with a Partial Solution","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-partial-soln/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","c"],"output":2},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["A","a"],"output":32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","A"],"output":-32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["5","0"],"output":-5},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":[".","?"],"output":17}]},{"name":"Cyclic Iterator","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/cyclic-iterator/parsons.xml","tests":[{"name":"block should return a function","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1"},{"name":"sequence should start with the first value in the list","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1messagemsg
1
2424
"},{"name":"sequence should remember position","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn797"},{"name":"sequence should restart after reaching the end","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn777"}]},{"name":"Factorial","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/factorial/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[5],"output":120},{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[0],"output":1},{"type":"CustomBlockTest","name":"should compute the factorial of an unknown input","spec":"factorial %'num'","inputs":[7],"output":5040}]},{"name":"FizzBuzz","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/fizz-buzz/template.xml","tests":[{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[1],"output":1},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-39],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[3],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-50],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[5],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-150],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[15],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[0],"output":"fizzbuzz"}]},{"name":"From Infinite Sequences to Finite Lists","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/take-collect-sequences/parsons.xml","tests":[]},{"name":"Greet","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/greet/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"greet %'person'","name":"greet %'person' should start with \"Hello,\"","function":"blockBrian15Hello"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Bob"],"output":"Hello, Bob!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Alice"],"output":"Hello, Alice!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Cliff"],"output":"Hello, Cliff!"}]},{"name":"Intro to Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/intro-infinite-sequences/parsons.xml","tests":[{"name":"sequence should start with 1","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fnmessagemsg
1
"},{"name":"sequence should remember current position","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"},{"name":"sequence should produce counting numbers","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fntrue"},{"name":"two sequences should iterate independently","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"}]},{"name":"Isogram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/isogram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["letter"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["a"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["arraigning"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect first-order isogram","function":"blocksunflower"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect second-order isogram","function":"blockhorseshoer"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect third-order isogram","function":"blockgeggee"}]},{"name":"Leap Year","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/leap-year/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2015],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1970],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1996],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1960],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2100],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1900],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2000],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2400],"output":true}]},{"name":"Luhn Formula","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/luhn-formula/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"single digits cannot be valid","inputs":["8"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid credit card","inputs":["8273 1232 7352 0569"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"text with non digit is invalid","inputs":["059a"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid long number with even remainder","inputs":["1 2345 6789 1234 5678 9012"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with even digits","inputs":["095 245 88"],"output":true},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with odd number of spaces","inputs":["234 567 891 234"],"output":true}]},{"name":"Mapping Over Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/map-sequence/parsons.xml","tests":[{"name":"map should return another sequence","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map2messagemsg
"},{"name":"new sequence should contain transformed values","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map
by threes3i110true
"}]},{"name":"Minesweeper","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/minesweeper/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","*",""],["*","",""],["","*","*"]]],"output":[[2,"*",1],["*",4,3],[2,"*","*"]],"name":"board w/ mine counts on square board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*"],["*",""],["","*"]]],"output":[["*","*"],["*",4],[2,"*"]],"name":"board w/ mine counts on rectangle board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*","*"],["*","","*"],["","*",""]]],"output":[["*","*","*"],["*",6,"*"],[2,"*",2]],"name":"board w/ mine counts on dense board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","","",""],["","","","*"],["","","",""]]],"output":[[0,0,1,1],[0,0,1,"*"],[0,0,1,1]],"name":"board w/ mine counts on sparse board"}]},{"name":"Moving Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/moving-average/parsons.xml","tests":[{"name":"moving average block should return a list","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn1112"},{"name":"moving average should be computed correctly","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn-104176311.666666666666666744.666666666666667"}]},{"name":"Pangram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/pangram/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","inputs":[""],"output":false},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"lowercase pangram","inputs":["abcdefghijklmnopqrstuvwxyz"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"mixed case pangram","inputs":["abcdefghijkLMNOPQRSTUVWXYZ"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"pangram with extra symbols","inputs":["the quick brown fox jumps over a lazy dog!"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"missing a letter","inputs":["abcdefghijkLMNOPQRSTUVWYZ"],"output":false}]},{"name":"Sieve of Eratosthenes","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sieve/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should not consider 1 prime","inputs":[1],"output":[]},{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should find the all primes up to 5","inputs":[5],"output":[2,3,5]},{"type":"CustomBlockTest","name":"should find the all primes up to 30","spec":"factorial %'num'","inputs":[30],"output":[2,3,5,7,11,13,17,19,23,29]}]},{"name":"Sliding Windows","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sliding-windows/template.xml","tests":[]},{"name":"Transposing Music","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/transpose-music/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["78","1"],"output":"79","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["84","-2"],"output":"82","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["36","5"],"output":"41","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["C2","5"],"output":"41","name":"should accept note names (e.g., \"C4\")"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["50","0"],"output":"50","name":"should return original note when transposing by 0"}]},{"name":"Vigenere Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/vigenere/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["how are you?",["1","2","3","4"]],"output":"iqz$bth$zqxC"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["cba",["1","2","3"]],"output":"ddd"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["wow, negative keys?",["-2","-5","-3"]],"output":"ujt*\u001bkcb^rdsc\u001bhctp="},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["what large keys!",["100","200","300"]],"output":"[0\rXh\u0018E:\u0013Ih\u0017IA\u001f\u0005"}]}]}; + const config = {"name":"NetsBlox Exercises","assignments":[{"name":"Acronym","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/acronym/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["I Don't Know"],"output":"IDK"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["President Of The United States"],"output":"POTUS"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Shaking My Head"],"output":"SMH"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Agnetha, Bjorn, Benny, Anni-Frid"],"output":"ABBA"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Zone Improvement Plan"],"output":"ZIP"}]},{"name":"Actor's Birthday","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/actor-birthday/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Keanu Reeves"],"output":"1964-09-02"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Meryl Streep"],"output":"1949-06-22"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Denzel Washington"],"output":"1954-12-28"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Lin-Manuel Miranda"],"output":"1980-01-16"}]},{"name":"Anagram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/anagram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["shepherd","spider"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","ccat"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["olive","ilove"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","CAT"],"output":true}]},{"name":"Atbash Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/atbash/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["abc"],"output":"zyx"},{"name":"should preserve letter case","type":"CustomBlockTest","spec":"encrypt %'message'","function":"iterator fnXYZCBA"},{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["$?! +@"],"output":"$?! +@","name":"should preserve non-letters such as punctuation"}]},{"name":"Between","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/between/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[1,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[3,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,3,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[-6,-5,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[20,-5,5],"output":false}]},{"name":"Bigram Autocomplete","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/bigram-autocomplete/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list","function":"fncatcab"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list with 26 rows","function":"fncatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should contain rows that sum to 100","function":"fn100.5rowcatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return correct probabilities","function":"fn5013catcabchechi"}]},{"name":"Caesar Shift","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/caesar-shift/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["abc",2],"output":"cde"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",100],"output":"()*"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",-50],"output":"\u0012\u0013\u0014"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["with spaces",10],"output":"\u0001s~r*}zkmo}"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["no shift!",0],"output":"no shift!"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["negative wrapping!",-200],"output":"&\u001d\u001f\u0019,!.\u001dX/*\u0019((!&\u001fY"}]},{"name":"Compute the Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average/parsons.xml","tests":[]},{"name":"Compute the Average of a List","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average-list/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","1"]],"output":"1"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","2"]],"output":"1.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["-1","2","4","-3"]],"output":"0.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32"]],"output":-7.4},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32","54"]],"output":2.8333333333333335}]},{"name":"Counting Letter Frequency","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","function":"countabcc11200000000000000000000000"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","function":"counta b ! c26"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","function":"countaAbBcCzZ22200000000000000000000002"}]},{"name":"Counting Letter Frequency as Dictionary","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency-dictionary/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","inputs":["abcc"],"output":[["a",1],["b",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","inputs":["a4cc"],"output":[["a",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","inputs":["xyzZ"],"output":[["x",1],["y",1],["z",2]]}]},{"name":"Cracking the Caesar Shift with Brute Force","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-brute-force/parsons.xml","tests":[{"type":"CustomBlockTest","name":"it should find key when starts with a search word","spec":"find key where %'msg' contains %'words'","function":"code breakerhello world2messagemsg
hello2
"},{"name":"it should find key when using multiple search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces15messagemsg
hellowith15
"},{"name":"it should find key when ends with one of many search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces33messagemsg
hellospaces33
"},{"name":"it should return -1 if cannot decode message","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerno hidden words3messagemsg
hellospaces-1
"}]},{"name":"Cracking the Caesar Shift with a Partial Solution","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-partial-soln/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","c"],"output":2},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["A","a"],"output":32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","A"],"output":-32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["5","0"],"output":-5},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":[".","?"],"output":17}]},{"name":"Cyclic Iterator","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/cyclic-iterator/parsons.xml","tests":[{"name":"block should return a function","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1"},{"name":"sequence should start with the first value in the list","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1messagemsg
1
2424
"},{"name":"sequence should remember position","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn797"},{"name":"sequence should restart after reaching the end","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn777"}]},{"name":"Factorial","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/factorial/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[5],"output":120},{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[0],"output":1},{"type":"CustomBlockTest","name":"should compute the factorial of an unknown input","spec":"factorial %'num'","inputs":[7],"output":5040}]},{"name":"FizzBuzz","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/fizz-buzz/template.xml","tests":[{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[1],"output":1},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-39],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[3],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-50],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[5],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-150],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[15],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[0],"output":"fizzbuzz"}]},{"name":"From Infinite Sequences to Finite Lists","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/take-collect-sequences/parsons.xml","tests":[]},{"name":"Greet","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/greet/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"greet %'person'","name":"greet %'person' should start with \"Hello,\"","function":"blockBrian15Hello"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Bob"],"output":"Hello, Bob!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Alice"],"output":"Hello, Alice!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Cliff"],"output":"Hello, Cliff!"}]},{"name":"Intro to Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/intro-infinite-sequences/parsons.xml","tests":[{"name":"sequence should start with 1","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fnmessagemsg
1
"},{"name":"sequence should remember current position","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"},{"name":"sequence should produce counting numbers","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fntrue"},{"name":"two sequences should iterate independently","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"}]},{"name":"Isogram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/isogram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["letter"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["a"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["arraigning"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect first-order isogram","function":"blocksunflower"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect second-order isogram","function":"blockhorseshoer"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect third-order isogram","function":"blockgeggee"}]},{"name":"Leap Year","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/leap-year/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2015],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1970],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1996],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1960],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2100],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1900],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2000],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2400],"output":true}]},{"name":"Luhn Formula","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/luhn-formula/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"single digits cannot be valid","inputs":["8"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid credit card","inputs":["8273 1232 7352 0569"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"text with non digit is invalid","inputs":["059a"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid long number with even remainder","inputs":["1 2345 6789 1234 5678 9012"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with even digits","inputs":["095 245 88"],"output":true},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with odd number of spaces","inputs":["234 567 891 234"],"output":true}]},{"name":"Mapping Over Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/map-sequence/parsons.xml","tests":[{"name":"map should return another sequence","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map2messagemsg
"},{"name":"new sequence should contain transformed values","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map
by threes3i110true
"}]},{"name":"Minesweeper","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/minesweeper/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","*",""],["*","",""],["","*","*"]]],"output":[[2,"*",1],["*",4,3],[2,"*","*"]],"name":"board w/ mine counts on square board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*"],["*",""],["","*"]]],"output":[["*","*"],["*",4],[2,"*"]],"name":"board w/ mine counts on rectangle board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*","*"],["*","","*"],["","*",""]]],"output":[["*","*","*"],["*",6,"*"],[2,"*",2]],"name":"board w/ mine counts on dense board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","","",""],["","","","*"],["","","",""]]],"output":[[0,0,1,1],[0,0,1,"*"],[0,0,1,1]],"name":"board w/ mine counts on sparse board"}]},{"name":"Moving Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/moving-average/parsons.xml","tests":[{"name":"moving average block should return a list","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn1112"},{"name":"moving average should be computed correctly","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn-104176311.666666666666666744.666666666666667"}]},{"name":"Pangram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/pangram/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","inputs":[""],"output":false},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"lowercase pangram","inputs":["abcdefghijklmnopqrstuvwxyz"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"mixed case pangram","inputs":["abcdefghijkLMNOPQRSTUVWXYZ"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"pangram with extra symbols","inputs":["the quick brown fox jumps over a lazy dog!"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"missing a letter","inputs":["abcdefghijkLMNOPQRSTUVWYZ"],"output":false}]},{"name":"Sieve of Eratosthenes","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sieve/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should not consider 1 prime","inputs":[1],"output":[]},{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should find the all primes up to 5","inputs":[5],"output":[2,3,5]},{"type":"CustomBlockTest","name":"should find the all primes up to 30","spec":"factorial %'num'","inputs":[30],"output":[2,3,5,7,11,13,17,19,23,29]}]},{"name":"Sliding Windows","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sliding-windows/template.xml","tests":[]},{"name":"Transposing Music","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/transpose-music/template.xml","tests":[{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["78","1"],"output":"79","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["84","-2"],"output":"82","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["36","5"],"output":"41","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["C2","5"],"output":"41","name":"should accept note names (e.g., \"C4\")"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["50","0"],"output":"50","name":"should return original note when transposing by 0"}]},{"name":"Vigenere Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/vigenere/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["how are you?",["1","2","3","4"]],"output":"iqz$bth$zqxC"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["cba",["1","2","3"]],"output":"ddd"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["wow, negative keys?",["-2","-5","-3"]],"output":"ujt*\u001bkcb^rdsc\u001bhctp="},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["what large keys!",["100","200","300"]],"output":"[0\rXh\u0018E:\u0013Ih\u0017IA\u001f\u0005"}]}]}; const [ide] = world.children; class CustomBlockAutograder extends Extension { diff --git a/docs/autograders/anagram.js b/docs/autograders/anagram.js index 396e321..d1b0984 100644 --- a/docs/autograders/anagram.js +++ b/docs/autograders/anagram.js @@ -2,7 +2,7 @@ ScrollFrameMorph, nop, HandleMorph, List, Extension, ToggleMorph, BlockMorph, Color, SpriteMorph, localize, TextMorph, MorphicPreferences, WHITE*/ (function() { - const config = {"name":"NetsBlox Exercises","assignments":[{"name":"Acronym","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/acronym/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["I Don't Know"],"output":"IDK"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["President Of The United States"],"output":"POTUS"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Shaking My Head"],"output":"SMH"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Agnetha, Bjorn, Benny, Anni-Frid"],"output":"ABBA"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Zone Improvement Plan"],"output":"ZIP"}]},{"name":"Actor's Birthday","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/actor-birthday/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Keanu Reeves"],"output":"1964-09-02"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Meryl Streep"],"output":"1949-06-22"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Denzel Washington"],"output":"1954-12-28"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Lin-Manuel Miranda"],"output":"1980-01-16"}]},{"name":"Anagram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/anagram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["shepherd","spider"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","ccat"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["olive","ilove"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","CAT"],"output":true}]},{"name":"Atbash Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/atbash/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["abc"],"output":"zyx"},{"name":"should preserve letter case","type":"CustomBlockTest","spec":"encrypt %'message'","function":"iterator fnXYZCBA"},{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["$?! +@"],"output":"$?! +@","name":"should preserve non-letters such as punctuation"}]},{"name":"Between","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/between/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[1,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[3,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,3,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[-6,-5,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[20,-5,5],"output":false}]},{"name":"Bigram Autocomplete","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/bigram-autocomplete/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list","function":"fncatcab"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list with 26 rows","function":"fncatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should contain rows that sum to 100","function":"fn100.5rowcatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return correct probabilities","function":"fn5013catcabchechi"}]},{"name":"Caesar Shift","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/caesar-shift/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["abc",2],"output":"cde"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",100],"output":"()*"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",-50],"output":"\u0012\u0013\u0014"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["with spaces",10],"output":"\u0001s~r*}zkmo}"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["no shift!",0],"output":"no shift!"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["negative wrapping!",-200],"output":"&\u001d\u001f\u0019,!.\u001dX/*\u0019((!&\u001fY"}]},{"name":"Compute the Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average/parsons.xml","tests":[]},{"name":"Compute the Average of a List","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average-list/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","1"]],"output":"1"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","2"]],"output":"1.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["-1","2","4","-3"]],"output":"0.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32"]],"output":-7.4},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32","54"]],"output":2.8333333333333335}]},{"name":"Counting Letter Frequency","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","function":"countabcc11200000000000000000000000"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","function":"counta b ! c26"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","function":"countaAbBcCzZ22200000000000000000000002"}]},{"name":"Counting Letter Frequency as Dictionary","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency-dictionary/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","inputs":["abcc"],"output":[["a",1],["b",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","inputs":["a4cc"],"output":[["a",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","inputs":["xyzZ"],"output":[["x",1],["y",1],["z",2]]}]},{"name":"Cracking the Caesar Shift with Brute Force","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-brute-force/parsons.xml","tests":[{"type":"CustomBlockTest","name":"it should find key when starts with a search word","spec":"find key where %'msg' contains %'words'","function":"code breakerhello world2messagemsg
hello2
"},{"name":"it should find key when using multiple search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces15messagemsg
hellowith15
"},{"name":"it should find key when ends with one of many search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces33messagemsg
hellospaces33
"},{"name":"it should return -1 if cannot decode message","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerno hidden words3messagemsg
hellospaces-1
"}]},{"name":"Cracking the Caesar Shift with a Partial Solution","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-partial-soln/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","c"],"output":2},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["A","a"],"output":32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","A"],"output":-32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["5","0"],"output":-5},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":[".","?"],"output":17}]},{"name":"Cyclic Iterator","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/cyclic-iterator/parsons.xml","tests":[{"name":"block should return a function","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1"},{"name":"sequence should start with the first value in the list","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1messagemsg
1
2424
"},{"name":"sequence should remember position","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn797"},{"name":"sequence should restart after reaching the end","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn777"}]},{"name":"Factorial","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/factorial/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[5],"output":120},{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[0],"output":1},{"type":"CustomBlockTest","name":"should compute the factorial of an unknown input","spec":"factorial %'num'","inputs":[7],"output":5040}]},{"name":"FizzBuzz","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/fizz-buzz/template.xml","tests":[{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[1],"output":1},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-39],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[3],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-50],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[5],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-150],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[15],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[0],"output":"fizzbuzz"}]},{"name":"From Infinite Sequences to Finite Lists","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/take-collect-sequences/parsons.xml","tests":[]},{"name":"Greet","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/greet/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"greet %'person'","name":"greet %'person' should start with \"Hello,\"","function":"blockBrian15Hello"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Bob"],"output":"Hello, Bob!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Alice"],"output":"Hello, Alice!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Cliff"],"output":"Hello, Cliff!"}]},{"name":"Intro to Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/intro-infinite-sequences/parsons.xml","tests":[{"name":"sequence should start with 1","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fnmessagemsg
1
"},{"name":"sequence should remember current position","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"},{"name":"sequence should produce counting numbers","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fntrue"},{"name":"two sequences should iterate independently","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"}]},{"name":"Isogram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/isogram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["letter"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["a"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["arraigning"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect first-order isogram","function":"blocksunflower"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect second-order isogram","function":"blockhorseshoer"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect third-order isogram","function":"blockgeggee"}]},{"name":"Leap Year","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/leap-year/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2015],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1970],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1996],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1960],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2100],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1900],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2000],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2400],"output":true}]},{"name":"Luhn Formula","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/luhn-formula/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"single digits cannot be valid","inputs":["8"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid credit card","inputs":["8273 1232 7352 0569"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"text with non digit is invalid","inputs":["059a"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid long number with even remainder","inputs":["1 2345 6789 1234 5678 9012"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with even digits","inputs":["095 245 88"],"output":true},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with odd number of spaces","inputs":["234 567 891 234"],"output":true}]},{"name":"Mapping Over Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/map-sequence/parsons.xml","tests":[{"name":"map should return another sequence","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map2messagemsg
"},{"name":"new sequence should contain transformed values","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map
by threes3i110true
"}]},{"name":"Minesweeper","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/minesweeper/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","*",""],["*","",""],["","*","*"]]],"output":[[2,"*",1],["*",4,3],[2,"*","*"]],"name":"board w/ mine counts on square board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*"],["*",""],["","*"]]],"output":[["*","*"],["*",4],[2,"*"]],"name":"board w/ mine counts on rectangle board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*","*"],["*","","*"],["","*",""]]],"output":[["*","*","*"],["*",6,"*"],[2,"*",2]],"name":"board w/ mine counts on dense board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","","",""],["","","","*"],["","","",""]]],"output":[[0,0,1,1],[0,0,1,"*"],[0,0,1,1]],"name":"board w/ mine counts on sparse board"}]},{"name":"Moving Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/moving-average/parsons.xml","tests":[{"name":"moving average block should return a list","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn1112"},{"name":"moving average should be computed correctly","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn-104176311.666666666666666744.666666666666667"}]},{"name":"Pangram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/pangram/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","inputs":[""],"output":false},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"lowercase pangram","inputs":["abcdefghijklmnopqrstuvwxyz"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"mixed case pangram","inputs":["abcdefghijkLMNOPQRSTUVWXYZ"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"pangram with extra symbols","inputs":["the quick brown fox jumps over a lazy dog!"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"missing a letter","inputs":["abcdefghijkLMNOPQRSTUVWYZ"],"output":false}]},{"name":"Sieve of Eratosthenes","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sieve/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should not consider 1 prime","inputs":[1],"output":[]},{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should find the all primes up to 5","inputs":[5],"output":[2,3,5]},{"type":"CustomBlockTest","name":"should find the all primes up to 30","spec":"factorial %'num'","inputs":[30],"output":[2,3,5,7,11,13,17,19,23,29]}]},{"name":"Sliding Windows","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sliding-windows/template.xml","tests":[]},{"name":"Transposing Music","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/transpose-music/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["78","1"],"output":"79","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["84","-2"],"output":"82","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["36","5"],"output":"41","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["C2","5"],"output":"41","name":"should accept note names (e.g., \"C4\")"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["50","0"],"output":"50","name":"should return original note when transposing by 0"}]},{"name":"Vigenere Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/vigenere/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["how are you?",["1","2","3","4"]],"output":"iqz$bth$zqxC"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["cba",["1","2","3"]],"output":"ddd"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["wow, negative keys?",["-2","-5","-3"]],"output":"ujt*\u001bkcb^rdsc\u001bhctp="},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["what large keys!",["100","200","300"]],"output":"[0\rXh\u0018E:\u0013Ih\u0017IA\u001f\u0005"}]}]}; + const config = {"name":"NetsBlox Exercises","assignments":[{"name":"Acronym","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/acronym/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["I Don't Know"],"output":"IDK"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["President Of The United States"],"output":"POTUS"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Shaking My Head"],"output":"SMH"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Agnetha, Bjorn, Benny, Anni-Frid"],"output":"ABBA"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Zone Improvement Plan"],"output":"ZIP"}]},{"name":"Actor's Birthday","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/actor-birthday/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Keanu Reeves"],"output":"1964-09-02"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Meryl Streep"],"output":"1949-06-22"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Denzel Washington"],"output":"1954-12-28"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Lin-Manuel Miranda"],"output":"1980-01-16"}]},{"name":"Anagram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/anagram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["shepherd","spider"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","ccat"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["olive","ilove"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","CAT"],"output":true}]},{"name":"Atbash Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/atbash/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["abc"],"output":"zyx"},{"name":"should preserve letter case","type":"CustomBlockTest","spec":"encrypt %'message'","function":"iterator fnXYZCBA"},{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["$?! +@"],"output":"$?! +@","name":"should preserve non-letters such as punctuation"}]},{"name":"Between","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/between/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[1,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[3,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,3,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[-6,-5,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[20,-5,5],"output":false}]},{"name":"Bigram Autocomplete","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/bigram-autocomplete/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list","function":"fncatcab"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list with 26 rows","function":"fncatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should contain rows that sum to 100","function":"fn100.5rowcatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return correct probabilities","function":"fn5013catcabchechi"}]},{"name":"Caesar Shift","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/caesar-shift/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["abc",2],"output":"cde"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",100],"output":"()*"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",-50],"output":"\u0012\u0013\u0014"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["with spaces",10],"output":"\u0001s~r*}zkmo}"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["no shift!",0],"output":"no shift!"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["negative wrapping!",-200],"output":"&\u001d\u001f\u0019,!.\u001dX/*\u0019((!&\u001fY"}]},{"name":"Compute the Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average/parsons.xml","tests":[]},{"name":"Compute the Average of a List","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average-list/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","1"]],"output":"1"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","2"]],"output":"1.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["-1","2","4","-3"]],"output":"0.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32"]],"output":-7.4},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32","54"]],"output":2.8333333333333335}]},{"name":"Counting Letter Frequency","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","function":"countabcc11200000000000000000000000"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","function":"counta b ! c26"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","function":"countaAbBcCzZ22200000000000000000000002"}]},{"name":"Counting Letter Frequency as Dictionary","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency-dictionary/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","inputs":["abcc"],"output":[["a",1],["b",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","inputs":["a4cc"],"output":[["a",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","inputs":["xyzZ"],"output":[["x",1],["y",1],["z",2]]}]},{"name":"Cracking the Caesar Shift with Brute Force","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-brute-force/parsons.xml","tests":[{"type":"CustomBlockTest","name":"it should find key when starts with a search word","spec":"find key where %'msg' contains %'words'","function":"code breakerhello world2messagemsg
hello2
"},{"name":"it should find key when using multiple search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces15messagemsg
hellowith15
"},{"name":"it should find key when ends with one of many search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces33messagemsg
hellospaces33
"},{"name":"it should return -1 if cannot decode message","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerno hidden words3messagemsg
hellospaces-1
"}]},{"name":"Cracking the Caesar Shift with a Partial Solution","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-partial-soln/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","c"],"output":2},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["A","a"],"output":32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","A"],"output":-32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["5","0"],"output":-5},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":[".","?"],"output":17}]},{"name":"Cyclic Iterator","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/cyclic-iterator/parsons.xml","tests":[{"name":"block should return a function","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1"},{"name":"sequence should start with the first value in the list","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1messagemsg
1
2424
"},{"name":"sequence should remember position","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn797"},{"name":"sequence should restart after reaching the end","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn777"}]},{"name":"Factorial","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/factorial/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[5],"output":120},{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[0],"output":1},{"type":"CustomBlockTest","name":"should compute the factorial of an unknown input","spec":"factorial %'num'","inputs":[7],"output":5040}]},{"name":"FizzBuzz","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/fizz-buzz/template.xml","tests":[{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[1],"output":1},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-39],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[3],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-50],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[5],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-150],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[15],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[0],"output":"fizzbuzz"}]},{"name":"From Infinite Sequences to Finite Lists","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/take-collect-sequences/parsons.xml","tests":[]},{"name":"Greet","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/greet/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"greet %'person'","name":"greet %'person' should start with \"Hello,\"","function":"blockBrian15Hello"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Bob"],"output":"Hello, Bob!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Alice"],"output":"Hello, Alice!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Cliff"],"output":"Hello, Cliff!"}]},{"name":"Intro to Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/intro-infinite-sequences/parsons.xml","tests":[{"name":"sequence should start with 1","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fnmessagemsg
1
"},{"name":"sequence should remember current position","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"},{"name":"sequence should produce counting numbers","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fntrue"},{"name":"two sequences should iterate independently","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"}]},{"name":"Isogram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/isogram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["letter"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["a"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["arraigning"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect first-order isogram","function":"blocksunflower"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect second-order isogram","function":"blockhorseshoer"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect third-order isogram","function":"blockgeggee"}]},{"name":"Leap Year","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/leap-year/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2015],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1970],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1996],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1960],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2100],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1900],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2000],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2400],"output":true}]},{"name":"Luhn Formula","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/luhn-formula/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"single digits cannot be valid","inputs":["8"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid credit card","inputs":["8273 1232 7352 0569"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"text with non digit is invalid","inputs":["059a"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid long number with even remainder","inputs":["1 2345 6789 1234 5678 9012"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with even digits","inputs":["095 245 88"],"output":true},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with odd number of spaces","inputs":["234 567 891 234"],"output":true}]},{"name":"Mapping Over Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/map-sequence/parsons.xml","tests":[{"name":"map should return another sequence","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map2messagemsg
"},{"name":"new sequence should contain transformed values","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map
by threes3i110true
"}]},{"name":"Minesweeper","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/minesweeper/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","*",""],["*","",""],["","*","*"]]],"output":[[2,"*",1],["*",4,3],[2,"*","*"]],"name":"board w/ mine counts on square board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*"],["*",""],["","*"]]],"output":[["*","*"],["*",4],[2,"*"]],"name":"board w/ mine counts on rectangle board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*","*"],["*","","*"],["","*",""]]],"output":[["*","*","*"],["*",6,"*"],[2,"*",2]],"name":"board w/ mine counts on dense board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","","",""],["","","","*"],["","","",""]]],"output":[[0,0,1,1],[0,0,1,"*"],[0,0,1,1]],"name":"board w/ mine counts on sparse board"}]},{"name":"Moving Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/moving-average/parsons.xml","tests":[{"name":"moving average block should return a list","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn1112"},{"name":"moving average should be computed correctly","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn-104176311.666666666666666744.666666666666667"}]},{"name":"Pangram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/pangram/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","inputs":[""],"output":false},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"lowercase pangram","inputs":["abcdefghijklmnopqrstuvwxyz"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"mixed case pangram","inputs":["abcdefghijkLMNOPQRSTUVWXYZ"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"pangram with extra symbols","inputs":["the quick brown fox jumps over a lazy dog!"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"missing a letter","inputs":["abcdefghijkLMNOPQRSTUVWYZ"],"output":false}]},{"name":"Sieve of Eratosthenes","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sieve/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should not consider 1 prime","inputs":[1],"output":[]},{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should find the all primes up to 5","inputs":[5],"output":[2,3,5]},{"type":"CustomBlockTest","name":"should find the all primes up to 30","spec":"factorial %'num'","inputs":[30],"output":[2,3,5,7,11,13,17,19,23,29]}]},{"name":"Sliding Windows","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sliding-windows/template.xml","tests":[]},{"name":"Transposing Music","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/transpose-music/template.xml","tests":[{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["78","1"],"output":"79","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["84","-2"],"output":"82","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["36","5"],"output":"41","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["C2","5"],"output":"41","name":"should accept note names (e.g., \"C4\")"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["50","0"],"output":"50","name":"should return original note when transposing by 0"}]},{"name":"Vigenere Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/vigenere/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["how are you?",["1","2","3","4"]],"output":"iqz$bth$zqxC"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["cba",["1","2","3"]],"output":"ddd"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["wow, negative keys?",["-2","-5","-3"]],"output":"ujt*\u001bkcb^rdsc\u001bhctp="},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["what large keys!",["100","200","300"]],"output":"[0\rXh\u0018E:\u0013Ih\u0017IA\u001f\u0005"}]}]}; const [ide] = world.children; class CustomBlockAutograder extends Extension { diff --git a/docs/autograders/atbash.js b/docs/autograders/atbash.js index 2a31539..2b94375 100644 --- a/docs/autograders/atbash.js +++ b/docs/autograders/atbash.js @@ -2,7 +2,7 @@ ScrollFrameMorph, nop, HandleMorph, List, Extension, ToggleMorph, BlockMorph, Color, SpriteMorph, localize, TextMorph, MorphicPreferences, WHITE*/ (function() { - const config = {"name":"NetsBlox Exercises","assignments":[{"name":"Acronym","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/acronym/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["I Don't Know"],"output":"IDK"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["President Of The United States"],"output":"POTUS"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Shaking My Head"],"output":"SMH"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Agnetha, Bjorn, Benny, Anni-Frid"],"output":"ABBA"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Zone Improvement Plan"],"output":"ZIP"}]},{"name":"Actor's Birthday","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/actor-birthday/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Keanu Reeves"],"output":"1964-09-02"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Meryl Streep"],"output":"1949-06-22"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Denzel Washington"],"output":"1954-12-28"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Lin-Manuel Miranda"],"output":"1980-01-16"}]},{"name":"Anagram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/anagram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["shepherd","spider"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","ccat"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["olive","ilove"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","CAT"],"output":true}]},{"name":"Atbash Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/atbash/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["abc"],"output":"zyx"},{"name":"should preserve letter case","type":"CustomBlockTest","spec":"encrypt %'message'","function":"iterator fnXYZCBA"},{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["$?! +@"],"output":"$?! +@","name":"should preserve non-letters such as punctuation"}]},{"name":"Between","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/between/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[1,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[3,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,3,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[-6,-5,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[20,-5,5],"output":false}]},{"name":"Bigram Autocomplete","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/bigram-autocomplete/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list","function":"fncatcab"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list with 26 rows","function":"fncatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should contain rows that sum to 100","function":"fn100.5rowcatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return correct probabilities","function":"fn5013catcabchechi"}]},{"name":"Caesar Shift","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/caesar-shift/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["abc",2],"output":"cde"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",100],"output":"()*"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",-50],"output":"\u0012\u0013\u0014"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["with spaces",10],"output":"\u0001s~r*}zkmo}"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["no shift!",0],"output":"no shift!"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["negative wrapping!",-200],"output":"&\u001d\u001f\u0019,!.\u001dX/*\u0019((!&\u001fY"}]},{"name":"Compute the Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average/parsons.xml","tests":[]},{"name":"Compute the Average of a List","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average-list/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","1"]],"output":"1"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","2"]],"output":"1.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["-1","2","4","-3"]],"output":"0.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32"]],"output":-7.4},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32","54"]],"output":2.8333333333333335}]},{"name":"Counting Letter Frequency","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","function":"countabcc11200000000000000000000000"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","function":"counta b ! c26"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","function":"countaAbBcCzZ22200000000000000000000002"}]},{"name":"Counting Letter Frequency as Dictionary","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency-dictionary/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","inputs":["abcc"],"output":[["a",1],["b",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","inputs":["a4cc"],"output":[["a",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","inputs":["xyzZ"],"output":[["x",1],["y",1],["z",2]]}]},{"name":"Cracking the Caesar Shift with Brute Force","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-brute-force/parsons.xml","tests":[{"type":"CustomBlockTest","name":"it should find key when starts with a search word","spec":"find key where %'msg' contains %'words'","function":"code breakerhello world2messagemsg
hello2
"},{"name":"it should find key when using multiple search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces15messagemsg
hellowith15
"},{"name":"it should find key when ends with one of many search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces33messagemsg
hellospaces33
"},{"name":"it should return -1 if cannot decode message","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerno hidden words3messagemsg
hellospaces-1
"}]},{"name":"Cracking the Caesar Shift with a Partial Solution","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-partial-soln/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","c"],"output":2},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["A","a"],"output":32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","A"],"output":-32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["5","0"],"output":-5},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":[".","?"],"output":17}]},{"name":"Cyclic Iterator","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/cyclic-iterator/parsons.xml","tests":[{"name":"block should return a function","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1"},{"name":"sequence should start with the first value in the list","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1messagemsg
1
2424
"},{"name":"sequence should remember position","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn797"},{"name":"sequence should restart after reaching the end","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn777"}]},{"name":"Factorial","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/factorial/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[5],"output":120},{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[0],"output":1},{"type":"CustomBlockTest","name":"should compute the factorial of an unknown input","spec":"factorial %'num'","inputs":[7],"output":5040}]},{"name":"FizzBuzz","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/fizz-buzz/template.xml","tests":[{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[1],"output":1},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-39],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[3],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-50],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[5],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-150],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[15],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[0],"output":"fizzbuzz"}]},{"name":"From Infinite Sequences to Finite Lists","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/take-collect-sequences/parsons.xml","tests":[]},{"name":"Greet","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/greet/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"greet %'person'","name":"greet %'person' should start with \"Hello,\"","function":"blockBrian15Hello"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Bob"],"output":"Hello, Bob!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Alice"],"output":"Hello, Alice!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Cliff"],"output":"Hello, Cliff!"}]},{"name":"Intro to Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/intro-infinite-sequences/parsons.xml","tests":[{"name":"sequence should start with 1","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fnmessagemsg
1
"},{"name":"sequence should remember current position","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"},{"name":"sequence should produce counting numbers","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fntrue"},{"name":"two sequences should iterate independently","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"}]},{"name":"Isogram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/isogram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["letter"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["a"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["arraigning"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect first-order isogram","function":"blocksunflower"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect second-order isogram","function":"blockhorseshoer"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect third-order isogram","function":"blockgeggee"}]},{"name":"Leap Year","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/leap-year/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2015],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1970],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1996],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1960],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2100],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1900],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2000],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2400],"output":true}]},{"name":"Luhn Formula","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/luhn-formula/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"single digits cannot be valid","inputs":["8"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid credit card","inputs":["8273 1232 7352 0569"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"text with non digit is invalid","inputs":["059a"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid long number with even remainder","inputs":["1 2345 6789 1234 5678 9012"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with even digits","inputs":["095 245 88"],"output":true},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with odd number of spaces","inputs":["234 567 891 234"],"output":true}]},{"name":"Mapping Over Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/map-sequence/parsons.xml","tests":[{"name":"map should return another sequence","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map2messagemsg
"},{"name":"new sequence should contain transformed values","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map
by threes3i110true
"}]},{"name":"Minesweeper","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/minesweeper/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","*",""],["*","",""],["","*","*"]]],"output":[[2,"*",1],["*",4,3],[2,"*","*"]],"name":"board w/ mine counts on square board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*"],["*",""],["","*"]]],"output":[["*","*"],["*",4],[2,"*"]],"name":"board w/ mine counts on rectangle board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*","*"],["*","","*"],["","*",""]]],"output":[["*","*","*"],["*",6,"*"],[2,"*",2]],"name":"board w/ mine counts on dense board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","","",""],["","","","*"],["","","",""]]],"output":[[0,0,1,1],[0,0,1,"*"],[0,0,1,1]],"name":"board w/ mine counts on sparse board"}]},{"name":"Moving Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/moving-average/parsons.xml","tests":[{"name":"moving average block should return a list","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn1112"},{"name":"moving average should be computed correctly","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn-104176311.666666666666666744.666666666666667"}]},{"name":"Pangram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/pangram/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","inputs":[""],"output":false},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"lowercase pangram","inputs":["abcdefghijklmnopqrstuvwxyz"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"mixed case pangram","inputs":["abcdefghijkLMNOPQRSTUVWXYZ"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"pangram with extra symbols","inputs":["the quick brown fox jumps over a lazy dog!"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"missing a letter","inputs":["abcdefghijkLMNOPQRSTUVWYZ"],"output":false}]},{"name":"Sieve of Eratosthenes","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sieve/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should not consider 1 prime","inputs":[1],"output":[]},{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should find the all primes up to 5","inputs":[5],"output":[2,3,5]},{"type":"CustomBlockTest","name":"should find the all primes up to 30","spec":"factorial %'num'","inputs":[30],"output":[2,3,5,7,11,13,17,19,23,29]}]},{"name":"Sliding Windows","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sliding-windows/template.xml","tests":[]},{"name":"Transposing Music","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/transpose-music/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["78","1"],"output":"79","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["84","-2"],"output":"82","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["36","5"],"output":"41","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["C2","5"],"output":"41","name":"should accept note names (e.g., \"C4\")"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["50","0"],"output":"50","name":"should return original note when transposing by 0"}]},{"name":"Vigenere Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/vigenere/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["how are you?",["1","2","3","4"]],"output":"iqz$bth$zqxC"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["cba",["1","2","3"]],"output":"ddd"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["wow, negative keys?",["-2","-5","-3"]],"output":"ujt*\u001bkcb^rdsc\u001bhctp="},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["what large keys!",["100","200","300"]],"output":"[0\rXh\u0018E:\u0013Ih\u0017IA\u001f\u0005"}]}]}; + const config = {"name":"NetsBlox Exercises","assignments":[{"name":"Acronym","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/acronym/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["I Don't Know"],"output":"IDK"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["President Of The United States"],"output":"POTUS"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Shaking My Head"],"output":"SMH"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Agnetha, Bjorn, Benny, Anni-Frid"],"output":"ABBA"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Zone Improvement Plan"],"output":"ZIP"}]},{"name":"Actor's Birthday","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/actor-birthday/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Keanu Reeves"],"output":"1964-09-02"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Meryl Streep"],"output":"1949-06-22"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Denzel Washington"],"output":"1954-12-28"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Lin-Manuel Miranda"],"output":"1980-01-16"}]},{"name":"Anagram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/anagram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["shepherd","spider"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","ccat"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["olive","ilove"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","CAT"],"output":true}]},{"name":"Atbash Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/atbash/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["abc"],"output":"zyx"},{"name":"should preserve letter case","type":"CustomBlockTest","spec":"encrypt %'message'","function":"iterator fnXYZCBA"},{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["$?! +@"],"output":"$?! +@","name":"should preserve non-letters such as punctuation"}]},{"name":"Between","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/between/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[1,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[3,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,3,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[-6,-5,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[20,-5,5],"output":false}]},{"name":"Bigram Autocomplete","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/bigram-autocomplete/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list","function":"fncatcab"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list with 26 rows","function":"fncatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should contain rows that sum to 100","function":"fn100.5rowcatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return correct probabilities","function":"fn5013catcabchechi"}]},{"name":"Caesar Shift","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/caesar-shift/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["abc",2],"output":"cde"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",100],"output":"()*"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",-50],"output":"\u0012\u0013\u0014"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["with spaces",10],"output":"\u0001s~r*}zkmo}"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["no shift!",0],"output":"no shift!"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["negative wrapping!",-200],"output":"&\u001d\u001f\u0019,!.\u001dX/*\u0019((!&\u001fY"}]},{"name":"Compute the Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average/parsons.xml","tests":[]},{"name":"Compute the Average of a List","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average-list/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","1"]],"output":"1"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","2"]],"output":"1.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["-1","2","4","-3"]],"output":"0.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32"]],"output":-7.4},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32","54"]],"output":2.8333333333333335}]},{"name":"Counting Letter Frequency","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","function":"countabcc11200000000000000000000000"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","function":"counta b ! c26"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","function":"countaAbBcCzZ22200000000000000000000002"}]},{"name":"Counting Letter Frequency as Dictionary","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency-dictionary/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","inputs":["abcc"],"output":[["a",1],["b",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","inputs":["a4cc"],"output":[["a",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","inputs":["xyzZ"],"output":[["x",1],["y",1],["z",2]]}]},{"name":"Cracking the Caesar Shift with Brute Force","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-brute-force/parsons.xml","tests":[{"type":"CustomBlockTest","name":"it should find key when starts with a search word","spec":"find key where %'msg' contains %'words'","function":"code breakerhello world2messagemsg
hello2
"},{"name":"it should find key when using multiple search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces15messagemsg
hellowith15
"},{"name":"it should find key when ends with one of many search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces33messagemsg
hellospaces33
"},{"name":"it should return -1 if cannot decode message","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerno hidden words3messagemsg
hellospaces-1
"}]},{"name":"Cracking the Caesar Shift with a Partial Solution","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-partial-soln/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","c"],"output":2},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["A","a"],"output":32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","A"],"output":-32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["5","0"],"output":-5},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":[".","?"],"output":17}]},{"name":"Cyclic Iterator","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/cyclic-iterator/parsons.xml","tests":[{"name":"block should return a function","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1"},{"name":"sequence should start with the first value in the list","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1messagemsg
1
2424
"},{"name":"sequence should remember position","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn797"},{"name":"sequence should restart after reaching the end","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn777"}]},{"name":"Factorial","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/factorial/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[5],"output":120},{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[0],"output":1},{"type":"CustomBlockTest","name":"should compute the factorial of an unknown input","spec":"factorial %'num'","inputs":[7],"output":5040}]},{"name":"FizzBuzz","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/fizz-buzz/template.xml","tests":[{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[1],"output":1},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-39],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[3],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-50],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[5],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-150],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[15],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[0],"output":"fizzbuzz"}]},{"name":"From Infinite Sequences to Finite Lists","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/take-collect-sequences/parsons.xml","tests":[]},{"name":"Greet","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/greet/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"greet %'person'","name":"greet %'person' should start with \"Hello,\"","function":"blockBrian15Hello"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Bob"],"output":"Hello, Bob!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Alice"],"output":"Hello, Alice!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Cliff"],"output":"Hello, Cliff!"}]},{"name":"Intro to Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/intro-infinite-sequences/parsons.xml","tests":[{"name":"sequence should start with 1","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fnmessagemsg
1
"},{"name":"sequence should remember current position","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"},{"name":"sequence should produce counting numbers","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fntrue"},{"name":"two sequences should iterate independently","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"}]},{"name":"Isogram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/isogram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["letter"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["a"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["arraigning"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect first-order isogram","function":"blocksunflower"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect second-order isogram","function":"blockhorseshoer"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect third-order isogram","function":"blockgeggee"}]},{"name":"Leap Year","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/leap-year/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2015],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1970],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1996],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1960],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2100],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1900],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2000],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2400],"output":true}]},{"name":"Luhn Formula","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/luhn-formula/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"single digits cannot be valid","inputs":["8"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid credit card","inputs":["8273 1232 7352 0569"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"text with non digit is invalid","inputs":["059a"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid long number with even remainder","inputs":["1 2345 6789 1234 5678 9012"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with even digits","inputs":["095 245 88"],"output":true},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with odd number of spaces","inputs":["234 567 891 234"],"output":true}]},{"name":"Mapping Over Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/map-sequence/parsons.xml","tests":[{"name":"map should return another sequence","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map2messagemsg
"},{"name":"new sequence should contain transformed values","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map
by threes3i110true
"}]},{"name":"Minesweeper","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/minesweeper/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","*",""],["*","",""],["","*","*"]]],"output":[[2,"*",1],["*",4,3],[2,"*","*"]],"name":"board w/ mine counts on square board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*"],["*",""],["","*"]]],"output":[["*","*"],["*",4],[2,"*"]],"name":"board w/ mine counts on rectangle board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*","*"],["*","","*"],["","*",""]]],"output":[["*","*","*"],["*",6,"*"],[2,"*",2]],"name":"board w/ mine counts on dense board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","","",""],["","","","*"],["","","",""]]],"output":[[0,0,1,1],[0,0,1,"*"],[0,0,1,1]],"name":"board w/ mine counts on sparse board"}]},{"name":"Moving Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/moving-average/parsons.xml","tests":[{"name":"moving average block should return a list","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn1112"},{"name":"moving average should be computed correctly","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn-104176311.666666666666666744.666666666666667"}]},{"name":"Pangram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/pangram/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","inputs":[""],"output":false},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"lowercase pangram","inputs":["abcdefghijklmnopqrstuvwxyz"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"mixed case pangram","inputs":["abcdefghijkLMNOPQRSTUVWXYZ"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"pangram with extra symbols","inputs":["the quick brown fox jumps over a lazy dog!"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"missing a letter","inputs":["abcdefghijkLMNOPQRSTUVWYZ"],"output":false}]},{"name":"Sieve of Eratosthenes","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sieve/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should not consider 1 prime","inputs":[1],"output":[]},{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should find the all primes up to 5","inputs":[5],"output":[2,3,5]},{"type":"CustomBlockTest","name":"should find the all primes up to 30","spec":"factorial %'num'","inputs":[30],"output":[2,3,5,7,11,13,17,19,23,29]}]},{"name":"Sliding Windows","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sliding-windows/template.xml","tests":[]},{"name":"Transposing Music","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/transpose-music/template.xml","tests":[{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["78","1"],"output":"79","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["84","-2"],"output":"82","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["36","5"],"output":"41","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["C2","5"],"output":"41","name":"should accept note names (e.g., \"C4\")"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["50","0"],"output":"50","name":"should return original note when transposing by 0"}]},{"name":"Vigenere Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/vigenere/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["how are you?",["1","2","3","4"]],"output":"iqz$bth$zqxC"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["cba",["1","2","3"]],"output":"ddd"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["wow, negative keys?",["-2","-5","-3"]],"output":"ujt*\u001bkcb^rdsc\u001bhctp="},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["what large keys!",["100","200","300"]],"output":"[0\rXh\u0018E:\u0013Ih\u0017IA\u001f\u0005"}]}]}; const [ide] = world.children; class CustomBlockAutograder extends Extension { diff --git a/docs/autograders/average-list.js b/docs/autograders/average-list.js index 46e98cb..2a05df6 100644 --- a/docs/autograders/average-list.js +++ b/docs/autograders/average-list.js @@ -2,7 +2,7 @@ ScrollFrameMorph, nop, HandleMorph, List, Extension, ToggleMorph, BlockMorph, Color, SpriteMorph, localize, TextMorph, MorphicPreferences, WHITE*/ (function() { - const config = {"name":"NetsBlox Exercises","assignments":[{"name":"Acronym","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/acronym/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["I Don't Know"],"output":"IDK"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["President Of The United States"],"output":"POTUS"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Shaking My Head"],"output":"SMH"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Agnetha, Bjorn, Benny, Anni-Frid"],"output":"ABBA"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Zone Improvement Plan"],"output":"ZIP"}]},{"name":"Actor's Birthday","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/actor-birthday/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Keanu Reeves"],"output":"1964-09-02"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Meryl Streep"],"output":"1949-06-22"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Denzel Washington"],"output":"1954-12-28"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Lin-Manuel Miranda"],"output":"1980-01-16"}]},{"name":"Anagram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/anagram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["shepherd","spider"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","ccat"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["olive","ilove"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","CAT"],"output":true}]},{"name":"Atbash Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/atbash/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["abc"],"output":"zyx"},{"name":"should preserve letter case","type":"CustomBlockTest","spec":"encrypt %'message'","function":"iterator fnXYZCBA"},{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["$?! +@"],"output":"$?! +@","name":"should preserve non-letters such as punctuation"}]},{"name":"Between","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/between/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[1,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[3,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,3,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[-6,-5,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[20,-5,5],"output":false}]},{"name":"Bigram Autocomplete","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/bigram-autocomplete/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list","function":"fncatcab"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list with 26 rows","function":"fncatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should contain rows that sum to 100","function":"fn100.5rowcatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return correct probabilities","function":"fn5013catcabchechi"}]},{"name":"Caesar Shift","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/caesar-shift/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["abc",2],"output":"cde"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",100],"output":"()*"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",-50],"output":"\u0012\u0013\u0014"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["with spaces",10],"output":"\u0001s~r*}zkmo}"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["no shift!",0],"output":"no shift!"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["negative wrapping!",-200],"output":"&\u001d\u001f\u0019,!.\u001dX/*\u0019((!&\u001fY"}]},{"name":"Compute the Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average/parsons.xml","tests":[]},{"name":"Compute the Average of a List","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average-list/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","1"]],"output":"1"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","2"]],"output":"1.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["-1","2","4","-3"]],"output":"0.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32"]],"output":-7.4},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32","54"]],"output":2.8333333333333335}]},{"name":"Counting Letter Frequency","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","function":"countabcc11200000000000000000000000"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","function":"counta b ! c26"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","function":"countaAbBcCzZ22200000000000000000000002"}]},{"name":"Counting Letter Frequency as Dictionary","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency-dictionary/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","inputs":["abcc"],"output":[["a",1],["b",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","inputs":["a4cc"],"output":[["a",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","inputs":["xyzZ"],"output":[["x",1],["y",1],["z",2]]}]},{"name":"Cracking the Caesar Shift with Brute Force","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-brute-force/parsons.xml","tests":[{"type":"CustomBlockTest","name":"it should find key when starts with a search word","spec":"find key where %'msg' contains %'words'","function":"code breakerhello world2messagemsg
hello2
"},{"name":"it should find key when using multiple search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces15messagemsg
hellowith15
"},{"name":"it should find key when ends with one of many search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces33messagemsg
hellospaces33
"},{"name":"it should return -1 if cannot decode message","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerno hidden words3messagemsg
hellospaces-1
"}]},{"name":"Cracking the Caesar Shift with a Partial Solution","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-partial-soln/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","c"],"output":2},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["A","a"],"output":32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","A"],"output":-32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["5","0"],"output":-5},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":[".","?"],"output":17}]},{"name":"Cyclic Iterator","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/cyclic-iterator/parsons.xml","tests":[{"name":"block should return a function","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1"},{"name":"sequence should start with the first value in the list","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1messagemsg
1
2424
"},{"name":"sequence should remember position","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn797"},{"name":"sequence should restart after reaching the end","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn777"}]},{"name":"Factorial","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/factorial/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[5],"output":120},{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[0],"output":1},{"type":"CustomBlockTest","name":"should compute the factorial of an unknown input","spec":"factorial %'num'","inputs":[7],"output":5040}]},{"name":"FizzBuzz","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/fizz-buzz/template.xml","tests":[{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[1],"output":1},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-39],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[3],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-50],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[5],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-150],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[15],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[0],"output":"fizzbuzz"}]},{"name":"From Infinite Sequences to Finite Lists","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/take-collect-sequences/parsons.xml","tests":[]},{"name":"Greet","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/greet/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"greet %'person'","name":"greet %'person' should start with \"Hello,\"","function":"blockBrian15Hello"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Bob"],"output":"Hello, Bob!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Alice"],"output":"Hello, Alice!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Cliff"],"output":"Hello, Cliff!"}]},{"name":"Intro to Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/intro-infinite-sequences/parsons.xml","tests":[{"name":"sequence should start with 1","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fnmessagemsg
1
"},{"name":"sequence should remember current position","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"},{"name":"sequence should produce counting numbers","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fntrue"},{"name":"two sequences should iterate independently","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"}]},{"name":"Isogram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/isogram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["letter"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["a"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["arraigning"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect first-order isogram","function":"blocksunflower"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect second-order isogram","function":"blockhorseshoer"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect third-order isogram","function":"blockgeggee"}]},{"name":"Leap Year","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/leap-year/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2015],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1970],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1996],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1960],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2100],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1900],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2000],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2400],"output":true}]},{"name":"Luhn Formula","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/luhn-formula/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"single digits cannot be valid","inputs":["8"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid credit card","inputs":["8273 1232 7352 0569"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"text with non digit is invalid","inputs":["059a"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid long number with even remainder","inputs":["1 2345 6789 1234 5678 9012"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with even digits","inputs":["095 245 88"],"output":true},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with odd number of spaces","inputs":["234 567 891 234"],"output":true}]},{"name":"Mapping Over Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/map-sequence/parsons.xml","tests":[{"name":"map should return another sequence","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map2messagemsg
"},{"name":"new sequence should contain transformed values","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map
by threes3i110true
"}]},{"name":"Minesweeper","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/minesweeper/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","*",""],["*","",""],["","*","*"]]],"output":[[2,"*",1],["*",4,3],[2,"*","*"]],"name":"board w/ mine counts on square board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*"],["*",""],["","*"]]],"output":[["*","*"],["*",4],[2,"*"]],"name":"board w/ mine counts on rectangle board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*","*"],["*","","*"],["","*",""]]],"output":[["*","*","*"],["*",6,"*"],[2,"*",2]],"name":"board w/ mine counts on dense board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","","",""],["","","","*"],["","","",""]]],"output":[[0,0,1,1],[0,0,1,"*"],[0,0,1,1]],"name":"board w/ mine counts on sparse board"}]},{"name":"Moving Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/moving-average/parsons.xml","tests":[{"name":"moving average block should return a list","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn1112"},{"name":"moving average should be computed correctly","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn-104176311.666666666666666744.666666666666667"}]},{"name":"Pangram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/pangram/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","inputs":[""],"output":false},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"lowercase pangram","inputs":["abcdefghijklmnopqrstuvwxyz"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"mixed case pangram","inputs":["abcdefghijkLMNOPQRSTUVWXYZ"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"pangram with extra symbols","inputs":["the quick brown fox jumps over a lazy dog!"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"missing a letter","inputs":["abcdefghijkLMNOPQRSTUVWYZ"],"output":false}]},{"name":"Sieve of Eratosthenes","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sieve/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should not consider 1 prime","inputs":[1],"output":[]},{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should find the all primes up to 5","inputs":[5],"output":[2,3,5]},{"type":"CustomBlockTest","name":"should find the all primes up to 30","spec":"factorial %'num'","inputs":[30],"output":[2,3,5,7,11,13,17,19,23,29]}]},{"name":"Sliding Windows","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sliding-windows/template.xml","tests":[]},{"name":"Transposing Music","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/transpose-music/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["78","1"],"output":"79","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["84","-2"],"output":"82","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["36","5"],"output":"41","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["C2","5"],"output":"41","name":"should accept note names (e.g., \"C4\")"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["50","0"],"output":"50","name":"should return original note when transposing by 0"}]},{"name":"Vigenere Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/vigenere/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["how are you?",["1","2","3","4"]],"output":"iqz$bth$zqxC"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["cba",["1","2","3"]],"output":"ddd"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["wow, negative keys?",["-2","-5","-3"]],"output":"ujt*\u001bkcb^rdsc\u001bhctp="},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["what large keys!",["100","200","300"]],"output":"[0\rXh\u0018E:\u0013Ih\u0017IA\u001f\u0005"}]}]}; + const config = {"name":"NetsBlox Exercises","assignments":[{"name":"Acronym","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/acronym/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["I Don't Know"],"output":"IDK"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["President Of The United States"],"output":"POTUS"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Shaking My Head"],"output":"SMH"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Agnetha, Bjorn, Benny, Anni-Frid"],"output":"ABBA"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Zone Improvement Plan"],"output":"ZIP"}]},{"name":"Actor's Birthday","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/actor-birthday/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Keanu Reeves"],"output":"1964-09-02"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Meryl Streep"],"output":"1949-06-22"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Denzel Washington"],"output":"1954-12-28"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Lin-Manuel Miranda"],"output":"1980-01-16"}]},{"name":"Anagram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/anagram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["shepherd","spider"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","ccat"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["olive","ilove"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","CAT"],"output":true}]},{"name":"Atbash Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/atbash/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["abc"],"output":"zyx"},{"name":"should preserve letter case","type":"CustomBlockTest","spec":"encrypt %'message'","function":"iterator fnXYZCBA"},{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["$?! +@"],"output":"$?! +@","name":"should preserve non-letters such as punctuation"}]},{"name":"Between","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/between/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[1,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[3,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,3,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[-6,-5,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[20,-5,5],"output":false}]},{"name":"Bigram Autocomplete","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/bigram-autocomplete/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list","function":"fncatcab"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list with 26 rows","function":"fncatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should contain rows that sum to 100","function":"fn100.5rowcatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return correct probabilities","function":"fn5013catcabchechi"}]},{"name":"Caesar Shift","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/caesar-shift/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["abc",2],"output":"cde"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",100],"output":"()*"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",-50],"output":"\u0012\u0013\u0014"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["with spaces",10],"output":"\u0001s~r*}zkmo}"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["no shift!",0],"output":"no shift!"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["negative wrapping!",-200],"output":"&\u001d\u001f\u0019,!.\u001dX/*\u0019((!&\u001fY"}]},{"name":"Compute the Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average/parsons.xml","tests":[]},{"name":"Compute the Average of a List","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average-list/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","1"]],"output":"1"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","2"]],"output":"1.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["-1","2","4","-3"]],"output":"0.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32"]],"output":-7.4},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32","54"]],"output":2.8333333333333335}]},{"name":"Counting Letter Frequency","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","function":"countabcc11200000000000000000000000"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","function":"counta b ! c26"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","function":"countaAbBcCzZ22200000000000000000000002"}]},{"name":"Counting Letter Frequency as Dictionary","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency-dictionary/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","inputs":["abcc"],"output":[["a",1],["b",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","inputs":["a4cc"],"output":[["a",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","inputs":["xyzZ"],"output":[["x",1],["y",1],["z",2]]}]},{"name":"Cracking the Caesar Shift with Brute Force","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-brute-force/parsons.xml","tests":[{"type":"CustomBlockTest","name":"it should find key when starts with a search word","spec":"find key where %'msg' contains %'words'","function":"code breakerhello world2messagemsg
hello2
"},{"name":"it should find key when using multiple search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces15messagemsg
hellowith15
"},{"name":"it should find key when ends with one of many search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces33messagemsg
hellospaces33
"},{"name":"it should return -1 if cannot decode message","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerno hidden words3messagemsg
hellospaces-1
"}]},{"name":"Cracking the Caesar Shift with a Partial Solution","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-partial-soln/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","c"],"output":2},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["A","a"],"output":32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","A"],"output":-32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["5","0"],"output":-5},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":[".","?"],"output":17}]},{"name":"Cyclic Iterator","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/cyclic-iterator/parsons.xml","tests":[{"name":"block should return a function","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1"},{"name":"sequence should start with the first value in the list","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1messagemsg
1
2424
"},{"name":"sequence should remember position","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn797"},{"name":"sequence should restart after reaching the end","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn777"}]},{"name":"Factorial","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/factorial/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[5],"output":120},{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[0],"output":1},{"type":"CustomBlockTest","name":"should compute the factorial of an unknown input","spec":"factorial %'num'","inputs":[7],"output":5040}]},{"name":"FizzBuzz","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/fizz-buzz/template.xml","tests":[{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[1],"output":1},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-39],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[3],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-50],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[5],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-150],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[15],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[0],"output":"fizzbuzz"}]},{"name":"From Infinite Sequences to Finite Lists","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/take-collect-sequences/parsons.xml","tests":[]},{"name":"Greet","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/greet/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"greet %'person'","name":"greet %'person' should start with \"Hello,\"","function":"blockBrian15Hello"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Bob"],"output":"Hello, Bob!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Alice"],"output":"Hello, Alice!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Cliff"],"output":"Hello, Cliff!"}]},{"name":"Intro to Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/intro-infinite-sequences/parsons.xml","tests":[{"name":"sequence should start with 1","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fnmessagemsg
1
"},{"name":"sequence should remember current position","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"},{"name":"sequence should produce counting numbers","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fntrue"},{"name":"two sequences should iterate independently","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"}]},{"name":"Isogram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/isogram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["letter"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["a"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["arraigning"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect first-order isogram","function":"blocksunflower"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect second-order isogram","function":"blockhorseshoer"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect third-order isogram","function":"blockgeggee"}]},{"name":"Leap Year","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/leap-year/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2015],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1970],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1996],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1960],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2100],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1900],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2000],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2400],"output":true}]},{"name":"Luhn Formula","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/luhn-formula/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"single digits cannot be valid","inputs":["8"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid credit card","inputs":["8273 1232 7352 0569"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"text with non digit is invalid","inputs":["059a"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid long number with even remainder","inputs":["1 2345 6789 1234 5678 9012"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with even digits","inputs":["095 245 88"],"output":true},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with odd number of spaces","inputs":["234 567 891 234"],"output":true}]},{"name":"Mapping Over Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/map-sequence/parsons.xml","tests":[{"name":"map should return another sequence","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map2messagemsg
"},{"name":"new sequence should contain transformed values","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map
by threes3i110true
"}]},{"name":"Minesweeper","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/minesweeper/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","*",""],["*","",""],["","*","*"]]],"output":[[2,"*",1],["*",4,3],[2,"*","*"]],"name":"board w/ mine counts on square board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*"],["*",""],["","*"]]],"output":[["*","*"],["*",4],[2,"*"]],"name":"board w/ mine counts on rectangle board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*","*"],["*","","*"],["","*",""]]],"output":[["*","*","*"],["*",6,"*"],[2,"*",2]],"name":"board w/ mine counts on dense board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","","",""],["","","","*"],["","","",""]]],"output":[[0,0,1,1],[0,0,1,"*"],[0,0,1,1]],"name":"board w/ mine counts on sparse board"}]},{"name":"Moving Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/moving-average/parsons.xml","tests":[{"name":"moving average block should return a list","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn1112"},{"name":"moving average should be computed correctly","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn-104176311.666666666666666744.666666666666667"}]},{"name":"Pangram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/pangram/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","inputs":[""],"output":false},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"lowercase pangram","inputs":["abcdefghijklmnopqrstuvwxyz"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"mixed case pangram","inputs":["abcdefghijkLMNOPQRSTUVWXYZ"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"pangram with extra symbols","inputs":["the quick brown fox jumps over a lazy dog!"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"missing a letter","inputs":["abcdefghijkLMNOPQRSTUVWYZ"],"output":false}]},{"name":"Sieve of Eratosthenes","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sieve/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should not consider 1 prime","inputs":[1],"output":[]},{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should find the all primes up to 5","inputs":[5],"output":[2,3,5]},{"type":"CustomBlockTest","name":"should find the all primes up to 30","spec":"factorial %'num'","inputs":[30],"output":[2,3,5,7,11,13,17,19,23,29]}]},{"name":"Sliding Windows","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sliding-windows/template.xml","tests":[]},{"name":"Transposing Music","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/transpose-music/template.xml","tests":[{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["78","1"],"output":"79","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["84","-2"],"output":"82","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["36","5"],"output":"41","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["C2","5"],"output":"41","name":"should accept note names (e.g., \"C4\")"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["50","0"],"output":"50","name":"should return original note when transposing by 0"}]},{"name":"Vigenere Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/vigenere/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["how are you?",["1","2","3","4"]],"output":"iqz$bth$zqxC"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["cba",["1","2","3"]],"output":"ddd"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["wow, negative keys?",["-2","-5","-3"]],"output":"ujt*\u001bkcb^rdsc\u001bhctp="},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["what large keys!",["100","200","300"]],"output":"[0\rXh\u0018E:\u0013Ih\u0017IA\u001f\u0005"}]}]}; const [ide] = world.children; class CustomBlockAutograder extends Extension { diff --git a/docs/autograders/average.js b/docs/autograders/average.js index 7c04a01..874e1bb 100644 --- a/docs/autograders/average.js +++ b/docs/autograders/average.js @@ -2,7 +2,7 @@ ScrollFrameMorph, nop, HandleMorph, List, Extension, ToggleMorph, BlockMorph, Color, SpriteMorph, localize, TextMorph, MorphicPreferences, WHITE*/ (function() { - const config = {"name":"NetsBlox Exercises","assignments":[{"name":"Acronym","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/acronym/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["I Don't Know"],"output":"IDK"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["President Of The United States"],"output":"POTUS"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Shaking My Head"],"output":"SMH"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Agnetha, Bjorn, Benny, Anni-Frid"],"output":"ABBA"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Zone Improvement Plan"],"output":"ZIP"}]},{"name":"Actor's Birthday","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/actor-birthday/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Keanu Reeves"],"output":"1964-09-02"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Meryl Streep"],"output":"1949-06-22"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Denzel Washington"],"output":"1954-12-28"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Lin-Manuel Miranda"],"output":"1980-01-16"}]},{"name":"Anagram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/anagram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["shepherd","spider"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","ccat"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["olive","ilove"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","CAT"],"output":true}]},{"name":"Atbash Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/atbash/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["abc"],"output":"zyx"},{"name":"should preserve letter case","type":"CustomBlockTest","spec":"encrypt %'message'","function":"iterator fnXYZCBA"},{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["$?! +@"],"output":"$?! +@","name":"should preserve non-letters such as punctuation"}]},{"name":"Between","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/between/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[1,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[3,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,3,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[-6,-5,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[20,-5,5],"output":false}]},{"name":"Bigram Autocomplete","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/bigram-autocomplete/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list","function":"fncatcab"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list with 26 rows","function":"fncatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should contain rows that sum to 100","function":"fn100.5rowcatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return correct probabilities","function":"fn5013catcabchechi"}]},{"name":"Caesar Shift","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/caesar-shift/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["abc",2],"output":"cde"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",100],"output":"()*"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",-50],"output":"\u0012\u0013\u0014"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["with spaces",10],"output":"\u0001s~r*}zkmo}"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["no shift!",0],"output":"no shift!"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["negative wrapping!",-200],"output":"&\u001d\u001f\u0019,!.\u001dX/*\u0019((!&\u001fY"}]},{"name":"Compute the Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average/parsons.xml","tests":[]},{"name":"Compute the Average of a List","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average-list/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","1"]],"output":"1"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","2"]],"output":"1.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["-1","2","4","-3"]],"output":"0.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32"]],"output":-7.4},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32","54"]],"output":2.8333333333333335}]},{"name":"Counting Letter Frequency","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","function":"countabcc11200000000000000000000000"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","function":"counta b ! c26"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","function":"countaAbBcCzZ22200000000000000000000002"}]},{"name":"Counting Letter Frequency as Dictionary","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency-dictionary/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","inputs":["abcc"],"output":[["a",1],["b",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","inputs":["a4cc"],"output":[["a",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","inputs":["xyzZ"],"output":[["x",1],["y",1],["z",2]]}]},{"name":"Cracking the Caesar Shift with Brute Force","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-brute-force/parsons.xml","tests":[{"type":"CustomBlockTest","name":"it should find key when starts with a search word","spec":"find key where %'msg' contains %'words'","function":"code breakerhello world2messagemsg
hello2
"},{"name":"it should find key when using multiple search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces15messagemsg
hellowith15
"},{"name":"it should find key when ends with one of many search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces33messagemsg
hellospaces33
"},{"name":"it should return -1 if cannot decode message","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerno hidden words3messagemsg
hellospaces-1
"}]},{"name":"Cracking the Caesar Shift with a Partial Solution","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-partial-soln/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","c"],"output":2},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["A","a"],"output":32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","A"],"output":-32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["5","0"],"output":-5},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":[".","?"],"output":17}]},{"name":"Cyclic Iterator","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/cyclic-iterator/parsons.xml","tests":[{"name":"block should return a function","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1"},{"name":"sequence should start with the first value in the list","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1messagemsg
1
2424
"},{"name":"sequence should remember position","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn797"},{"name":"sequence should restart after reaching the end","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn777"}]},{"name":"Factorial","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/factorial/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[5],"output":120},{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[0],"output":1},{"type":"CustomBlockTest","name":"should compute the factorial of an unknown input","spec":"factorial %'num'","inputs":[7],"output":5040}]},{"name":"FizzBuzz","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/fizz-buzz/template.xml","tests":[{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[1],"output":1},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-39],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[3],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-50],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[5],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-150],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[15],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[0],"output":"fizzbuzz"}]},{"name":"From Infinite Sequences to Finite Lists","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/take-collect-sequences/parsons.xml","tests":[]},{"name":"Greet","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/greet/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"greet %'person'","name":"greet %'person' should start with \"Hello,\"","function":"blockBrian15Hello"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Bob"],"output":"Hello, Bob!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Alice"],"output":"Hello, Alice!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Cliff"],"output":"Hello, Cliff!"}]},{"name":"Intro to Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/intro-infinite-sequences/parsons.xml","tests":[{"name":"sequence should start with 1","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fnmessagemsg
1
"},{"name":"sequence should remember current position","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"},{"name":"sequence should produce counting numbers","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fntrue"},{"name":"two sequences should iterate independently","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"}]},{"name":"Isogram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/isogram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["letter"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["a"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["arraigning"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect first-order isogram","function":"blocksunflower"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect second-order isogram","function":"blockhorseshoer"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect third-order isogram","function":"blockgeggee"}]},{"name":"Leap Year","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/leap-year/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2015],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1970],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1996],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1960],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2100],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1900],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2000],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2400],"output":true}]},{"name":"Luhn Formula","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/luhn-formula/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"single digits cannot be valid","inputs":["8"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid credit card","inputs":["8273 1232 7352 0569"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"text with non digit is invalid","inputs":["059a"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid long number with even remainder","inputs":["1 2345 6789 1234 5678 9012"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with even digits","inputs":["095 245 88"],"output":true},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with odd number of spaces","inputs":["234 567 891 234"],"output":true}]},{"name":"Mapping Over Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/map-sequence/parsons.xml","tests":[{"name":"map should return another sequence","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map2messagemsg
"},{"name":"new sequence should contain transformed values","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map
by threes3i110true
"}]},{"name":"Minesweeper","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/minesweeper/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","*",""],["*","",""],["","*","*"]]],"output":[[2,"*",1],["*",4,3],[2,"*","*"]],"name":"board w/ mine counts on square board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*"],["*",""],["","*"]]],"output":[["*","*"],["*",4],[2,"*"]],"name":"board w/ mine counts on rectangle board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*","*"],["*","","*"],["","*",""]]],"output":[["*","*","*"],["*",6,"*"],[2,"*",2]],"name":"board w/ mine counts on dense board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","","",""],["","","","*"],["","","",""]]],"output":[[0,0,1,1],[0,0,1,"*"],[0,0,1,1]],"name":"board w/ mine counts on sparse board"}]},{"name":"Moving Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/moving-average/parsons.xml","tests":[{"name":"moving average block should return a list","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn1112"},{"name":"moving average should be computed correctly","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn-104176311.666666666666666744.666666666666667"}]},{"name":"Pangram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/pangram/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","inputs":[""],"output":false},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"lowercase pangram","inputs":["abcdefghijklmnopqrstuvwxyz"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"mixed case pangram","inputs":["abcdefghijkLMNOPQRSTUVWXYZ"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"pangram with extra symbols","inputs":["the quick brown fox jumps over a lazy dog!"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"missing a letter","inputs":["abcdefghijkLMNOPQRSTUVWYZ"],"output":false}]},{"name":"Sieve of Eratosthenes","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sieve/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should not consider 1 prime","inputs":[1],"output":[]},{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should find the all primes up to 5","inputs":[5],"output":[2,3,5]},{"type":"CustomBlockTest","name":"should find the all primes up to 30","spec":"factorial %'num'","inputs":[30],"output":[2,3,5,7,11,13,17,19,23,29]}]},{"name":"Sliding Windows","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sliding-windows/template.xml","tests":[]},{"name":"Transposing Music","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/transpose-music/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["78","1"],"output":"79","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["84","-2"],"output":"82","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["36","5"],"output":"41","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["C2","5"],"output":"41","name":"should accept note names (e.g., \"C4\")"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["50","0"],"output":"50","name":"should return original note when transposing by 0"}]},{"name":"Vigenere Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/vigenere/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["how are you?",["1","2","3","4"]],"output":"iqz$bth$zqxC"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["cba",["1","2","3"]],"output":"ddd"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["wow, negative keys?",["-2","-5","-3"]],"output":"ujt*\u001bkcb^rdsc\u001bhctp="},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["what large keys!",["100","200","300"]],"output":"[0\rXh\u0018E:\u0013Ih\u0017IA\u001f\u0005"}]}]}; + const config = {"name":"NetsBlox Exercises","assignments":[{"name":"Acronym","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/acronym/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["I Don't Know"],"output":"IDK"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["President Of The United States"],"output":"POTUS"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Shaking My Head"],"output":"SMH"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Agnetha, Bjorn, Benny, Anni-Frid"],"output":"ABBA"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Zone Improvement Plan"],"output":"ZIP"}]},{"name":"Actor's Birthday","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/actor-birthday/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Keanu Reeves"],"output":"1964-09-02"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Meryl Streep"],"output":"1949-06-22"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Denzel Washington"],"output":"1954-12-28"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Lin-Manuel Miranda"],"output":"1980-01-16"}]},{"name":"Anagram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/anagram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["shepherd","spider"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","ccat"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["olive","ilove"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","CAT"],"output":true}]},{"name":"Atbash Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/atbash/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["abc"],"output":"zyx"},{"name":"should preserve letter case","type":"CustomBlockTest","spec":"encrypt %'message'","function":"iterator fnXYZCBA"},{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["$?! +@"],"output":"$?! +@","name":"should preserve non-letters such as punctuation"}]},{"name":"Between","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/between/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[1,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[3,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,3,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[-6,-5,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[20,-5,5],"output":false}]},{"name":"Bigram Autocomplete","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/bigram-autocomplete/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list","function":"fncatcab"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list with 26 rows","function":"fncatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should contain rows that sum to 100","function":"fn100.5rowcatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return correct probabilities","function":"fn5013catcabchechi"}]},{"name":"Caesar Shift","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/caesar-shift/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["abc",2],"output":"cde"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",100],"output":"()*"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",-50],"output":"\u0012\u0013\u0014"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["with spaces",10],"output":"\u0001s~r*}zkmo}"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["no shift!",0],"output":"no shift!"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["negative wrapping!",-200],"output":"&\u001d\u001f\u0019,!.\u001dX/*\u0019((!&\u001fY"}]},{"name":"Compute the Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average/parsons.xml","tests":[]},{"name":"Compute the Average of a List","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average-list/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","1"]],"output":"1"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","2"]],"output":"1.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["-1","2","4","-3"]],"output":"0.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32"]],"output":-7.4},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32","54"]],"output":2.8333333333333335}]},{"name":"Counting Letter Frequency","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","function":"countabcc11200000000000000000000000"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","function":"counta b ! c26"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","function":"countaAbBcCzZ22200000000000000000000002"}]},{"name":"Counting Letter Frequency as Dictionary","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency-dictionary/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","inputs":["abcc"],"output":[["a",1],["b",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","inputs":["a4cc"],"output":[["a",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","inputs":["xyzZ"],"output":[["x",1],["y",1],["z",2]]}]},{"name":"Cracking the Caesar Shift with Brute Force","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-brute-force/parsons.xml","tests":[{"type":"CustomBlockTest","name":"it should find key when starts with a search word","spec":"find key where %'msg' contains %'words'","function":"code breakerhello world2messagemsg
hello2
"},{"name":"it should find key when using multiple search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces15messagemsg
hellowith15
"},{"name":"it should find key when ends with one of many search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces33messagemsg
hellospaces33
"},{"name":"it should return -1 if cannot decode message","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerno hidden words3messagemsg
hellospaces-1
"}]},{"name":"Cracking the Caesar Shift with a Partial Solution","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-partial-soln/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","c"],"output":2},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["A","a"],"output":32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","A"],"output":-32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["5","0"],"output":-5},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":[".","?"],"output":17}]},{"name":"Cyclic Iterator","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/cyclic-iterator/parsons.xml","tests":[{"name":"block should return a function","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1"},{"name":"sequence should start with the first value in the list","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1messagemsg
1
2424
"},{"name":"sequence should remember position","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn797"},{"name":"sequence should restart after reaching the end","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn777"}]},{"name":"Factorial","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/factorial/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[5],"output":120},{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[0],"output":1},{"type":"CustomBlockTest","name":"should compute the factorial of an unknown input","spec":"factorial %'num'","inputs":[7],"output":5040}]},{"name":"FizzBuzz","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/fizz-buzz/template.xml","tests":[{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[1],"output":1},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-39],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[3],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-50],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[5],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-150],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[15],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[0],"output":"fizzbuzz"}]},{"name":"From Infinite Sequences to Finite Lists","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/take-collect-sequences/parsons.xml","tests":[]},{"name":"Greet","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/greet/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"greet %'person'","name":"greet %'person' should start with \"Hello,\"","function":"blockBrian15Hello"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Bob"],"output":"Hello, Bob!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Alice"],"output":"Hello, Alice!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Cliff"],"output":"Hello, Cliff!"}]},{"name":"Intro to Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/intro-infinite-sequences/parsons.xml","tests":[{"name":"sequence should start with 1","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fnmessagemsg
1
"},{"name":"sequence should remember current position","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"},{"name":"sequence should produce counting numbers","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fntrue"},{"name":"two sequences should iterate independently","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"}]},{"name":"Isogram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/isogram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["letter"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["a"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["arraigning"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect first-order isogram","function":"blocksunflower"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect second-order isogram","function":"blockhorseshoer"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect third-order isogram","function":"blockgeggee"}]},{"name":"Leap Year","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/leap-year/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2015],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1970],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1996],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1960],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2100],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1900],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2000],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2400],"output":true}]},{"name":"Luhn Formula","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/luhn-formula/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"single digits cannot be valid","inputs":["8"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid credit card","inputs":["8273 1232 7352 0569"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"text with non digit is invalid","inputs":["059a"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid long number with even remainder","inputs":["1 2345 6789 1234 5678 9012"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with even digits","inputs":["095 245 88"],"output":true},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with odd number of spaces","inputs":["234 567 891 234"],"output":true}]},{"name":"Mapping Over Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/map-sequence/parsons.xml","tests":[{"name":"map should return another sequence","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map2messagemsg
"},{"name":"new sequence should contain transformed values","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map
by threes3i110true
"}]},{"name":"Minesweeper","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/minesweeper/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","*",""],["*","",""],["","*","*"]]],"output":[[2,"*",1],["*",4,3],[2,"*","*"]],"name":"board w/ mine counts on square board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*"],["*",""],["","*"]]],"output":[["*","*"],["*",4],[2,"*"]],"name":"board w/ mine counts on rectangle board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*","*"],["*","","*"],["","*",""]]],"output":[["*","*","*"],["*",6,"*"],[2,"*",2]],"name":"board w/ mine counts on dense board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","","",""],["","","","*"],["","","",""]]],"output":[[0,0,1,1],[0,0,1,"*"],[0,0,1,1]],"name":"board w/ mine counts on sparse board"}]},{"name":"Moving Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/moving-average/parsons.xml","tests":[{"name":"moving average block should return a list","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn1112"},{"name":"moving average should be computed correctly","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn-104176311.666666666666666744.666666666666667"}]},{"name":"Pangram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/pangram/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","inputs":[""],"output":false},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"lowercase pangram","inputs":["abcdefghijklmnopqrstuvwxyz"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"mixed case pangram","inputs":["abcdefghijkLMNOPQRSTUVWXYZ"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"pangram with extra symbols","inputs":["the quick brown fox jumps over a lazy dog!"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"missing a letter","inputs":["abcdefghijkLMNOPQRSTUVWYZ"],"output":false}]},{"name":"Sieve of Eratosthenes","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sieve/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should not consider 1 prime","inputs":[1],"output":[]},{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should find the all primes up to 5","inputs":[5],"output":[2,3,5]},{"type":"CustomBlockTest","name":"should find the all primes up to 30","spec":"factorial %'num'","inputs":[30],"output":[2,3,5,7,11,13,17,19,23,29]}]},{"name":"Sliding Windows","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sliding-windows/template.xml","tests":[]},{"name":"Transposing Music","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/transpose-music/template.xml","tests":[{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["78","1"],"output":"79","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["84","-2"],"output":"82","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["36","5"],"output":"41","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["C2","5"],"output":"41","name":"should accept note names (e.g., \"C4\")"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["50","0"],"output":"50","name":"should return original note when transposing by 0"}]},{"name":"Vigenere Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/vigenere/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["how are you?",["1","2","3","4"]],"output":"iqz$bth$zqxC"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["cba",["1","2","3"]],"output":"ddd"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["wow, negative keys?",["-2","-5","-3"]],"output":"ujt*\u001bkcb^rdsc\u001bhctp="},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["what large keys!",["100","200","300"]],"output":"[0\rXh\u0018E:\u0013Ih\u0017IA\u001f\u0005"}]}]}; const [ide] = world.children; class CustomBlockAutograder extends Extension { diff --git a/docs/autograders/between.js b/docs/autograders/between.js index 40ca331..ebbfb4d 100644 --- a/docs/autograders/between.js +++ b/docs/autograders/between.js @@ -2,7 +2,7 @@ ScrollFrameMorph, nop, HandleMorph, List, Extension, ToggleMorph, BlockMorph, Color, SpriteMorph, localize, TextMorph, MorphicPreferences, WHITE*/ (function() { - const config = {"name":"NetsBlox Exercises","assignments":[{"name":"Acronym","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/acronym/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["I Don't Know"],"output":"IDK"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["President Of The United States"],"output":"POTUS"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Shaking My Head"],"output":"SMH"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Agnetha, Bjorn, Benny, Anni-Frid"],"output":"ABBA"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Zone Improvement Plan"],"output":"ZIP"}]},{"name":"Actor's Birthday","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/actor-birthday/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Keanu Reeves"],"output":"1964-09-02"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Meryl Streep"],"output":"1949-06-22"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Denzel Washington"],"output":"1954-12-28"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Lin-Manuel Miranda"],"output":"1980-01-16"}]},{"name":"Anagram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/anagram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["shepherd","spider"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","ccat"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["olive","ilove"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","CAT"],"output":true}]},{"name":"Atbash Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/atbash/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["abc"],"output":"zyx"},{"name":"should preserve letter case","type":"CustomBlockTest","spec":"encrypt %'message'","function":"iterator fnXYZCBA"},{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["$?! +@"],"output":"$?! +@","name":"should preserve non-letters such as punctuation"}]},{"name":"Between","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/between/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[1,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[3,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,3,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[-6,-5,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[20,-5,5],"output":false}]},{"name":"Bigram Autocomplete","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/bigram-autocomplete/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list","function":"fncatcab"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list with 26 rows","function":"fncatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should contain rows that sum to 100","function":"fn100.5rowcatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return correct probabilities","function":"fn5013catcabchechi"}]},{"name":"Caesar Shift","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/caesar-shift/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["abc",2],"output":"cde"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",100],"output":"()*"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",-50],"output":"\u0012\u0013\u0014"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["with spaces",10],"output":"\u0001s~r*}zkmo}"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["no shift!",0],"output":"no shift!"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["negative wrapping!",-200],"output":"&\u001d\u001f\u0019,!.\u001dX/*\u0019((!&\u001fY"}]},{"name":"Compute the Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average/parsons.xml","tests":[]},{"name":"Compute the Average of a List","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average-list/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","1"]],"output":"1"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","2"]],"output":"1.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["-1","2","4","-3"]],"output":"0.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32"]],"output":-7.4},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32","54"]],"output":2.8333333333333335}]},{"name":"Counting Letter Frequency","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","function":"countabcc11200000000000000000000000"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","function":"counta b ! c26"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","function":"countaAbBcCzZ22200000000000000000000002"}]},{"name":"Counting Letter Frequency as Dictionary","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency-dictionary/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","inputs":["abcc"],"output":[["a",1],["b",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","inputs":["a4cc"],"output":[["a",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","inputs":["xyzZ"],"output":[["x",1],["y",1],["z",2]]}]},{"name":"Cracking the Caesar Shift with Brute Force","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-brute-force/parsons.xml","tests":[{"type":"CustomBlockTest","name":"it should find key when starts with a search word","spec":"find key where %'msg' contains %'words'","function":"code breakerhello world2messagemsg
hello2
"},{"name":"it should find key when using multiple search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces15messagemsg
hellowith15
"},{"name":"it should find key when ends with one of many search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces33messagemsg
hellospaces33
"},{"name":"it should return -1 if cannot decode message","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerno hidden words3messagemsg
hellospaces-1
"}]},{"name":"Cracking the Caesar Shift with a Partial Solution","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-partial-soln/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","c"],"output":2},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["A","a"],"output":32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","A"],"output":-32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["5","0"],"output":-5},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":[".","?"],"output":17}]},{"name":"Cyclic Iterator","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/cyclic-iterator/parsons.xml","tests":[{"name":"block should return a function","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1"},{"name":"sequence should start with the first value in the list","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1messagemsg
1
2424
"},{"name":"sequence should remember position","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn797"},{"name":"sequence should restart after reaching the end","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn777"}]},{"name":"Factorial","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/factorial/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[5],"output":120},{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[0],"output":1},{"type":"CustomBlockTest","name":"should compute the factorial of an unknown input","spec":"factorial %'num'","inputs":[7],"output":5040}]},{"name":"FizzBuzz","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/fizz-buzz/template.xml","tests":[{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[1],"output":1},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-39],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[3],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-50],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[5],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-150],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[15],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[0],"output":"fizzbuzz"}]},{"name":"From Infinite Sequences to Finite Lists","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/take-collect-sequences/parsons.xml","tests":[]},{"name":"Greet","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/greet/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"greet %'person'","name":"greet %'person' should start with \"Hello,\"","function":"blockBrian15Hello"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Bob"],"output":"Hello, Bob!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Alice"],"output":"Hello, Alice!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Cliff"],"output":"Hello, Cliff!"}]},{"name":"Intro to Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/intro-infinite-sequences/parsons.xml","tests":[{"name":"sequence should start with 1","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fnmessagemsg
1
"},{"name":"sequence should remember current position","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"},{"name":"sequence should produce counting numbers","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fntrue"},{"name":"two sequences should iterate independently","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"}]},{"name":"Isogram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/isogram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["letter"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["a"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["arraigning"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect first-order isogram","function":"blocksunflower"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect second-order isogram","function":"blockhorseshoer"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect third-order isogram","function":"blockgeggee"}]},{"name":"Leap Year","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/leap-year/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2015],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1970],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1996],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1960],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2100],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1900],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2000],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2400],"output":true}]},{"name":"Luhn Formula","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/luhn-formula/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"single digits cannot be valid","inputs":["8"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid credit card","inputs":["8273 1232 7352 0569"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"text with non digit is invalid","inputs":["059a"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid long number with even remainder","inputs":["1 2345 6789 1234 5678 9012"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with even digits","inputs":["095 245 88"],"output":true},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with odd number of spaces","inputs":["234 567 891 234"],"output":true}]},{"name":"Mapping Over Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/map-sequence/parsons.xml","tests":[{"name":"map should return another sequence","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map2messagemsg
"},{"name":"new sequence should contain transformed values","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map
by threes3i110true
"}]},{"name":"Minesweeper","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/minesweeper/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","*",""],["*","",""],["","*","*"]]],"output":[[2,"*",1],["*",4,3],[2,"*","*"]],"name":"board w/ mine counts on square board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*"],["*",""],["","*"]]],"output":[["*","*"],["*",4],[2,"*"]],"name":"board w/ mine counts on rectangle board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*","*"],["*","","*"],["","*",""]]],"output":[["*","*","*"],["*",6,"*"],[2,"*",2]],"name":"board w/ mine counts on dense board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","","",""],["","","","*"],["","","",""]]],"output":[[0,0,1,1],[0,0,1,"*"],[0,0,1,1]],"name":"board w/ mine counts on sparse board"}]},{"name":"Moving Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/moving-average/parsons.xml","tests":[{"name":"moving average block should return a list","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn1112"},{"name":"moving average should be computed correctly","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn-104176311.666666666666666744.666666666666667"}]},{"name":"Pangram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/pangram/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","inputs":[""],"output":false},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"lowercase pangram","inputs":["abcdefghijklmnopqrstuvwxyz"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"mixed case pangram","inputs":["abcdefghijkLMNOPQRSTUVWXYZ"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"pangram with extra symbols","inputs":["the quick brown fox jumps over a lazy dog!"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"missing a letter","inputs":["abcdefghijkLMNOPQRSTUVWYZ"],"output":false}]},{"name":"Sieve of Eratosthenes","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sieve/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should not consider 1 prime","inputs":[1],"output":[]},{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should find the all primes up to 5","inputs":[5],"output":[2,3,5]},{"type":"CustomBlockTest","name":"should find the all primes up to 30","spec":"factorial %'num'","inputs":[30],"output":[2,3,5,7,11,13,17,19,23,29]}]},{"name":"Sliding Windows","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sliding-windows/template.xml","tests":[]},{"name":"Transposing Music","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/transpose-music/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["78","1"],"output":"79","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["84","-2"],"output":"82","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["36","5"],"output":"41","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["C2","5"],"output":"41","name":"should accept note names (e.g., \"C4\")"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["50","0"],"output":"50","name":"should return original note when transposing by 0"}]},{"name":"Vigenere Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/vigenere/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["how are you?",["1","2","3","4"]],"output":"iqz$bth$zqxC"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["cba",["1","2","3"]],"output":"ddd"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["wow, negative keys?",["-2","-5","-3"]],"output":"ujt*\u001bkcb^rdsc\u001bhctp="},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["what large keys!",["100","200","300"]],"output":"[0\rXh\u0018E:\u0013Ih\u0017IA\u001f\u0005"}]}]}; + const config = {"name":"NetsBlox Exercises","assignments":[{"name":"Acronym","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/acronym/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["I Don't Know"],"output":"IDK"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["President Of The United States"],"output":"POTUS"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Shaking My Head"],"output":"SMH"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Agnetha, Bjorn, Benny, Anni-Frid"],"output":"ABBA"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Zone Improvement Plan"],"output":"ZIP"}]},{"name":"Actor's Birthday","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/actor-birthday/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Keanu Reeves"],"output":"1964-09-02"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Meryl Streep"],"output":"1949-06-22"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Denzel Washington"],"output":"1954-12-28"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Lin-Manuel Miranda"],"output":"1980-01-16"}]},{"name":"Anagram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/anagram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["shepherd","spider"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","ccat"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["olive","ilove"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","CAT"],"output":true}]},{"name":"Atbash Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/atbash/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["abc"],"output":"zyx"},{"name":"should preserve letter case","type":"CustomBlockTest","spec":"encrypt %'message'","function":"iterator fnXYZCBA"},{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["$?! +@"],"output":"$?! +@","name":"should preserve non-letters such as punctuation"}]},{"name":"Between","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/between/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[1,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[3,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,3,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[-6,-5,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[20,-5,5],"output":false}]},{"name":"Bigram Autocomplete","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/bigram-autocomplete/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list","function":"fncatcab"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list with 26 rows","function":"fncatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should contain rows that sum to 100","function":"fn100.5rowcatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return correct probabilities","function":"fn5013catcabchechi"}]},{"name":"Caesar Shift","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/caesar-shift/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["abc",2],"output":"cde"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",100],"output":"()*"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",-50],"output":"\u0012\u0013\u0014"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["with spaces",10],"output":"\u0001s~r*}zkmo}"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["no shift!",0],"output":"no shift!"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["negative wrapping!",-200],"output":"&\u001d\u001f\u0019,!.\u001dX/*\u0019((!&\u001fY"}]},{"name":"Compute the Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average/parsons.xml","tests":[]},{"name":"Compute the Average of a List","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average-list/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","1"]],"output":"1"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","2"]],"output":"1.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["-1","2","4","-3"]],"output":"0.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32"]],"output":-7.4},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32","54"]],"output":2.8333333333333335}]},{"name":"Counting Letter Frequency","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","function":"countabcc11200000000000000000000000"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","function":"counta b ! c26"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","function":"countaAbBcCzZ22200000000000000000000002"}]},{"name":"Counting Letter Frequency as Dictionary","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency-dictionary/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","inputs":["abcc"],"output":[["a",1],["b",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","inputs":["a4cc"],"output":[["a",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","inputs":["xyzZ"],"output":[["x",1],["y",1],["z",2]]}]},{"name":"Cracking the Caesar Shift with Brute Force","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-brute-force/parsons.xml","tests":[{"type":"CustomBlockTest","name":"it should find key when starts with a search word","spec":"find key where %'msg' contains %'words'","function":"code breakerhello world2messagemsg
hello2
"},{"name":"it should find key when using multiple search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces15messagemsg
hellowith15
"},{"name":"it should find key when ends with one of many search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces33messagemsg
hellospaces33
"},{"name":"it should return -1 if cannot decode message","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerno hidden words3messagemsg
hellospaces-1
"}]},{"name":"Cracking the Caesar Shift with a Partial Solution","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-partial-soln/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","c"],"output":2},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["A","a"],"output":32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","A"],"output":-32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["5","0"],"output":-5},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":[".","?"],"output":17}]},{"name":"Cyclic Iterator","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/cyclic-iterator/parsons.xml","tests":[{"name":"block should return a function","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1"},{"name":"sequence should start with the first value in the list","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1messagemsg
1
2424
"},{"name":"sequence should remember position","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn797"},{"name":"sequence should restart after reaching the end","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn777"}]},{"name":"Factorial","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/factorial/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[5],"output":120},{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[0],"output":1},{"type":"CustomBlockTest","name":"should compute the factorial of an unknown input","spec":"factorial %'num'","inputs":[7],"output":5040}]},{"name":"FizzBuzz","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/fizz-buzz/template.xml","tests":[{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[1],"output":1},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-39],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[3],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-50],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[5],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-150],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[15],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[0],"output":"fizzbuzz"}]},{"name":"From Infinite Sequences to Finite Lists","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/take-collect-sequences/parsons.xml","tests":[]},{"name":"Greet","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/greet/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"greet %'person'","name":"greet %'person' should start with \"Hello,\"","function":"blockBrian15Hello"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Bob"],"output":"Hello, Bob!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Alice"],"output":"Hello, Alice!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Cliff"],"output":"Hello, Cliff!"}]},{"name":"Intro to Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/intro-infinite-sequences/parsons.xml","tests":[{"name":"sequence should start with 1","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fnmessagemsg
1
"},{"name":"sequence should remember current position","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"},{"name":"sequence should produce counting numbers","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fntrue"},{"name":"two sequences should iterate independently","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"}]},{"name":"Isogram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/isogram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["letter"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["a"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["arraigning"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect first-order isogram","function":"blocksunflower"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect second-order isogram","function":"blockhorseshoer"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect third-order isogram","function":"blockgeggee"}]},{"name":"Leap Year","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/leap-year/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2015],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1970],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1996],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1960],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2100],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1900],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2000],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2400],"output":true}]},{"name":"Luhn Formula","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/luhn-formula/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"single digits cannot be valid","inputs":["8"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid credit card","inputs":["8273 1232 7352 0569"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"text with non digit is invalid","inputs":["059a"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid long number with even remainder","inputs":["1 2345 6789 1234 5678 9012"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with even digits","inputs":["095 245 88"],"output":true},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with odd number of spaces","inputs":["234 567 891 234"],"output":true}]},{"name":"Mapping Over Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/map-sequence/parsons.xml","tests":[{"name":"map should return another sequence","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map2messagemsg
"},{"name":"new sequence should contain transformed values","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map
by threes3i110true
"}]},{"name":"Minesweeper","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/minesweeper/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","*",""],["*","",""],["","*","*"]]],"output":[[2,"*",1],["*",4,3],[2,"*","*"]],"name":"board w/ mine counts on square board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*"],["*",""],["","*"]]],"output":[["*","*"],["*",4],[2,"*"]],"name":"board w/ mine counts on rectangle board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*","*"],["*","","*"],["","*",""]]],"output":[["*","*","*"],["*",6,"*"],[2,"*",2]],"name":"board w/ mine counts on dense board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","","",""],["","","","*"],["","","",""]]],"output":[[0,0,1,1],[0,0,1,"*"],[0,0,1,1]],"name":"board w/ mine counts on sparse board"}]},{"name":"Moving Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/moving-average/parsons.xml","tests":[{"name":"moving average block should return a list","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn1112"},{"name":"moving average should be computed correctly","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn-104176311.666666666666666744.666666666666667"}]},{"name":"Pangram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/pangram/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","inputs":[""],"output":false},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"lowercase pangram","inputs":["abcdefghijklmnopqrstuvwxyz"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"mixed case pangram","inputs":["abcdefghijkLMNOPQRSTUVWXYZ"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"pangram with extra symbols","inputs":["the quick brown fox jumps over a lazy dog!"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"missing a letter","inputs":["abcdefghijkLMNOPQRSTUVWYZ"],"output":false}]},{"name":"Sieve of Eratosthenes","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sieve/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should not consider 1 prime","inputs":[1],"output":[]},{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should find the all primes up to 5","inputs":[5],"output":[2,3,5]},{"type":"CustomBlockTest","name":"should find the all primes up to 30","spec":"factorial %'num'","inputs":[30],"output":[2,3,5,7,11,13,17,19,23,29]}]},{"name":"Sliding Windows","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sliding-windows/template.xml","tests":[]},{"name":"Transposing Music","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/transpose-music/template.xml","tests":[{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["78","1"],"output":"79","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["84","-2"],"output":"82","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["36","5"],"output":"41","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["C2","5"],"output":"41","name":"should accept note names (e.g., \"C4\")"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["50","0"],"output":"50","name":"should return original note when transposing by 0"}]},{"name":"Vigenere Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/vigenere/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["how are you?",["1","2","3","4"]],"output":"iqz$bth$zqxC"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["cba",["1","2","3"]],"output":"ddd"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["wow, negative keys?",["-2","-5","-3"]],"output":"ujt*\u001bkcb^rdsc\u001bhctp="},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["what large keys!",["100","200","300"]],"output":"[0\rXh\u0018E:\u0013Ih\u0017IA\u001f\u0005"}]}]}; const [ide] = world.children; class CustomBlockAutograder extends Extension { diff --git a/docs/autograders/bigram-autocomplete.js b/docs/autograders/bigram-autocomplete.js index 7fa6f7d..099f16e 100644 --- a/docs/autograders/bigram-autocomplete.js +++ b/docs/autograders/bigram-autocomplete.js @@ -2,7 +2,7 @@ ScrollFrameMorph, nop, HandleMorph, List, Extension, ToggleMorph, BlockMorph, Color, SpriteMorph, localize, TextMorph, MorphicPreferences, WHITE*/ (function() { - const config = {"name":"NetsBlox Exercises","assignments":[{"name":"Acronym","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/acronym/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["I Don't Know"],"output":"IDK"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["President Of The United States"],"output":"POTUS"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Shaking My Head"],"output":"SMH"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Agnetha, Bjorn, Benny, Anni-Frid"],"output":"ABBA"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Zone Improvement Plan"],"output":"ZIP"}]},{"name":"Actor's Birthday","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/actor-birthday/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Keanu Reeves"],"output":"1964-09-02"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Meryl Streep"],"output":"1949-06-22"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Denzel Washington"],"output":"1954-12-28"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Lin-Manuel Miranda"],"output":"1980-01-16"}]},{"name":"Anagram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/anagram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["shepherd","spider"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","ccat"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["olive","ilove"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","CAT"],"output":true}]},{"name":"Atbash Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/atbash/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["abc"],"output":"zyx"},{"name":"should preserve letter case","type":"CustomBlockTest","spec":"encrypt %'message'","function":"iterator fnXYZCBA"},{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["$?! +@"],"output":"$?! +@","name":"should preserve non-letters such as punctuation"}]},{"name":"Between","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/between/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[1,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[3,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,3,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[-6,-5,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[20,-5,5],"output":false}]},{"name":"Bigram Autocomplete","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/bigram-autocomplete/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list","function":"fncatcab"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list with 26 rows","function":"fncatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should contain rows that sum to 100","function":"fn100.5rowcatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return correct probabilities","function":"fn5013catcabchechi"}]},{"name":"Caesar Shift","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/caesar-shift/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["abc",2],"output":"cde"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",100],"output":"()*"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",-50],"output":"\u0012\u0013\u0014"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["with spaces",10],"output":"\u0001s~r*}zkmo}"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["no shift!",0],"output":"no shift!"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["negative wrapping!",-200],"output":"&\u001d\u001f\u0019,!.\u001dX/*\u0019((!&\u001fY"}]},{"name":"Compute the Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average/parsons.xml","tests":[]},{"name":"Compute the Average of a List","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average-list/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","1"]],"output":"1"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","2"]],"output":"1.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["-1","2","4","-3"]],"output":"0.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32"]],"output":-7.4},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32","54"]],"output":2.8333333333333335}]},{"name":"Counting Letter Frequency","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","function":"countabcc11200000000000000000000000"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","function":"counta b ! c26"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","function":"countaAbBcCzZ22200000000000000000000002"}]},{"name":"Counting Letter Frequency as Dictionary","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency-dictionary/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","inputs":["abcc"],"output":[["a",1],["b",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","inputs":["a4cc"],"output":[["a",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","inputs":["xyzZ"],"output":[["x",1],["y",1],["z",2]]}]},{"name":"Cracking the Caesar Shift with Brute Force","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-brute-force/parsons.xml","tests":[{"type":"CustomBlockTest","name":"it should find key when starts with a search word","spec":"find key where %'msg' contains %'words'","function":"code breakerhello world2messagemsg
hello2
"},{"name":"it should find key when using multiple search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces15messagemsg
hellowith15
"},{"name":"it should find key when ends with one of many search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces33messagemsg
hellospaces33
"},{"name":"it should return -1 if cannot decode message","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerno hidden words3messagemsg
hellospaces-1
"}]},{"name":"Cracking the Caesar Shift with a Partial Solution","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-partial-soln/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","c"],"output":2},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["A","a"],"output":32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","A"],"output":-32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["5","0"],"output":-5},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":[".","?"],"output":17}]},{"name":"Cyclic Iterator","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/cyclic-iterator/parsons.xml","tests":[{"name":"block should return a function","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1"},{"name":"sequence should start with the first value in the list","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1messagemsg
1
2424
"},{"name":"sequence should remember position","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn797"},{"name":"sequence should restart after reaching the end","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn777"}]},{"name":"Factorial","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/factorial/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[5],"output":120},{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[0],"output":1},{"type":"CustomBlockTest","name":"should compute the factorial of an unknown input","spec":"factorial %'num'","inputs":[7],"output":5040}]},{"name":"FizzBuzz","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/fizz-buzz/template.xml","tests":[{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[1],"output":1},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-39],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[3],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-50],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[5],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-150],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[15],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[0],"output":"fizzbuzz"}]},{"name":"From Infinite Sequences to Finite Lists","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/take-collect-sequences/parsons.xml","tests":[]},{"name":"Greet","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/greet/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"greet %'person'","name":"greet %'person' should start with \"Hello,\"","function":"blockBrian15Hello"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Bob"],"output":"Hello, Bob!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Alice"],"output":"Hello, Alice!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Cliff"],"output":"Hello, Cliff!"}]},{"name":"Intro to Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/intro-infinite-sequences/parsons.xml","tests":[{"name":"sequence should start with 1","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fnmessagemsg
1
"},{"name":"sequence should remember current position","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"},{"name":"sequence should produce counting numbers","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fntrue"},{"name":"two sequences should iterate independently","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"}]},{"name":"Isogram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/isogram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["letter"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["a"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["arraigning"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect first-order isogram","function":"blocksunflower"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect second-order isogram","function":"blockhorseshoer"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect third-order isogram","function":"blockgeggee"}]},{"name":"Leap Year","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/leap-year/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2015],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1970],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1996],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1960],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2100],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1900],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2000],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2400],"output":true}]},{"name":"Luhn Formula","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/luhn-formula/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"single digits cannot be valid","inputs":["8"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid credit card","inputs":["8273 1232 7352 0569"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"text with non digit is invalid","inputs":["059a"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid long number with even remainder","inputs":["1 2345 6789 1234 5678 9012"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with even digits","inputs":["095 245 88"],"output":true},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with odd number of spaces","inputs":["234 567 891 234"],"output":true}]},{"name":"Mapping Over Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/map-sequence/parsons.xml","tests":[{"name":"map should return another sequence","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map2messagemsg
"},{"name":"new sequence should contain transformed values","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map
by threes3i110true
"}]},{"name":"Minesweeper","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/minesweeper/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","*",""],["*","",""],["","*","*"]]],"output":[[2,"*",1],["*",4,3],[2,"*","*"]],"name":"board w/ mine counts on square board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*"],["*",""],["","*"]]],"output":[["*","*"],["*",4],[2,"*"]],"name":"board w/ mine counts on rectangle board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*","*"],["*","","*"],["","*",""]]],"output":[["*","*","*"],["*",6,"*"],[2,"*",2]],"name":"board w/ mine counts on dense board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","","",""],["","","","*"],["","","",""]]],"output":[[0,0,1,1],[0,0,1,"*"],[0,0,1,1]],"name":"board w/ mine counts on sparse board"}]},{"name":"Moving Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/moving-average/parsons.xml","tests":[{"name":"moving average block should return a list","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn1112"},{"name":"moving average should be computed correctly","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn-104176311.666666666666666744.666666666666667"}]},{"name":"Pangram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/pangram/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","inputs":[""],"output":false},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"lowercase pangram","inputs":["abcdefghijklmnopqrstuvwxyz"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"mixed case pangram","inputs":["abcdefghijkLMNOPQRSTUVWXYZ"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"pangram with extra symbols","inputs":["the quick brown fox jumps over a lazy dog!"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"missing a letter","inputs":["abcdefghijkLMNOPQRSTUVWYZ"],"output":false}]},{"name":"Sieve of Eratosthenes","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sieve/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should not consider 1 prime","inputs":[1],"output":[]},{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should find the all primes up to 5","inputs":[5],"output":[2,3,5]},{"type":"CustomBlockTest","name":"should find the all primes up to 30","spec":"factorial %'num'","inputs":[30],"output":[2,3,5,7,11,13,17,19,23,29]}]},{"name":"Sliding Windows","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sliding-windows/template.xml","tests":[]},{"name":"Transposing Music","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/transpose-music/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["78","1"],"output":"79","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["84","-2"],"output":"82","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["36","5"],"output":"41","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["C2","5"],"output":"41","name":"should accept note names (e.g., \"C4\")"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["50","0"],"output":"50","name":"should return original note when transposing by 0"}]},{"name":"Vigenere Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/vigenere/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["how are you?",["1","2","3","4"]],"output":"iqz$bth$zqxC"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["cba",["1","2","3"]],"output":"ddd"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["wow, negative keys?",["-2","-5","-3"]],"output":"ujt*\u001bkcb^rdsc\u001bhctp="},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["what large keys!",["100","200","300"]],"output":"[0\rXh\u0018E:\u0013Ih\u0017IA\u001f\u0005"}]}]}; + const config = {"name":"NetsBlox Exercises","assignments":[{"name":"Acronym","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/acronym/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["I Don't Know"],"output":"IDK"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["President Of The United States"],"output":"POTUS"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Shaking My Head"],"output":"SMH"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Agnetha, Bjorn, Benny, Anni-Frid"],"output":"ABBA"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Zone Improvement Plan"],"output":"ZIP"}]},{"name":"Actor's Birthday","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/actor-birthday/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Keanu Reeves"],"output":"1964-09-02"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Meryl Streep"],"output":"1949-06-22"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Denzel Washington"],"output":"1954-12-28"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Lin-Manuel Miranda"],"output":"1980-01-16"}]},{"name":"Anagram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/anagram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["shepherd","spider"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","ccat"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["olive","ilove"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","CAT"],"output":true}]},{"name":"Atbash Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/atbash/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["abc"],"output":"zyx"},{"name":"should preserve letter case","type":"CustomBlockTest","spec":"encrypt %'message'","function":"iterator fnXYZCBA"},{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["$?! +@"],"output":"$?! +@","name":"should preserve non-letters such as punctuation"}]},{"name":"Between","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/between/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[1,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[3,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,3,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[-6,-5,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[20,-5,5],"output":false}]},{"name":"Bigram Autocomplete","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/bigram-autocomplete/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list","function":"fncatcab"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list with 26 rows","function":"fncatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should contain rows that sum to 100","function":"fn100.5rowcatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return correct probabilities","function":"fn5013catcabchechi"}]},{"name":"Caesar Shift","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/caesar-shift/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["abc",2],"output":"cde"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",100],"output":"()*"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",-50],"output":"\u0012\u0013\u0014"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["with spaces",10],"output":"\u0001s~r*}zkmo}"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["no shift!",0],"output":"no shift!"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["negative wrapping!",-200],"output":"&\u001d\u001f\u0019,!.\u001dX/*\u0019((!&\u001fY"}]},{"name":"Compute the Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average/parsons.xml","tests":[]},{"name":"Compute the Average of a List","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average-list/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","1"]],"output":"1"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","2"]],"output":"1.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["-1","2","4","-3"]],"output":"0.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32"]],"output":-7.4},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32","54"]],"output":2.8333333333333335}]},{"name":"Counting Letter Frequency","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","function":"countabcc11200000000000000000000000"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","function":"counta b ! c26"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","function":"countaAbBcCzZ22200000000000000000000002"}]},{"name":"Counting Letter Frequency as Dictionary","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency-dictionary/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","inputs":["abcc"],"output":[["a",1],["b",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","inputs":["a4cc"],"output":[["a",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","inputs":["xyzZ"],"output":[["x",1],["y",1],["z",2]]}]},{"name":"Cracking the Caesar Shift with Brute Force","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-brute-force/parsons.xml","tests":[{"type":"CustomBlockTest","name":"it should find key when starts with a search word","spec":"find key where %'msg' contains %'words'","function":"code breakerhello world2messagemsg
hello2
"},{"name":"it should find key when using multiple search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces15messagemsg
hellowith15
"},{"name":"it should find key when ends with one of many search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces33messagemsg
hellospaces33
"},{"name":"it should return -1 if cannot decode message","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerno hidden words3messagemsg
hellospaces-1
"}]},{"name":"Cracking the Caesar Shift with a Partial Solution","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-partial-soln/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","c"],"output":2},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["A","a"],"output":32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","A"],"output":-32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["5","0"],"output":-5},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":[".","?"],"output":17}]},{"name":"Cyclic Iterator","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/cyclic-iterator/parsons.xml","tests":[{"name":"block should return a function","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1"},{"name":"sequence should start with the first value in the list","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1messagemsg
1
2424
"},{"name":"sequence should remember position","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn797"},{"name":"sequence should restart after reaching the end","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn777"}]},{"name":"Factorial","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/factorial/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[5],"output":120},{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[0],"output":1},{"type":"CustomBlockTest","name":"should compute the factorial of an unknown input","spec":"factorial %'num'","inputs":[7],"output":5040}]},{"name":"FizzBuzz","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/fizz-buzz/template.xml","tests":[{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[1],"output":1},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-39],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[3],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-50],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[5],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-150],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[15],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[0],"output":"fizzbuzz"}]},{"name":"From Infinite Sequences to Finite Lists","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/take-collect-sequences/parsons.xml","tests":[]},{"name":"Greet","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/greet/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"greet %'person'","name":"greet %'person' should start with \"Hello,\"","function":"blockBrian15Hello"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Bob"],"output":"Hello, Bob!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Alice"],"output":"Hello, Alice!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Cliff"],"output":"Hello, Cliff!"}]},{"name":"Intro to Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/intro-infinite-sequences/parsons.xml","tests":[{"name":"sequence should start with 1","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fnmessagemsg
1
"},{"name":"sequence should remember current position","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"},{"name":"sequence should produce counting numbers","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fntrue"},{"name":"two sequences should iterate independently","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"}]},{"name":"Isogram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/isogram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["letter"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["a"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["arraigning"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect first-order isogram","function":"blocksunflower"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect second-order isogram","function":"blockhorseshoer"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect third-order isogram","function":"blockgeggee"}]},{"name":"Leap Year","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/leap-year/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2015],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1970],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1996],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1960],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2100],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1900],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2000],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2400],"output":true}]},{"name":"Luhn Formula","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/luhn-formula/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"single digits cannot be valid","inputs":["8"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid credit card","inputs":["8273 1232 7352 0569"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"text with non digit is invalid","inputs":["059a"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid long number with even remainder","inputs":["1 2345 6789 1234 5678 9012"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with even digits","inputs":["095 245 88"],"output":true},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with odd number of spaces","inputs":["234 567 891 234"],"output":true}]},{"name":"Mapping Over Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/map-sequence/parsons.xml","tests":[{"name":"map should return another sequence","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map2messagemsg
"},{"name":"new sequence should contain transformed values","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map
by threes3i110true
"}]},{"name":"Minesweeper","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/minesweeper/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","*",""],["*","",""],["","*","*"]]],"output":[[2,"*",1],["*",4,3],[2,"*","*"]],"name":"board w/ mine counts on square board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*"],["*",""],["","*"]]],"output":[["*","*"],["*",4],[2,"*"]],"name":"board w/ mine counts on rectangle board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*","*"],["*","","*"],["","*",""]]],"output":[["*","*","*"],["*",6,"*"],[2,"*",2]],"name":"board w/ mine counts on dense board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","","",""],["","","","*"],["","","",""]]],"output":[[0,0,1,1],[0,0,1,"*"],[0,0,1,1]],"name":"board w/ mine counts on sparse board"}]},{"name":"Moving Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/moving-average/parsons.xml","tests":[{"name":"moving average block should return a list","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn1112"},{"name":"moving average should be computed correctly","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn-104176311.666666666666666744.666666666666667"}]},{"name":"Pangram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/pangram/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","inputs":[""],"output":false},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"lowercase pangram","inputs":["abcdefghijklmnopqrstuvwxyz"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"mixed case pangram","inputs":["abcdefghijkLMNOPQRSTUVWXYZ"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"pangram with extra symbols","inputs":["the quick brown fox jumps over a lazy dog!"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"missing a letter","inputs":["abcdefghijkLMNOPQRSTUVWYZ"],"output":false}]},{"name":"Sieve of Eratosthenes","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sieve/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should not consider 1 prime","inputs":[1],"output":[]},{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should find the all primes up to 5","inputs":[5],"output":[2,3,5]},{"type":"CustomBlockTest","name":"should find the all primes up to 30","spec":"factorial %'num'","inputs":[30],"output":[2,3,5,7,11,13,17,19,23,29]}]},{"name":"Sliding Windows","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sliding-windows/template.xml","tests":[]},{"name":"Transposing Music","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/transpose-music/template.xml","tests":[{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["78","1"],"output":"79","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["84","-2"],"output":"82","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["36","5"],"output":"41","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["C2","5"],"output":"41","name":"should accept note names (e.g., \"C4\")"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["50","0"],"output":"50","name":"should return original note when transposing by 0"}]},{"name":"Vigenere Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/vigenere/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["how are you?",["1","2","3","4"]],"output":"iqz$bth$zqxC"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["cba",["1","2","3"]],"output":"ddd"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["wow, negative keys?",["-2","-5","-3"]],"output":"ujt*\u001bkcb^rdsc\u001bhctp="},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["what large keys!",["100","200","300"]],"output":"[0\rXh\u0018E:\u0013Ih\u0017IA\u001f\u0005"}]}]}; const [ide] = world.children; class CustomBlockAutograder extends Extension { diff --git a/docs/autograders/caesar-shift.js b/docs/autograders/caesar-shift.js index c66c606..5b87c3f 100644 --- a/docs/autograders/caesar-shift.js +++ b/docs/autograders/caesar-shift.js @@ -2,7 +2,7 @@ ScrollFrameMorph, nop, HandleMorph, List, Extension, ToggleMorph, BlockMorph, Color, SpriteMorph, localize, TextMorph, MorphicPreferences, WHITE*/ (function() { - const config = {"name":"NetsBlox Exercises","assignments":[{"name":"Acronym","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/acronym/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["I Don't Know"],"output":"IDK"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["President Of The United States"],"output":"POTUS"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Shaking My Head"],"output":"SMH"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Agnetha, Bjorn, Benny, Anni-Frid"],"output":"ABBA"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Zone Improvement Plan"],"output":"ZIP"}]},{"name":"Actor's Birthday","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/actor-birthday/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Keanu Reeves"],"output":"1964-09-02"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Meryl Streep"],"output":"1949-06-22"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Denzel Washington"],"output":"1954-12-28"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Lin-Manuel Miranda"],"output":"1980-01-16"}]},{"name":"Anagram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/anagram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["shepherd","spider"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","ccat"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["olive","ilove"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","CAT"],"output":true}]},{"name":"Atbash Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/atbash/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["abc"],"output":"zyx"},{"name":"should preserve letter case","type":"CustomBlockTest","spec":"encrypt %'message'","function":"iterator fnXYZCBA"},{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["$?! +@"],"output":"$?! +@","name":"should preserve non-letters such as punctuation"}]},{"name":"Between","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/between/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[1,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[3,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,3,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[-6,-5,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[20,-5,5],"output":false}]},{"name":"Bigram Autocomplete","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/bigram-autocomplete/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list","function":"fncatcab"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list with 26 rows","function":"fncatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should contain rows that sum to 100","function":"fn100.5rowcatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return correct probabilities","function":"fn5013catcabchechi"}]},{"name":"Caesar Shift","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/caesar-shift/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["abc",2],"output":"cde"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",100],"output":"()*"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",-50],"output":"\u0012\u0013\u0014"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["with spaces",10],"output":"\u0001s~r*}zkmo}"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["no shift!",0],"output":"no shift!"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["negative wrapping!",-200],"output":"&\u001d\u001f\u0019,!.\u001dX/*\u0019((!&\u001fY"}]},{"name":"Compute the Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average/parsons.xml","tests":[]},{"name":"Compute the Average of a List","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average-list/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","1"]],"output":"1"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","2"]],"output":"1.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["-1","2","4","-3"]],"output":"0.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32"]],"output":-7.4},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32","54"]],"output":2.8333333333333335}]},{"name":"Counting Letter Frequency","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","function":"countabcc11200000000000000000000000"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","function":"counta b ! c26"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","function":"countaAbBcCzZ22200000000000000000000002"}]},{"name":"Counting Letter Frequency as Dictionary","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency-dictionary/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","inputs":["abcc"],"output":[["a",1],["b",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","inputs":["a4cc"],"output":[["a",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","inputs":["xyzZ"],"output":[["x",1],["y",1],["z",2]]}]},{"name":"Cracking the Caesar Shift with Brute Force","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-brute-force/parsons.xml","tests":[{"type":"CustomBlockTest","name":"it should find key when starts with a search word","spec":"find key where %'msg' contains %'words'","function":"code breakerhello world2messagemsg
hello2
"},{"name":"it should find key when using multiple search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces15messagemsg
hellowith15
"},{"name":"it should find key when ends with one of many search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces33messagemsg
hellospaces33
"},{"name":"it should return -1 if cannot decode message","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerno hidden words3messagemsg
hellospaces-1
"}]},{"name":"Cracking the Caesar Shift with a Partial Solution","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-partial-soln/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","c"],"output":2},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["A","a"],"output":32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","A"],"output":-32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["5","0"],"output":-5},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":[".","?"],"output":17}]},{"name":"Cyclic Iterator","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/cyclic-iterator/parsons.xml","tests":[{"name":"block should return a function","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1"},{"name":"sequence should start with the first value in the list","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1messagemsg
1
2424
"},{"name":"sequence should remember position","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn797"},{"name":"sequence should restart after reaching the end","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn777"}]},{"name":"Factorial","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/factorial/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[5],"output":120},{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[0],"output":1},{"type":"CustomBlockTest","name":"should compute the factorial of an unknown input","spec":"factorial %'num'","inputs":[7],"output":5040}]},{"name":"FizzBuzz","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/fizz-buzz/template.xml","tests":[{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[1],"output":1},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-39],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[3],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-50],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[5],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-150],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[15],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[0],"output":"fizzbuzz"}]},{"name":"From Infinite Sequences to Finite Lists","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/take-collect-sequences/parsons.xml","tests":[]},{"name":"Greet","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/greet/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"greet %'person'","name":"greet %'person' should start with \"Hello,\"","function":"blockBrian15Hello"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Bob"],"output":"Hello, Bob!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Alice"],"output":"Hello, Alice!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Cliff"],"output":"Hello, Cliff!"}]},{"name":"Intro to Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/intro-infinite-sequences/parsons.xml","tests":[{"name":"sequence should start with 1","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fnmessagemsg
1
"},{"name":"sequence should remember current position","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"},{"name":"sequence should produce counting numbers","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fntrue"},{"name":"two sequences should iterate independently","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"}]},{"name":"Isogram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/isogram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["letter"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["a"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["arraigning"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect first-order isogram","function":"blocksunflower"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect second-order isogram","function":"blockhorseshoer"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect third-order isogram","function":"blockgeggee"}]},{"name":"Leap Year","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/leap-year/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2015],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1970],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1996],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1960],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2100],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1900],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2000],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2400],"output":true}]},{"name":"Luhn Formula","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/luhn-formula/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"single digits cannot be valid","inputs":["8"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid credit card","inputs":["8273 1232 7352 0569"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"text with non digit is invalid","inputs":["059a"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid long number with even remainder","inputs":["1 2345 6789 1234 5678 9012"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with even digits","inputs":["095 245 88"],"output":true},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with odd number of spaces","inputs":["234 567 891 234"],"output":true}]},{"name":"Mapping Over Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/map-sequence/parsons.xml","tests":[{"name":"map should return another sequence","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map2messagemsg
"},{"name":"new sequence should contain transformed values","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map
by threes3i110true
"}]},{"name":"Minesweeper","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/minesweeper/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","*",""],["*","",""],["","*","*"]]],"output":[[2,"*",1],["*",4,3],[2,"*","*"]],"name":"board w/ mine counts on square board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*"],["*",""],["","*"]]],"output":[["*","*"],["*",4],[2,"*"]],"name":"board w/ mine counts on rectangle board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*","*"],["*","","*"],["","*",""]]],"output":[["*","*","*"],["*",6,"*"],[2,"*",2]],"name":"board w/ mine counts on dense board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","","",""],["","","","*"],["","","",""]]],"output":[[0,0,1,1],[0,0,1,"*"],[0,0,1,1]],"name":"board w/ mine counts on sparse board"}]},{"name":"Moving Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/moving-average/parsons.xml","tests":[{"name":"moving average block should return a list","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn1112"},{"name":"moving average should be computed correctly","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn-104176311.666666666666666744.666666666666667"}]},{"name":"Pangram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/pangram/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","inputs":[""],"output":false},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"lowercase pangram","inputs":["abcdefghijklmnopqrstuvwxyz"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"mixed case pangram","inputs":["abcdefghijkLMNOPQRSTUVWXYZ"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"pangram with extra symbols","inputs":["the quick brown fox jumps over a lazy dog!"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"missing a letter","inputs":["abcdefghijkLMNOPQRSTUVWYZ"],"output":false}]},{"name":"Sieve of Eratosthenes","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sieve/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should not consider 1 prime","inputs":[1],"output":[]},{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should find the all primes up to 5","inputs":[5],"output":[2,3,5]},{"type":"CustomBlockTest","name":"should find the all primes up to 30","spec":"factorial %'num'","inputs":[30],"output":[2,3,5,7,11,13,17,19,23,29]}]},{"name":"Sliding Windows","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sliding-windows/template.xml","tests":[]},{"name":"Transposing Music","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/transpose-music/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["78","1"],"output":"79","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["84","-2"],"output":"82","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["36","5"],"output":"41","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["C2","5"],"output":"41","name":"should accept note names (e.g., \"C4\")"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["50","0"],"output":"50","name":"should return original note when transposing by 0"}]},{"name":"Vigenere Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/vigenere/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["how are you?",["1","2","3","4"]],"output":"iqz$bth$zqxC"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["cba",["1","2","3"]],"output":"ddd"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["wow, negative keys?",["-2","-5","-3"]],"output":"ujt*\u001bkcb^rdsc\u001bhctp="},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["what large keys!",["100","200","300"]],"output":"[0\rXh\u0018E:\u0013Ih\u0017IA\u001f\u0005"}]}]}; + const config = {"name":"NetsBlox Exercises","assignments":[{"name":"Acronym","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/acronym/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["I Don't Know"],"output":"IDK"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["President Of The United States"],"output":"POTUS"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Shaking My Head"],"output":"SMH"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Agnetha, Bjorn, Benny, Anni-Frid"],"output":"ABBA"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Zone Improvement Plan"],"output":"ZIP"}]},{"name":"Actor's Birthday","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/actor-birthday/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Keanu Reeves"],"output":"1964-09-02"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Meryl Streep"],"output":"1949-06-22"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Denzel Washington"],"output":"1954-12-28"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Lin-Manuel Miranda"],"output":"1980-01-16"}]},{"name":"Anagram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/anagram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["shepherd","spider"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","ccat"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["olive","ilove"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","CAT"],"output":true}]},{"name":"Atbash Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/atbash/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["abc"],"output":"zyx"},{"name":"should preserve letter case","type":"CustomBlockTest","spec":"encrypt %'message'","function":"iterator fnXYZCBA"},{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["$?! +@"],"output":"$?! +@","name":"should preserve non-letters such as punctuation"}]},{"name":"Between","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/between/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[1,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[3,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,3,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[-6,-5,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[20,-5,5],"output":false}]},{"name":"Bigram Autocomplete","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/bigram-autocomplete/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list","function":"fncatcab"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list with 26 rows","function":"fncatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should contain rows that sum to 100","function":"fn100.5rowcatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return correct probabilities","function":"fn5013catcabchechi"}]},{"name":"Caesar Shift","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/caesar-shift/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["abc",2],"output":"cde"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",100],"output":"()*"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",-50],"output":"\u0012\u0013\u0014"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["with spaces",10],"output":"\u0001s~r*}zkmo}"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["no shift!",0],"output":"no shift!"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["negative wrapping!",-200],"output":"&\u001d\u001f\u0019,!.\u001dX/*\u0019((!&\u001fY"}]},{"name":"Compute the Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average/parsons.xml","tests":[]},{"name":"Compute the Average of a List","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average-list/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","1"]],"output":"1"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","2"]],"output":"1.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["-1","2","4","-3"]],"output":"0.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32"]],"output":-7.4},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32","54"]],"output":2.8333333333333335}]},{"name":"Counting Letter Frequency","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","function":"countabcc11200000000000000000000000"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","function":"counta b ! c26"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","function":"countaAbBcCzZ22200000000000000000000002"}]},{"name":"Counting Letter Frequency as Dictionary","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency-dictionary/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","inputs":["abcc"],"output":[["a",1],["b",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","inputs":["a4cc"],"output":[["a",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","inputs":["xyzZ"],"output":[["x",1],["y",1],["z",2]]}]},{"name":"Cracking the Caesar Shift with Brute Force","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-brute-force/parsons.xml","tests":[{"type":"CustomBlockTest","name":"it should find key when starts with a search word","spec":"find key where %'msg' contains %'words'","function":"code breakerhello world2messagemsg
hello2
"},{"name":"it should find key when using multiple search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces15messagemsg
hellowith15
"},{"name":"it should find key when ends with one of many search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces33messagemsg
hellospaces33
"},{"name":"it should return -1 if cannot decode message","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerno hidden words3messagemsg
hellospaces-1
"}]},{"name":"Cracking the Caesar Shift with a Partial Solution","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-partial-soln/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","c"],"output":2},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["A","a"],"output":32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","A"],"output":-32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["5","0"],"output":-5},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":[".","?"],"output":17}]},{"name":"Cyclic Iterator","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/cyclic-iterator/parsons.xml","tests":[{"name":"block should return a function","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1"},{"name":"sequence should start with the first value in the list","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1messagemsg
1
2424
"},{"name":"sequence should remember position","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn797"},{"name":"sequence should restart after reaching the end","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn777"}]},{"name":"Factorial","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/factorial/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[5],"output":120},{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[0],"output":1},{"type":"CustomBlockTest","name":"should compute the factorial of an unknown input","spec":"factorial %'num'","inputs":[7],"output":5040}]},{"name":"FizzBuzz","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/fizz-buzz/template.xml","tests":[{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[1],"output":1},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-39],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[3],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-50],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[5],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-150],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[15],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[0],"output":"fizzbuzz"}]},{"name":"From Infinite Sequences to Finite Lists","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/take-collect-sequences/parsons.xml","tests":[]},{"name":"Greet","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/greet/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"greet %'person'","name":"greet %'person' should start with \"Hello,\"","function":"blockBrian15Hello"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Bob"],"output":"Hello, Bob!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Alice"],"output":"Hello, Alice!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Cliff"],"output":"Hello, Cliff!"}]},{"name":"Intro to Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/intro-infinite-sequences/parsons.xml","tests":[{"name":"sequence should start with 1","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fnmessagemsg
1
"},{"name":"sequence should remember current position","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"},{"name":"sequence should produce counting numbers","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fntrue"},{"name":"two sequences should iterate independently","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"}]},{"name":"Isogram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/isogram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["letter"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["a"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["arraigning"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect first-order isogram","function":"blocksunflower"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect second-order isogram","function":"blockhorseshoer"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect third-order isogram","function":"blockgeggee"}]},{"name":"Leap Year","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/leap-year/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2015],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1970],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1996],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1960],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2100],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1900],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2000],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2400],"output":true}]},{"name":"Luhn Formula","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/luhn-formula/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"single digits cannot be valid","inputs":["8"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid credit card","inputs":["8273 1232 7352 0569"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"text with non digit is invalid","inputs":["059a"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid long number with even remainder","inputs":["1 2345 6789 1234 5678 9012"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with even digits","inputs":["095 245 88"],"output":true},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with odd number of spaces","inputs":["234 567 891 234"],"output":true}]},{"name":"Mapping Over Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/map-sequence/parsons.xml","tests":[{"name":"map should return another sequence","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map2messagemsg
"},{"name":"new sequence should contain transformed values","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map
by threes3i110true
"}]},{"name":"Minesweeper","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/minesweeper/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","*",""],["*","",""],["","*","*"]]],"output":[[2,"*",1],["*",4,3],[2,"*","*"]],"name":"board w/ mine counts on square board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*"],["*",""],["","*"]]],"output":[["*","*"],["*",4],[2,"*"]],"name":"board w/ mine counts on rectangle board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*","*"],["*","","*"],["","*",""]]],"output":[["*","*","*"],["*",6,"*"],[2,"*",2]],"name":"board w/ mine counts on dense board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","","",""],["","","","*"],["","","",""]]],"output":[[0,0,1,1],[0,0,1,"*"],[0,0,1,1]],"name":"board w/ mine counts on sparse board"}]},{"name":"Moving Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/moving-average/parsons.xml","tests":[{"name":"moving average block should return a list","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn1112"},{"name":"moving average should be computed correctly","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn-104176311.666666666666666744.666666666666667"}]},{"name":"Pangram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/pangram/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","inputs":[""],"output":false},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"lowercase pangram","inputs":["abcdefghijklmnopqrstuvwxyz"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"mixed case pangram","inputs":["abcdefghijkLMNOPQRSTUVWXYZ"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"pangram with extra symbols","inputs":["the quick brown fox jumps over a lazy dog!"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"missing a letter","inputs":["abcdefghijkLMNOPQRSTUVWYZ"],"output":false}]},{"name":"Sieve of Eratosthenes","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sieve/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should not consider 1 prime","inputs":[1],"output":[]},{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should find the all primes up to 5","inputs":[5],"output":[2,3,5]},{"type":"CustomBlockTest","name":"should find the all primes up to 30","spec":"factorial %'num'","inputs":[30],"output":[2,3,5,7,11,13,17,19,23,29]}]},{"name":"Sliding Windows","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sliding-windows/template.xml","tests":[]},{"name":"Transposing Music","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/transpose-music/template.xml","tests":[{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["78","1"],"output":"79","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["84","-2"],"output":"82","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["36","5"],"output":"41","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["C2","5"],"output":"41","name":"should accept note names (e.g., \"C4\")"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["50","0"],"output":"50","name":"should return original note when transposing by 0"}]},{"name":"Vigenere Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/vigenere/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["how are you?",["1","2","3","4"]],"output":"iqz$bth$zqxC"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["cba",["1","2","3"]],"output":"ddd"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["wow, negative keys?",["-2","-5","-3"]],"output":"ujt*\u001bkcb^rdsc\u001bhctp="},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["what large keys!",["100","200","300"]],"output":"[0\rXh\u0018E:\u0013Ih\u0017IA\u001f\u0005"}]}]}; const [ide] = world.children; class CustomBlockAutograder extends Extension { diff --git a/docs/autograders/crack-caesar-brute-force.js b/docs/autograders/crack-caesar-brute-force.js index 3b8786e..d2ff1f4 100644 --- a/docs/autograders/crack-caesar-brute-force.js +++ b/docs/autograders/crack-caesar-brute-force.js @@ -2,7 +2,7 @@ ScrollFrameMorph, nop, HandleMorph, List, Extension, ToggleMorph, BlockMorph, Color, SpriteMorph, localize, TextMorph, MorphicPreferences, WHITE*/ (function() { - const config = {"name":"NetsBlox Exercises","assignments":[{"name":"Acronym","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/acronym/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["I Don't Know"],"output":"IDK"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["President Of The United States"],"output":"POTUS"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Shaking My Head"],"output":"SMH"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Agnetha, Bjorn, Benny, Anni-Frid"],"output":"ABBA"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Zone Improvement Plan"],"output":"ZIP"}]},{"name":"Actor's Birthday","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/actor-birthday/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Keanu Reeves"],"output":"1964-09-02"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Meryl Streep"],"output":"1949-06-22"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Denzel Washington"],"output":"1954-12-28"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Lin-Manuel Miranda"],"output":"1980-01-16"}]},{"name":"Anagram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/anagram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["shepherd","spider"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","ccat"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["olive","ilove"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","CAT"],"output":true}]},{"name":"Atbash Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/atbash/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["abc"],"output":"zyx"},{"name":"should preserve letter case","type":"CustomBlockTest","spec":"encrypt %'message'","function":"iterator fnXYZCBA"},{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["$?! +@"],"output":"$?! +@","name":"should preserve non-letters such as punctuation"}]},{"name":"Between","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/between/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[1,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[3,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,3,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[-6,-5,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[20,-5,5],"output":false}]},{"name":"Bigram Autocomplete","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/bigram-autocomplete/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list","function":"fncatcab"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list with 26 rows","function":"fncatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should contain rows that sum to 100","function":"fn100.5rowcatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return correct probabilities","function":"fn5013catcabchechi"}]},{"name":"Caesar Shift","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/caesar-shift/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["abc",2],"output":"cde"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",100],"output":"()*"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",-50],"output":"\u0012\u0013\u0014"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["with spaces",10],"output":"\u0001s~r*}zkmo}"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["no shift!",0],"output":"no shift!"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["negative wrapping!",-200],"output":"&\u001d\u001f\u0019,!.\u001dX/*\u0019((!&\u001fY"}]},{"name":"Compute the Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average/parsons.xml","tests":[]},{"name":"Compute the Average of a List","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average-list/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","1"]],"output":"1"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","2"]],"output":"1.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["-1","2","4","-3"]],"output":"0.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32"]],"output":-7.4},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32","54"]],"output":2.8333333333333335}]},{"name":"Counting Letter Frequency","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","function":"countabcc11200000000000000000000000"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","function":"counta b ! c26"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","function":"countaAbBcCzZ22200000000000000000000002"}]},{"name":"Counting Letter Frequency as Dictionary","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency-dictionary/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","inputs":["abcc"],"output":[["a",1],["b",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","inputs":["a4cc"],"output":[["a",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","inputs":["xyzZ"],"output":[["x",1],["y",1],["z",2]]}]},{"name":"Cracking the Caesar Shift with Brute Force","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-brute-force/parsons.xml","tests":[{"type":"CustomBlockTest","name":"it should find key when starts with a search word","spec":"find key where %'msg' contains %'words'","function":"code breakerhello world2messagemsg
hello2
"},{"name":"it should find key when using multiple search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces15messagemsg
hellowith15
"},{"name":"it should find key when ends with one of many search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces33messagemsg
hellospaces33
"},{"name":"it should return -1 if cannot decode message","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerno hidden words3messagemsg
hellospaces-1
"}]},{"name":"Cracking the Caesar Shift with a Partial Solution","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-partial-soln/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","c"],"output":2},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["A","a"],"output":32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","A"],"output":-32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["5","0"],"output":-5},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":[".","?"],"output":17}]},{"name":"Cyclic Iterator","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/cyclic-iterator/parsons.xml","tests":[{"name":"block should return a function","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1"},{"name":"sequence should start with the first value in the list","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1messagemsg
1
2424
"},{"name":"sequence should remember position","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn797"},{"name":"sequence should restart after reaching the end","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn777"}]},{"name":"Factorial","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/factorial/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[5],"output":120},{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[0],"output":1},{"type":"CustomBlockTest","name":"should compute the factorial of an unknown input","spec":"factorial %'num'","inputs":[7],"output":5040}]},{"name":"FizzBuzz","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/fizz-buzz/template.xml","tests":[{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[1],"output":1},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-39],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[3],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-50],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[5],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-150],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[15],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[0],"output":"fizzbuzz"}]},{"name":"From Infinite Sequences to Finite Lists","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/take-collect-sequences/parsons.xml","tests":[]},{"name":"Greet","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/greet/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"greet %'person'","name":"greet %'person' should start with \"Hello,\"","function":"blockBrian15Hello"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Bob"],"output":"Hello, Bob!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Alice"],"output":"Hello, Alice!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Cliff"],"output":"Hello, Cliff!"}]},{"name":"Intro to Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/intro-infinite-sequences/parsons.xml","tests":[{"name":"sequence should start with 1","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fnmessagemsg
1
"},{"name":"sequence should remember current position","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"},{"name":"sequence should produce counting numbers","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fntrue"},{"name":"two sequences should iterate independently","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"}]},{"name":"Isogram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/isogram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["letter"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["a"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["arraigning"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect first-order isogram","function":"blocksunflower"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect second-order isogram","function":"blockhorseshoer"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect third-order isogram","function":"blockgeggee"}]},{"name":"Leap Year","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/leap-year/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2015],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1970],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1996],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1960],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2100],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1900],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2000],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2400],"output":true}]},{"name":"Luhn Formula","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/luhn-formula/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"single digits cannot be valid","inputs":["8"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid credit card","inputs":["8273 1232 7352 0569"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"text with non digit is invalid","inputs":["059a"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid long number with even remainder","inputs":["1 2345 6789 1234 5678 9012"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with even digits","inputs":["095 245 88"],"output":true},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with odd number of spaces","inputs":["234 567 891 234"],"output":true}]},{"name":"Mapping Over Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/map-sequence/parsons.xml","tests":[{"name":"map should return another sequence","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map2messagemsg
"},{"name":"new sequence should contain transformed values","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map
by threes3i110true
"}]},{"name":"Minesweeper","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/minesweeper/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","*",""],["*","",""],["","*","*"]]],"output":[[2,"*",1],["*",4,3],[2,"*","*"]],"name":"board w/ mine counts on square board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*"],["*",""],["","*"]]],"output":[["*","*"],["*",4],[2,"*"]],"name":"board w/ mine counts on rectangle board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*","*"],["*","","*"],["","*",""]]],"output":[["*","*","*"],["*",6,"*"],[2,"*",2]],"name":"board w/ mine counts on dense board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","","",""],["","","","*"],["","","",""]]],"output":[[0,0,1,1],[0,0,1,"*"],[0,0,1,1]],"name":"board w/ mine counts on sparse board"}]},{"name":"Moving Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/moving-average/parsons.xml","tests":[{"name":"moving average block should return a list","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn1112"},{"name":"moving average should be computed correctly","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn-104176311.666666666666666744.666666666666667"}]},{"name":"Pangram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/pangram/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","inputs":[""],"output":false},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"lowercase pangram","inputs":["abcdefghijklmnopqrstuvwxyz"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"mixed case pangram","inputs":["abcdefghijkLMNOPQRSTUVWXYZ"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"pangram with extra symbols","inputs":["the quick brown fox jumps over a lazy dog!"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"missing a letter","inputs":["abcdefghijkLMNOPQRSTUVWYZ"],"output":false}]},{"name":"Sieve of Eratosthenes","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sieve/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should not consider 1 prime","inputs":[1],"output":[]},{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should find the all primes up to 5","inputs":[5],"output":[2,3,5]},{"type":"CustomBlockTest","name":"should find the all primes up to 30","spec":"factorial %'num'","inputs":[30],"output":[2,3,5,7,11,13,17,19,23,29]}]},{"name":"Sliding Windows","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sliding-windows/template.xml","tests":[]},{"name":"Transposing Music","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/transpose-music/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["78","1"],"output":"79","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["84","-2"],"output":"82","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["36","5"],"output":"41","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["C2","5"],"output":"41","name":"should accept note names (e.g., \"C4\")"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["50","0"],"output":"50","name":"should return original note when transposing by 0"}]},{"name":"Vigenere Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/vigenere/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["how are you?",["1","2","3","4"]],"output":"iqz$bth$zqxC"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["cba",["1","2","3"]],"output":"ddd"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["wow, negative keys?",["-2","-5","-3"]],"output":"ujt*\u001bkcb^rdsc\u001bhctp="},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["what large keys!",["100","200","300"]],"output":"[0\rXh\u0018E:\u0013Ih\u0017IA\u001f\u0005"}]}]}; + const config = {"name":"NetsBlox Exercises","assignments":[{"name":"Acronym","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/acronym/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["I Don't Know"],"output":"IDK"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["President Of The United States"],"output":"POTUS"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Shaking My Head"],"output":"SMH"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Agnetha, Bjorn, Benny, Anni-Frid"],"output":"ABBA"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Zone Improvement Plan"],"output":"ZIP"}]},{"name":"Actor's Birthday","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/actor-birthday/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Keanu Reeves"],"output":"1964-09-02"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Meryl Streep"],"output":"1949-06-22"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Denzel Washington"],"output":"1954-12-28"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Lin-Manuel Miranda"],"output":"1980-01-16"}]},{"name":"Anagram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/anagram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["shepherd","spider"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","ccat"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["olive","ilove"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","CAT"],"output":true}]},{"name":"Atbash Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/atbash/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["abc"],"output":"zyx"},{"name":"should preserve letter case","type":"CustomBlockTest","spec":"encrypt %'message'","function":"iterator fnXYZCBA"},{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["$?! +@"],"output":"$?! +@","name":"should preserve non-letters such as punctuation"}]},{"name":"Between","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/between/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[1,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[3,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,3,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[-6,-5,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[20,-5,5],"output":false}]},{"name":"Bigram Autocomplete","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/bigram-autocomplete/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list","function":"fncatcab"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list with 26 rows","function":"fncatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should contain rows that sum to 100","function":"fn100.5rowcatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return correct probabilities","function":"fn5013catcabchechi"}]},{"name":"Caesar Shift","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/caesar-shift/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["abc",2],"output":"cde"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",100],"output":"()*"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",-50],"output":"\u0012\u0013\u0014"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["with spaces",10],"output":"\u0001s~r*}zkmo}"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["no shift!",0],"output":"no shift!"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["negative wrapping!",-200],"output":"&\u001d\u001f\u0019,!.\u001dX/*\u0019((!&\u001fY"}]},{"name":"Compute the Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average/parsons.xml","tests":[]},{"name":"Compute the Average of a List","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average-list/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","1"]],"output":"1"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","2"]],"output":"1.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["-1","2","4","-3"]],"output":"0.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32"]],"output":-7.4},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32","54"]],"output":2.8333333333333335}]},{"name":"Counting Letter Frequency","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","function":"countabcc11200000000000000000000000"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","function":"counta b ! c26"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","function":"countaAbBcCzZ22200000000000000000000002"}]},{"name":"Counting Letter Frequency as Dictionary","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency-dictionary/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","inputs":["abcc"],"output":[["a",1],["b",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","inputs":["a4cc"],"output":[["a",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","inputs":["xyzZ"],"output":[["x",1],["y",1],["z",2]]}]},{"name":"Cracking the Caesar Shift with Brute Force","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-brute-force/parsons.xml","tests":[{"type":"CustomBlockTest","name":"it should find key when starts with a search word","spec":"find key where %'msg' contains %'words'","function":"code breakerhello world2messagemsg
hello2
"},{"name":"it should find key when using multiple search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces15messagemsg
hellowith15
"},{"name":"it should find key when ends with one of many search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces33messagemsg
hellospaces33
"},{"name":"it should return -1 if cannot decode message","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerno hidden words3messagemsg
hellospaces-1
"}]},{"name":"Cracking the Caesar Shift with a Partial Solution","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-partial-soln/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","c"],"output":2},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["A","a"],"output":32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","A"],"output":-32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["5","0"],"output":-5},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":[".","?"],"output":17}]},{"name":"Cyclic Iterator","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/cyclic-iterator/parsons.xml","tests":[{"name":"block should return a function","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1"},{"name":"sequence should start with the first value in the list","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1messagemsg
1
2424
"},{"name":"sequence should remember position","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn797"},{"name":"sequence should restart after reaching the end","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn777"}]},{"name":"Factorial","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/factorial/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[5],"output":120},{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[0],"output":1},{"type":"CustomBlockTest","name":"should compute the factorial of an unknown input","spec":"factorial %'num'","inputs":[7],"output":5040}]},{"name":"FizzBuzz","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/fizz-buzz/template.xml","tests":[{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[1],"output":1},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-39],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[3],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-50],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[5],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-150],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[15],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[0],"output":"fizzbuzz"}]},{"name":"From Infinite Sequences to Finite Lists","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/take-collect-sequences/parsons.xml","tests":[]},{"name":"Greet","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/greet/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"greet %'person'","name":"greet %'person' should start with \"Hello,\"","function":"blockBrian15Hello"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Bob"],"output":"Hello, Bob!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Alice"],"output":"Hello, Alice!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Cliff"],"output":"Hello, Cliff!"}]},{"name":"Intro to Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/intro-infinite-sequences/parsons.xml","tests":[{"name":"sequence should start with 1","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fnmessagemsg
1
"},{"name":"sequence should remember current position","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"},{"name":"sequence should produce counting numbers","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fntrue"},{"name":"two sequences should iterate independently","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"}]},{"name":"Isogram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/isogram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["letter"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["a"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["arraigning"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect first-order isogram","function":"blocksunflower"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect second-order isogram","function":"blockhorseshoer"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect third-order isogram","function":"blockgeggee"}]},{"name":"Leap Year","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/leap-year/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2015],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1970],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1996],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1960],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2100],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1900],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2000],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2400],"output":true}]},{"name":"Luhn Formula","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/luhn-formula/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"single digits cannot be valid","inputs":["8"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid credit card","inputs":["8273 1232 7352 0569"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"text with non digit is invalid","inputs":["059a"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid long number with even remainder","inputs":["1 2345 6789 1234 5678 9012"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with even digits","inputs":["095 245 88"],"output":true},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with odd number of spaces","inputs":["234 567 891 234"],"output":true}]},{"name":"Mapping Over Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/map-sequence/parsons.xml","tests":[{"name":"map should return another sequence","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map2messagemsg
"},{"name":"new sequence should contain transformed values","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map
by threes3i110true
"}]},{"name":"Minesweeper","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/minesweeper/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","*",""],["*","",""],["","*","*"]]],"output":[[2,"*",1],["*",4,3],[2,"*","*"]],"name":"board w/ mine counts on square board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*"],["*",""],["","*"]]],"output":[["*","*"],["*",4],[2,"*"]],"name":"board w/ mine counts on rectangle board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*","*"],["*","","*"],["","*",""]]],"output":[["*","*","*"],["*",6,"*"],[2,"*",2]],"name":"board w/ mine counts on dense board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","","",""],["","","","*"],["","","",""]]],"output":[[0,0,1,1],[0,0,1,"*"],[0,0,1,1]],"name":"board w/ mine counts on sparse board"}]},{"name":"Moving Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/moving-average/parsons.xml","tests":[{"name":"moving average block should return a list","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn1112"},{"name":"moving average should be computed correctly","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn-104176311.666666666666666744.666666666666667"}]},{"name":"Pangram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/pangram/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","inputs":[""],"output":false},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"lowercase pangram","inputs":["abcdefghijklmnopqrstuvwxyz"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"mixed case pangram","inputs":["abcdefghijkLMNOPQRSTUVWXYZ"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"pangram with extra symbols","inputs":["the quick brown fox jumps over a lazy dog!"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"missing a letter","inputs":["abcdefghijkLMNOPQRSTUVWYZ"],"output":false}]},{"name":"Sieve of Eratosthenes","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sieve/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should not consider 1 prime","inputs":[1],"output":[]},{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should find the all primes up to 5","inputs":[5],"output":[2,3,5]},{"type":"CustomBlockTest","name":"should find the all primes up to 30","spec":"factorial %'num'","inputs":[30],"output":[2,3,5,7,11,13,17,19,23,29]}]},{"name":"Sliding Windows","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sliding-windows/template.xml","tests":[]},{"name":"Transposing Music","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/transpose-music/template.xml","tests":[{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["78","1"],"output":"79","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["84","-2"],"output":"82","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["36","5"],"output":"41","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["C2","5"],"output":"41","name":"should accept note names (e.g., \"C4\")"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["50","0"],"output":"50","name":"should return original note when transposing by 0"}]},{"name":"Vigenere Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/vigenere/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["how are you?",["1","2","3","4"]],"output":"iqz$bth$zqxC"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["cba",["1","2","3"]],"output":"ddd"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["wow, negative keys?",["-2","-5","-3"]],"output":"ujt*\u001bkcb^rdsc\u001bhctp="},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["what large keys!",["100","200","300"]],"output":"[0\rXh\u0018E:\u0013Ih\u0017IA\u001f\u0005"}]}]}; const [ide] = world.children; class CustomBlockAutograder extends Extension { diff --git a/docs/autograders/crack-caesar-partial-soln.js b/docs/autograders/crack-caesar-partial-soln.js index 3b00d1f..9acfb76 100644 --- a/docs/autograders/crack-caesar-partial-soln.js +++ b/docs/autograders/crack-caesar-partial-soln.js @@ -2,7 +2,7 @@ ScrollFrameMorph, nop, HandleMorph, List, Extension, ToggleMorph, BlockMorph, Color, SpriteMorph, localize, TextMorph, MorphicPreferences, WHITE*/ (function() { - const config = {"name":"NetsBlox Exercises","assignments":[{"name":"Acronym","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/acronym/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["I Don't Know"],"output":"IDK"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["President Of The United States"],"output":"POTUS"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Shaking My Head"],"output":"SMH"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Agnetha, Bjorn, Benny, Anni-Frid"],"output":"ABBA"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Zone Improvement Plan"],"output":"ZIP"}]},{"name":"Actor's Birthday","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/actor-birthday/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Keanu Reeves"],"output":"1964-09-02"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Meryl Streep"],"output":"1949-06-22"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Denzel Washington"],"output":"1954-12-28"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Lin-Manuel Miranda"],"output":"1980-01-16"}]},{"name":"Anagram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/anagram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["shepherd","spider"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","ccat"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["olive","ilove"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","CAT"],"output":true}]},{"name":"Atbash Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/atbash/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["abc"],"output":"zyx"},{"name":"should preserve letter case","type":"CustomBlockTest","spec":"encrypt %'message'","function":"iterator fnXYZCBA"},{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["$?! +@"],"output":"$?! +@","name":"should preserve non-letters such as punctuation"}]},{"name":"Between","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/between/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[1,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[3,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,3,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[-6,-5,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[20,-5,5],"output":false}]},{"name":"Bigram Autocomplete","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/bigram-autocomplete/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list","function":"fncatcab"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list with 26 rows","function":"fncatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should contain rows that sum to 100","function":"fn100.5rowcatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return correct probabilities","function":"fn5013catcabchechi"}]},{"name":"Caesar Shift","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/caesar-shift/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["abc",2],"output":"cde"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",100],"output":"()*"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",-50],"output":"\u0012\u0013\u0014"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["with spaces",10],"output":"\u0001s~r*}zkmo}"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["no shift!",0],"output":"no shift!"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["negative wrapping!",-200],"output":"&\u001d\u001f\u0019,!.\u001dX/*\u0019((!&\u001fY"}]},{"name":"Compute the Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average/parsons.xml","tests":[]},{"name":"Compute the Average of a List","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average-list/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","1"]],"output":"1"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","2"]],"output":"1.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["-1","2","4","-3"]],"output":"0.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32"]],"output":-7.4},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32","54"]],"output":2.8333333333333335}]},{"name":"Counting Letter Frequency","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","function":"countabcc11200000000000000000000000"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","function":"counta b ! c26"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","function":"countaAbBcCzZ22200000000000000000000002"}]},{"name":"Counting Letter Frequency as Dictionary","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency-dictionary/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","inputs":["abcc"],"output":[["a",1],["b",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","inputs":["a4cc"],"output":[["a",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","inputs":["xyzZ"],"output":[["x",1],["y",1],["z",2]]}]},{"name":"Cracking the Caesar Shift with Brute Force","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-brute-force/parsons.xml","tests":[{"type":"CustomBlockTest","name":"it should find key when starts with a search word","spec":"find key where %'msg' contains %'words'","function":"code breakerhello world2messagemsg
hello2
"},{"name":"it should find key when using multiple search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces15messagemsg
hellowith15
"},{"name":"it should find key when ends with one of many search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces33messagemsg
hellospaces33
"},{"name":"it should return -1 if cannot decode message","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerno hidden words3messagemsg
hellospaces-1
"}]},{"name":"Cracking the Caesar Shift with a Partial Solution","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-partial-soln/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","c"],"output":2},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["A","a"],"output":32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","A"],"output":-32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["5","0"],"output":-5},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":[".","?"],"output":17}]},{"name":"Cyclic Iterator","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/cyclic-iterator/parsons.xml","tests":[{"name":"block should return a function","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1"},{"name":"sequence should start with the first value in the list","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1messagemsg
1
2424
"},{"name":"sequence should remember position","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn797"},{"name":"sequence should restart after reaching the end","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn777"}]},{"name":"Factorial","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/factorial/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[5],"output":120},{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[0],"output":1},{"type":"CustomBlockTest","name":"should compute the factorial of an unknown input","spec":"factorial %'num'","inputs":[7],"output":5040}]},{"name":"FizzBuzz","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/fizz-buzz/template.xml","tests":[{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[1],"output":1},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-39],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[3],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-50],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[5],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-150],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[15],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[0],"output":"fizzbuzz"}]},{"name":"From Infinite Sequences to Finite Lists","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/take-collect-sequences/parsons.xml","tests":[]},{"name":"Greet","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/greet/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"greet %'person'","name":"greet %'person' should start with \"Hello,\"","function":"blockBrian15Hello"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Bob"],"output":"Hello, Bob!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Alice"],"output":"Hello, Alice!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Cliff"],"output":"Hello, Cliff!"}]},{"name":"Intro to Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/intro-infinite-sequences/parsons.xml","tests":[{"name":"sequence should start with 1","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fnmessagemsg
1
"},{"name":"sequence should remember current position","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"},{"name":"sequence should produce counting numbers","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fntrue"},{"name":"two sequences should iterate independently","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"}]},{"name":"Isogram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/isogram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["letter"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["a"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["arraigning"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect first-order isogram","function":"blocksunflower"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect second-order isogram","function":"blockhorseshoer"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect third-order isogram","function":"blockgeggee"}]},{"name":"Leap Year","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/leap-year/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2015],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1970],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1996],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1960],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2100],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1900],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2000],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2400],"output":true}]},{"name":"Luhn Formula","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/luhn-formula/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"single digits cannot be valid","inputs":["8"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid credit card","inputs":["8273 1232 7352 0569"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"text with non digit is invalid","inputs":["059a"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid long number with even remainder","inputs":["1 2345 6789 1234 5678 9012"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with even digits","inputs":["095 245 88"],"output":true},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with odd number of spaces","inputs":["234 567 891 234"],"output":true}]},{"name":"Mapping Over Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/map-sequence/parsons.xml","tests":[{"name":"map should return another sequence","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map2messagemsg
"},{"name":"new sequence should contain transformed values","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map
by threes3i110true
"}]},{"name":"Minesweeper","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/minesweeper/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","*",""],["*","",""],["","*","*"]]],"output":[[2,"*",1],["*",4,3],[2,"*","*"]],"name":"board w/ mine counts on square board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*"],["*",""],["","*"]]],"output":[["*","*"],["*",4],[2,"*"]],"name":"board w/ mine counts on rectangle board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*","*"],["*","","*"],["","*",""]]],"output":[["*","*","*"],["*",6,"*"],[2,"*",2]],"name":"board w/ mine counts on dense board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","","",""],["","","","*"],["","","",""]]],"output":[[0,0,1,1],[0,0,1,"*"],[0,0,1,1]],"name":"board w/ mine counts on sparse board"}]},{"name":"Moving Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/moving-average/parsons.xml","tests":[{"name":"moving average block should return a list","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn1112"},{"name":"moving average should be computed correctly","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn-104176311.666666666666666744.666666666666667"}]},{"name":"Pangram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/pangram/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","inputs":[""],"output":false},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"lowercase pangram","inputs":["abcdefghijklmnopqrstuvwxyz"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"mixed case pangram","inputs":["abcdefghijkLMNOPQRSTUVWXYZ"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"pangram with extra symbols","inputs":["the quick brown fox jumps over a lazy dog!"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"missing a letter","inputs":["abcdefghijkLMNOPQRSTUVWYZ"],"output":false}]},{"name":"Sieve of Eratosthenes","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sieve/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should not consider 1 prime","inputs":[1],"output":[]},{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should find the all primes up to 5","inputs":[5],"output":[2,3,5]},{"type":"CustomBlockTest","name":"should find the all primes up to 30","spec":"factorial %'num'","inputs":[30],"output":[2,3,5,7,11,13,17,19,23,29]}]},{"name":"Sliding Windows","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sliding-windows/template.xml","tests":[]},{"name":"Transposing Music","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/transpose-music/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["78","1"],"output":"79","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["84","-2"],"output":"82","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["36","5"],"output":"41","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["C2","5"],"output":"41","name":"should accept note names (e.g., \"C4\")"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["50","0"],"output":"50","name":"should return original note when transposing by 0"}]},{"name":"Vigenere Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/vigenere/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["how are you?",["1","2","3","4"]],"output":"iqz$bth$zqxC"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["cba",["1","2","3"]],"output":"ddd"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["wow, negative keys?",["-2","-5","-3"]],"output":"ujt*\u001bkcb^rdsc\u001bhctp="},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["what large keys!",["100","200","300"]],"output":"[0\rXh\u0018E:\u0013Ih\u0017IA\u001f\u0005"}]}]}; + const config = {"name":"NetsBlox Exercises","assignments":[{"name":"Acronym","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/acronym/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["I Don't Know"],"output":"IDK"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["President Of The United States"],"output":"POTUS"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Shaking My Head"],"output":"SMH"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Agnetha, Bjorn, Benny, Anni-Frid"],"output":"ABBA"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Zone Improvement Plan"],"output":"ZIP"}]},{"name":"Actor's Birthday","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/actor-birthday/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Keanu Reeves"],"output":"1964-09-02"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Meryl Streep"],"output":"1949-06-22"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Denzel Washington"],"output":"1954-12-28"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Lin-Manuel Miranda"],"output":"1980-01-16"}]},{"name":"Anagram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/anagram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["shepherd","spider"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","ccat"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["olive","ilove"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","CAT"],"output":true}]},{"name":"Atbash Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/atbash/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["abc"],"output":"zyx"},{"name":"should preserve letter case","type":"CustomBlockTest","spec":"encrypt %'message'","function":"iterator fnXYZCBA"},{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["$?! +@"],"output":"$?! +@","name":"should preserve non-letters such as punctuation"}]},{"name":"Between","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/between/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[1,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[3,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,3,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[-6,-5,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[20,-5,5],"output":false}]},{"name":"Bigram Autocomplete","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/bigram-autocomplete/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list","function":"fncatcab"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list with 26 rows","function":"fncatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should contain rows that sum to 100","function":"fn100.5rowcatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return correct probabilities","function":"fn5013catcabchechi"}]},{"name":"Caesar Shift","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/caesar-shift/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["abc",2],"output":"cde"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",100],"output":"()*"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",-50],"output":"\u0012\u0013\u0014"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["with spaces",10],"output":"\u0001s~r*}zkmo}"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["no shift!",0],"output":"no shift!"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["negative wrapping!",-200],"output":"&\u001d\u001f\u0019,!.\u001dX/*\u0019((!&\u001fY"}]},{"name":"Compute the Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average/parsons.xml","tests":[]},{"name":"Compute the Average of a List","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average-list/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","1"]],"output":"1"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","2"]],"output":"1.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["-1","2","4","-3"]],"output":"0.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32"]],"output":-7.4},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32","54"]],"output":2.8333333333333335}]},{"name":"Counting Letter Frequency","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","function":"countabcc11200000000000000000000000"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","function":"counta b ! c26"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","function":"countaAbBcCzZ22200000000000000000000002"}]},{"name":"Counting Letter Frequency as Dictionary","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency-dictionary/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","inputs":["abcc"],"output":[["a",1],["b",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","inputs":["a4cc"],"output":[["a",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","inputs":["xyzZ"],"output":[["x",1],["y",1],["z",2]]}]},{"name":"Cracking the Caesar Shift with Brute Force","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-brute-force/parsons.xml","tests":[{"type":"CustomBlockTest","name":"it should find key when starts with a search word","spec":"find key where %'msg' contains %'words'","function":"code breakerhello world2messagemsg
hello2
"},{"name":"it should find key when using multiple search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces15messagemsg
hellowith15
"},{"name":"it should find key when ends with one of many search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces33messagemsg
hellospaces33
"},{"name":"it should return -1 if cannot decode message","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerno hidden words3messagemsg
hellospaces-1
"}]},{"name":"Cracking the Caesar Shift with a Partial Solution","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-partial-soln/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","c"],"output":2},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["A","a"],"output":32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","A"],"output":-32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["5","0"],"output":-5},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":[".","?"],"output":17}]},{"name":"Cyclic Iterator","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/cyclic-iterator/parsons.xml","tests":[{"name":"block should return a function","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1"},{"name":"sequence should start with the first value in the list","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1messagemsg
1
2424
"},{"name":"sequence should remember position","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn797"},{"name":"sequence should restart after reaching the end","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn777"}]},{"name":"Factorial","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/factorial/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[5],"output":120},{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[0],"output":1},{"type":"CustomBlockTest","name":"should compute the factorial of an unknown input","spec":"factorial %'num'","inputs":[7],"output":5040}]},{"name":"FizzBuzz","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/fizz-buzz/template.xml","tests":[{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[1],"output":1},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-39],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[3],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-50],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[5],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-150],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[15],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[0],"output":"fizzbuzz"}]},{"name":"From Infinite Sequences to Finite Lists","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/take-collect-sequences/parsons.xml","tests":[]},{"name":"Greet","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/greet/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"greet %'person'","name":"greet %'person' should start with \"Hello,\"","function":"blockBrian15Hello"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Bob"],"output":"Hello, Bob!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Alice"],"output":"Hello, Alice!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Cliff"],"output":"Hello, Cliff!"}]},{"name":"Intro to Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/intro-infinite-sequences/parsons.xml","tests":[{"name":"sequence should start with 1","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fnmessagemsg
1
"},{"name":"sequence should remember current position","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"},{"name":"sequence should produce counting numbers","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fntrue"},{"name":"two sequences should iterate independently","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"}]},{"name":"Isogram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/isogram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["letter"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["a"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["arraigning"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect first-order isogram","function":"blocksunflower"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect second-order isogram","function":"blockhorseshoer"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect third-order isogram","function":"blockgeggee"}]},{"name":"Leap Year","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/leap-year/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2015],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1970],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1996],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1960],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2100],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1900],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2000],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2400],"output":true}]},{"name":"Luhn Formula","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/luhn-formula/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"single digits cannot be valid","inputs":["8"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid credit card","inputs":["8273 1232 7352 0569"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"text with non digit is invalid","inputs":["059a"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid long number with even remainder","inputs":["1 2345 6789 1234 5678 9012"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with even digits","inputs":["095 245 88"],"output":true},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with odd number of spaces","inputs":["234 567 891 234"],"output":true}]},{"name":"Mapping Over Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/map-sequence/parsons.xml","tests":[{"name":"map should return another sequence","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map2messagemsg
"},{"name":"new sequence should contain transformed values","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map
by threes3i110true
"}]},{"name":"Minesweeper","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/minesweeper/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","*",""],["*","",""],["","*","*"]]],"output":[[2,"*",1],["*",4,3],[2,"*","*"]],"name":"board w/ mine counts on square board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*"],["*",""],["","*"]]],"output":[["*","*"],["*",4],[2,"*"]],"name":"board w/ mine counts on rectangle board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*","*"],["*","","*"],["","*",""]]],"output":[["*","*","*"],["*",6,"*"],[2,"*",2]],"name":"board w/ mine counts on dense board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","","",""],["","","","*"],["","","",""]]],"output":[[0,0,1,1],[0,0,1,"*"],[0,0,1,1]],"name":"board w/ mine counts on sparse board"}]},{"name":"Moving Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/moving-average/parsons.xml","tests":[{"name":"moving average block should return a list","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn1112"},{"name":"moving average should be computed correctly","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn-104176311.666666666666666744.666666666666667"}]},{"name":"Pangram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/pangram/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","inputs":[""],"output":false},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"lowercase pangram","inputs":["abcdefghijklmnopqrstuvwxyz"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"mixed case pangram","inputs":["abcdefghijkLMNOPQRSTUVWXYZ"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"pangram with extra symbols","inputs":["the quick brown fox jumps over a lazy dog!"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"missing a letter","inputs":["abcdefghijkLMNOPQRSTUVWYZ"],"output":false}]},{"name":"Sieve of Eratosthenes","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sieve/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should not consider 1 prime","inputs":[1],"output":[]},{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should find the all primes up to 5","inputs":[5],"output":[2,3,5]},{"type":"CustomBlockTest","name":"should find the all primes up to 30","spec":"factorial %'num'","inputs":[30],"output":[2,3,5,7,11,13,17,19,23,29]}]},{"name":"Sliding Windows","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sliding-windows/template.xml","tests":[]},{"name":"Transposing Music","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/transpose-music/template.xml","tests":[{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["78","1"],"output":"79","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["84","-2"],"output":"82","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["36","5"],"output":"41","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["C2","5"],"output":"41","name":"should accept note names (e.g., \"C4\")"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["50","0"],"output":"50","name":"should return original note when transposing by 0"}]},{"name":"Vigenere Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/vigenere/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["how are you?",["1","2","3","4"]],"output":"iqz$bth$zqxC"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["cba",["1","2","3"]],"output":"ddd"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["wow, negative keys?",["-2","-5","-3"]],"output":"ujt*\u001bkcb^rdsc\u001bhctp="},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["what large keys!",["100","200","300"]],"output":"[0\rXh\u0018E:\u0013Ih\u0017IA\u001f\u0005"}]}]}; const [ide] = world.children; class CustomBlockAutograder extends Extension { diff --git a/docs/autograders/cyclic-iterator.js b/docs/autograders/cyclic-iterator.js index 550e2cb..7a81fb8 100644 --- a/docs/autograders/cyclic-iterator.js +++ b/docs/autograders/cyclic-iterator.js @@ -2,7 +2,7 @@ ScrollFrameMorph, nop, HandleMorph, List, Extension, ToggleMorph, BlockMorph, Color, SpriteMorph, localize, TextMorph, MorphicPreferences, WHITE*/ (function() { - const config = {"name":"NetsBlox Exercises","assignments":[{"name":"Acronym","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/acronym/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["I Don't Know"],"output":"IDK"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["President Of The United States"],"output":"POTUS"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Shaking My Head"],"output":"SMH"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Agnetha, Bjorn, Benny, Anni-Frid"],"output":"ABBA"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Zone Improvement Plan"],"output":"ZIP"}]},{"name":"Actor's Birthday","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/actor-birthday/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Keanu Reeves"],"output":"1964-09-02"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Meryl Streep"],"output":"1949-06-22"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Denzel Washington"],"output":"1954-12-28"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Lin-Manuel Miranda"],"output":"1980-01-16"}]},{"name":"Anagram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/anagram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["shepherd","spider"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","ccat"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["olive","ilove"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","CAT"],"output":true}]},{"name":"Atbash Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/atbash/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["abc"],"output":"zyx"},{"name":"should preserve letter case","type":"CustomBlockTest","spec":"encrypt %'message'","function":"iterator fnXYZCBA"},{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["$?! +@"],"output":"$?! +@","name":"should preserve non-letters such as punctuation"}]},{"name":"Between","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/between/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[1,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[3,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,3,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[-6,-5,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[20,-5,5],"output":false}]},{"name":"Bigram Autocomplete","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/bigram-autocomplete/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list","function":"fncatcab"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list with 26 rows","function":"fncatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should contain rows that sum to 100","function":"fn100.5rowcatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return correct probabilities","function":"fn5013catcabchechi"}]},{"name":"Caesar Shift","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/caesar-shift/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["abc",2],"output":"cde"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",100],"output":"()*"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",-50],"output":"\u0012\u0013\u0014"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["with spaces",10],"output":"\u0001s~r*}zkmo}"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["no shift!",0],"output":"no shift!"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["negative wrapping!",-200],"output":"&\u001d\u001f\u0019,!.\u001dX/*\u0019((!&\u001fY"}]},{"name":"Compute the Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average/parsons.xml","tests":[]},{"name":"Compute the Average of a List","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average-list/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","1"]],"output":"1"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","2"]],"output":"1.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["-1","2","4","-3"]],"output":"0.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32"]],"output":-7.4},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32","54"]],"output":2.8333333333333335}]},{"name":"Counting Letter Frequency","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","function":"countabcc11200000000000000000000000"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","function":"counta b ! c26"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","function":"countaAbBcCzZ22200000000000000000000002"}]},{"name":"Counting Letter Frequency as Dictionary","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency-dictionary/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","inputs":["abcc"],"output":[["a",1],["b",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","inputs":["a4cc"],"output":[["a",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","inputs":["xyzZ"],"output":[["x",1],["y",1],["z",2]]}]},{"name":"Cracking the Caesar Shift with Brute Force","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-brute-force/parsons.xml","tests":[{"type":"CustomBlockTest","name":"it should find key when starts with a search word","spec":"find key where %'msg' contains %'words'","function":"code breakerhello world2messagemsg
hello2
"},{"name":"it should find key when using multiple search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces15messagemsg
hellowith15
"},{"name":"it should find key when ends with one of many search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces33messagemsg
hellospaces33
"},{"name":"it should return -1 if cannot decode message","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerno hidden words3messagemsg
hellospaces-1
"}]},{"name":"Cracking the Caesar Shift with a Partial Solution","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-partial-soln/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","c"],"output":2},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["A","a"],"output":32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","A"],"output":-32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["5","0"],"output":-5},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":[".","?"],"output":17}]},{"name":"Cyclic Iterator","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/cyclic-iterator/parsons.xml","tests":[{"name":"block should return a function","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1"},{"name":"sequence should start with the first value in the list","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1messagemsg
1
2424
"},{"name":"sequence should remember position","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn797"},{"name":"sequence should restart after reaching the end","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn777"}]},{"name":"Factorial","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/factorial/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[5],"output":120},{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[0],"output":1},{"type":"CustomBlockTest","name":"should compute the factorial of an unknown input","spec":"factorial %'num'","inputs":[7],"output":5040}]},{"name":"FizzBuzz","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/fizz-buzz/template.xml","tests":[{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[1],"output":1},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-39],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[3],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-50],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[5],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-150],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[15],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[0],"output":"fizzbuzz"}]},{"name":"From Infinite Sequences to Finite Lists","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/take-collect-sequences/parsons.xml","tests":[]},{"name":"Greet","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/greet/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"greet %'person'","name":"greet %'person' should start with \"Hello,\"","function":"blockBrian15Hello"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Bob"],"output":"Hello, Bob!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Alice"],"output":"Hello, Alice!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Cliff"],"output":"Hello, Cliff!"}]},{"name":"Intro to Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/intro-infinite-sequences/parsons.xml","tests":[{"name":"sequence should start with 1","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fnmessagemsg
1
"},{"name":"sequence should remember current position","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"},{"name":"sequence should produce counting numbers","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fntrue"},{"name":"two sequences should iterate independently","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"}]},{"name":"Isogram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/isogram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["letter"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["a"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["arraigning"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect first-order isogram","function":"blocksunflower"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect second-order isogram","function":"blockhorseshoer"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect third-order isogram","function":"blockgeggee"}]},{"name":"Leap Year","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/leap-year/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2015],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1970],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1996],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1960],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2100],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1900],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2000],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2400],"output":true}]},{"name":"Luhn Formula","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/luhn-formula/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"single digits cannot be valid","inputs":["8"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid credit card","inputs":["8273 1232 7352 0569"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"text with non digit is invalid","inputs":["059a"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid long number with even remainder","inputs":["1 2345 6789 1234 5678 9012"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with even digits","inputs":["095 245 88"],"output":true},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with odd number of spaces","inputs":["234 567 891 234"],"output":true}]},{"name":"Mapping Over Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/map-sequence/parsons.xml","tests":[{"name":"map should return another sequence","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map2messagemsg
"},{"name":"new sequence should contain transformed values","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map
by threes3i110true
"}]},{"name":"Minesweeper","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/minesweeper/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","*",""],["*","",""],["","*","*"]]],"output":[[2,"*",1],["*",4,3],[2,"*","*"]],"name":"board w/ mine counts on square board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*"],["*",""],["","*"]]],"output":[["*","*"],["*",4],[2,"*"]],"name":"board w/ mine counts on rectangle board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*","*"],["*","","*"],["","*",""]]],"output":[["*","*","*"],["*",6,"*"],[2,"*",2]],"name":"board w/ mine counts on dense board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","","",""],["","","","*"],["","","",""]]],"output":[[0,0,1,1],[0,0,1,"*"],[0,0,1,1]],"name":"board w/ mine counts on sparse board"}]},{"name":"Moving Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/moving-average/parsons.xml","tests":[{"name":"moving average block should return a list","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn1112"},{"name":"moving average should be computed correctly","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn-104176311.666666666666666744.666666666666667"}]},{"name":"Pangram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/pangram/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","inputs":[""],"output":false},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"lowercase pangram","inputs":["abcdefghijklmnopqrstuvwxyz"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"mixed case pangram","inputs":["abcdefghijkLMNOPQRSTUVWXYZ"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"pangram with extra symbols","inputs":["the quick brown fox jumps over a lazy dog!"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"missing a letter","inputs":["abcdefghijkLMNOPQRSTUVWYZ"],"output":false}]},{"name":"Sieve of Eratosthenes","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sieve/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should not consider 1 prime","inputs":[1],"output":[]},{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should find the all primes up to 5","inputs":[5],"output":[2,3,5]},{"type":"CustomBlockTest","name":"should find the all primes up to 30","spec":"factorial %'num'","inputs":[30],"output":[2,3,5,7,11,13,17,19,23,29]}]},{"name":"Sliding Windows","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sliding-windows/template.xml","tests":[]},{"name":"Transposing Music","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/transpose-music/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["78","1"],"output":"79","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["84","-2"],"output":"82","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["36","5"],"output":"41","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["C2","5"],"output":"41","name":"should accept note names (e.g., \"C4\")"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["50","0"],"output":"50","name":"should return original note when transposing by 0"}]},{"name":"Vigenere Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/vigenere/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["how are you?",["1","2","3","4"]],"output":"iqz$bth$zqxC"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["cba",["1","2","3"]],"output":"ddd"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["wow, negative keys?",["-2","-5","-3"]],"output":"ujt*\u001bkcb^rdsc\u001bhctp="},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["what large keys!",["100","200","300"]],"output":"[0\rXh\u0018E:\u0013Ih\u0017IA\u001f\u0005"}]}]}; + const config = {"name":"NetsBlox Exercises","assignments":[{"name":"Acronym","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/acronym/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["I Don't Know"],"output":"IDK"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["President Of The United States"],"output":"POTUS"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Shaking My Head"],"output":"SMH"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Agnetha, Bjorn, Benny, Anni-Frid"],"output":"ABBA"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Zone Improvement Plan"],"output":"ZIP"}]},{"name":"Actor's Birthday","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/actor-birthday/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Keanu Reeves"],"output":"1964-09-02"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Meryl Streep"],"output":"1949-06-22"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Denzel Washington"],"output":"1954-12-28"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Lin-Manuel Miranda"],"output":"1980-01-16"}]},{"name":"Anagram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/anagram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["shepherd","spider"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","ccat"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["olive","ilove"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","CAT"],"output":true}]},{"name":"Atbash Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/atbash/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["abc"],"output":"zyx"},{"name":"should preserve letter case","type":"CustomBlockTest","spec":"encrypt %'message'","function":"iterator fnXYZCBA"},{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["$?! +@"],"output":"$?! +@","name":"should preserve non-letters such as punctuation"}]},{"name":"Between","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/between/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[1,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[3,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,3,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[-6,-5,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[20,-5,5],"output":false}]},{"name":"Bigram Autocomplete","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/bigram-autocomplete/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list","function":"fncatcab"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list with 26 rows","function":"fncatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should contain rows that sum to 100","function":"fn100.5rowcatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return correct probabilities","function":"fn5013catcabchechi"}]},{"name":"Caesar Shift","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/caesar-shift/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["abc",2],"output":"cde"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",100],"output":"()*"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",-50],"output":"\u0012\u0013\u0014"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["with spaces",10],"output":"\u0001s~r*}zkmo}"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["no shift!",0],"output":"no shift!"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["negative wrapping!",-200],"output":"&\u001d\u001f\u0019,!.\u001dX/*\u0019((!&\u001fY"}]},{"name":"Compute the Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average/parsons.xml","tests":[]},{"name":"Compute the Average of a List","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average-list/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","1"]],"output":"1"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","2"]],"output":"1.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["-1","2","4","-3"]],"output":"0.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32"]],"output":-7.4},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32","54"]],"output":2.8333333333333335}]},{"name":"Counting Letter Frequency","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","function":"countabcc11200000000000000000000000"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","function":"counta b ! c26"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","function":"countaAbBcCzZ22200000000000000000000002"}]},{"name":"Counting Letter Frequency as Dictionary","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency-dictionary/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","inputs":["abcc"],"output":[["a",1],["b",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","inputs":["a4cc"],"output":[["a",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","inputs":["xyzZ"],"output":[["x",1],["y",1],["z",2]]}]},{"name":"Cracking the Caesar Shift with Brute Force","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-brute-force/parsons.xml","tests":[{"type":"CustomBlockTest","name":"it should find key when starts with a search word","spec":"find key where %'msg' contains %'words'","function":"code breakerhello world2messagemsg
hello2
"},{"name":"it should find key when using multiple search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces15messagemsg
hellowith15
"},{"name":"it should find key when ends with one of many search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces33messagemsg
hellospaces33
"},{"name":"it should return -1 if cannot decode message","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerno hidden words3messagemsg
hellospaces-1
"}]},{"name":"Cracking the Caesar Shift with a Partial Solution","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-partial-soln/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","c"],"output":2},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["A","a"],"output":32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","A"],"output":-32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["5","0"],"output":-5},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":[".","?"],"output":17}]},{"name":"Cyclic Iterator","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/cyclic-iterator/parsons.xml","tests":[{"name":"block should return a function","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1"},{"name":"sequence should start with the first value in the list","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1messagemsg
1
2424
"},{"name":"sequence should remember position","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn797"},{"name":"sequence should restart after reaching the end","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn777"}]},{"name":"Factorial","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/factorial/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[5],"output":120},{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[0],"output":1},{"type":"CustomBlockTest","name":"should compute the factorial of an unknown input","spec":"factorial %'num'","inputs":[7],"output":5040}]},{"name":"FizzBuzz","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/fizz-buzz/template.xml","tests":[{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[1],"output":1},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-39],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[3],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-50],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[5],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-150],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[15],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[0],"output":"fizzbuzz"}]},{"name":"From Infinite Sequences to Finite Lists","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/take-collect-sequences/parsons.xml","tests":[]},{"name":"Greet","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/greet/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"greet %'person'","name":"greet %'person' should start with \"Hello,\"","function":"blockBrian15Hello"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Bob"],"output":"Hello, Bob!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Alice"],"output":"Hello, Alice!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Cliff"],"output":"Hello, Cliff!"}]},{"name":"Intro to Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/intro-infinite-sequences/parsons.xml","tests":[{"name":"sequence should start with 1","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fnmessagemsg
1
"},{"name":"sequence should remember current position","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"},{"name":"sequence should produce counting numbers","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fntrue"},{"name":"two sequences should iterate independently","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"}]},{"name":"Isogram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/isogram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["letter"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["a"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["arraigning"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect first-order isogram","function":"blocksunflower"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect second-order isogram","function":"blockhorseshoer"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect third-order isogram","function":"blockgeggee"}]},{"name":"Leap Year","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/leap-year/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2015],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1970],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1996],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1960],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2100],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1900],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2000],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2400],"output":true}]},{"name":"Luhn Formula","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/luhn-formula/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"single digits cannot be valid","inputs":["8"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid credit card","inputs":["8273 1232 7352 0569"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"text with non digit is invalid","inputs":["059a"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid long number with even remainder","inputs":["1 2345 6789 1234 5678 9012"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with even digits","inputs":["095 245 88"],"output":true},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with odd number of spaces","inputs":["234 567 891 234"],"output":true}]},{"name":"Mapping Over Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/map-sequence/parsons.xml","tests":[{"name":"map should return another sequence","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map2messagemsg
"},{"name":"new sequence should contain transformed values","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map
by threes3i110true
"}]},{"name":"Minesweeper","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/minesweeper/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","*",""],["*","",""],["","*","*"]]],"output":[[2,"*",1],["*",4,3],[2,"*","*"]],"name":"board w/ mine counts on square board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*"],["*",""],["","*"]]],"output":[["*","*"],["*",4],[2,"*"]],"name":"board w/ mine counts on rectangle board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*","*"],["*","","*"],["","*",""]]],"output":[["*","*","*"],["*",6,"*"],[2,"*",2]],"name":"board w/ mine counts on dense board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","","",""],["","","","*"],["","","",""]]],"output":[[0,0,1,1],[0,0,1,"*"],[0,0,1,1]],"name":"board w/ mine counts on sparse board"}]},{"name":"Moving Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/moving-average/parsons.xml","tests":[{"name":"moving average block should return a list","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn1112"},{"name":"moving average should be computed correctly","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn-104176311.666666666666666744.666666666666667"}]},{"name":"Pangram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/pangram/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","inputs":[""],"output":false},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"lowercase pangram","inputs":["abcdefghijklmnopqrstuvwxyz"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"mixed case pangram","inputs":["abcdefghijkLMNOPQRSTUVWXYZ"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"pangram with extra symbols","inputs":["the quick brown fox jumps over a lazy dog!"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"missing a letter","inputs":["abcdefghijkLMNOPQRSTUVWYZ"],"output":false}]},{"name":"Sieve of Eratosthenes","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sieve/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should not consider 1 prime","inputs":[1],"output":[]},{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should find the all primes up to 5","inputs":[5],"output":[2,3,5]},{"type":"CustomBlockTest","name":"should find the all primes up to 30","spec":"factorial %'num'","inputs":[30],"output":[2,3,5,7,11,13,17,19,23,29]}]},{"name":"Sliding Windows","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sliding-windows/template.xml","tests":[]},{"name":"Transposing Music","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/transpose-music/template.xml","tests":[{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["78","1"],"output":"79","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["84","-2"],"output":"82","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["36","5"],"output":"41","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["C2","5"],"output":"41","name":"should accept note names (e.g., \"C4\")"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["50","0"],"output":"50","name":"should return original note when transposing by 0"}]},{"name":"Vigenere Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/vigenere/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["how are you?",["1","2","3","4"]],"output":"iqz$bth$zqxC"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["cba",["1","2","3"]],"output":"ddd"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["wow, negative keys?",["-2","-5","-3"]],"output":"ujt*\u001bkcb^rdsc\u001bhctp="},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["what large keys!",["100","200","300"]],"output":"[0\rXh\u0018E:\u0013Ih\u0017IA\u001f\u0005"}]}]}; const [ide] = world.children; class CustomBlockAutograder extends Extension { diff --git a/docs/autograders/factorial.js b/docs/autograders/factorial.js index 5d48cf2..9e6646d 100644 --- a/docs/autograders/factorial.js +++ b/docs/autograders/factorial.js @@ -2,7 +2,7 @@ ScrollFrameMorph, nop, HandleMorph, List, Extension, ToggleMorph, BlockMorph, Color, SpriteMorph, localize, TextMorph, MorphicPreferences, WHITE*/ (function() { - const config = {"name":"NetsBlox Exercises","assignments":[{"name":"Acronym","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/acronym/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["I Don't Know"],"output":"IDK"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["President Of The United States"],"output":"POTUS"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Shaking My Head"],"output":"SMH"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Agnetha, Bjorn, Benny, Anni-Frid"],"output":"ABBA"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Zone Improvement Plan"],"output":"ZIP"}]},{"name":"Actor's Birthday","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/actor-birthday/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Keanu Reeves"],"output":"1964-09-02"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Meryl Streep"],"output":"1949-06-22"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Denzel Washington"],"output":"1954-12-28"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Lin-Manuel Miranda"],"output":"1980-01-16"}]},{"name":"Anagram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/anagram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["shepherd","spider"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","ccat"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["olive","ilove"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","CAT"],"output":true}]},{"name":"Atbash Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/atbash/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["abc"],"output":"zyx"},{"name":"should preserve letter case","type":"CustomBlockTest","spec":"encrypt %'message'","function":"iterator fnXYZCBA"},{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["$?! +@"],"output":"$?! +@","name":"should preserve non-letters such as punctuation"}]},{"name":"Between","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/between/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[1,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[3,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,3,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[-6,-5,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[20,-5,5],"output":false}]},{"name":"Bigram Autocomplete","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/bigram-autocomplete/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list","function":"fncatcab"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list with 26 rows","function":"fncatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should contain rows that sum to 100","function":"fn100.5rowcatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return correct probabilities","function":"fn5013catcabchechi"}]},{"name":"Caesar Shift","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/caesar-shift/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["abc",2],"output":"cde"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",100],"output":"()*"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",-50],"output":"\u0012\u0013\u0014"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["with spaces",10],"output":"\u0001s~r*}zkmo}"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["no shift!",0],"output":"no shift!"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["negative wrapping!",-200],"output":"&\u001d\u001f\u0019,!.\u001dX/*\u0019((!&\u001fY"}]},{"name":"Compute the Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average/parsons.xml","tests":[]},{"name":"Compute the Average of a List","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average-list/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","1"]],"output":"1"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","2"]],"output":"1.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["-1","2","4","-3"]],"output":"0.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32"]],"output":-7.4},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32","54"]],"output":2.8333333333333335}]},{"name":"Counting Letter Frequency","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","function":"countabcc11200000000000000000000000"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","function":"counta b ! c26"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","function":"countaAbBcCzZ22200000000000000000000002"}]},{"name":"Counting Letter Frequency as Dictionary","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency-dictionary/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","inputs":["abcc"],"output":[["a",1],["b",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","inputs":["a4cc"],"output":[["a",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","inputs":["xyzZ"],"output":[["x",1],["y",1],["z",2]]}]},{"name":"Cracking the Caesar Shift with Brute Force","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-brute-force/parsons.xml","tests":[{"type":"CustomBlockTest","name":"it should find key when starts with a search word","spec":"find key where %'msg' contains %'words'","function":"code breakerhello world2messagemsg
hello2
"},{"name":"it should find key when using multiple search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces15messagemsg
hellowith15
"},{"name":"it should find key when ends with one of many search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces33messagemsg
hellospaces33
"},{"name":"it should return -1 if cannot decode message","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerno hidden words3messagemsg
hellospaces-1
"}]},{"name":"Cracking the Caesar Shift with a Partial Solution","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-partial-soln/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","c"],"output":2},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["A","a"],"output":32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","A"],"output":-32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["5","0"],"output":-5},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":[".","?"],"output":17}]},{"name":"Cyclic Iterator","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/cyclic-iterator/parsons.xml","tests":[{"name":"block should return a function","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1"},{"name":"sequence should start with the first value in the list","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1messagemsg
1
2424
"},{"name":"sequence should remember position","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn797"},{"name":"sequence should restart after reaching the end","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn777"}]},{"name":"Factorial","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/factorial/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[5],"output":120},{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[0],"output":1},{"type":"CustomBlockTest","name":"should compute the factorial of an unknown input","spec":"factorial %'num'","inputs":[7],"output":5040}]},{"name":"FizzBuzz","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/fizz-buzz/template.xml","tests":[{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[1],"output":1},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-39],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[3],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-50],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[5],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-150],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[15],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[0],"output":"fizzbuzz"}]},{"name":"From Infinite Sequences to Finite Lists","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/take-collect-sequences/parsons.xml","tests":[]},{"name":"Greet","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/greet/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"greet %'person'","name":"greet %'person' should start with \"Hello,\"","function":"blockBrian15Hello"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Bob"],"output":"Hello, Bob!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Alice"],"output":"Hello, Alice!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Cliff"],"output":"Hello, Cliff!"}]},{"name":"Intro to Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/intro-infinite-sequences/parsons.xml","tests":[{"name":"sequence should start with 1","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fnmessagemsg
1
"},{"name":"sequence should remember current position","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"},{"name":"sequence should produce counting numbers","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fntrue"},{"name":"two sequences should iterate independently","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"}]},{"name":"Isogram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/isogram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["letter"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["a"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["arraigning"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect first-order isogram","function":"blocksunflower"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect second-order isogram","function":"blockhorseshoer"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect third-order isogram","function":"blockgeggee"}]},{"name":"Leap Year","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/leap-year/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2015],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1970],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1996],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1960],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2100],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1900],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2000],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2400],"output":true}]},{"name":"Luhn Formula","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/luhn-formula/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"single digits cannot be valid","inputs":["8"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid credit card","inputs":["8273 1232 7352 0569"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"text with non digit is invalid","inputs":["059a"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid long number with even remainder","inputs":["1 2345 6789 1234 5678 9012"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with even digits","inputs":["095 245 88"],"output":true},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with odd number of spaces","inputs":["234 567 891 234"],"output":true}]},{"name":"Mapping Over Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/map-sequence/parsons.xml","tests":[{"name":"map should return another sequence","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map2messagemsg
"},{"name":"new sequence should contain transformed values","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map
by threes3i110true
"}]},{"name":"Minesweeper","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/minesweeper/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","*",""],["*","",""],["","*","*"]]],"output":[[2,"*",1],["*",4,3],[2,"*","*"]],"name":"board w/ mine counts on square board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*"],["*",""],["","*"]]],"output":[["*","*"],["*",4],[2,"*"]],"name":"board w/ mine counts on rectangle board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*","*"],["*","","*"],["","*",""]]],"output":[["*","*","*"],["*",6,"*"],[2,"*",2]],"name":"board w/ mine counts on dense board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","","",""],["","","","*"],["","","",""]]],"output":[[0,0,1,1],[0,0,1,"*"],[0,0,1,1]],"name":"board w/ mine counts on sparse board"}]},{"name":"Moving Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/moving-average/parsons.xml","tests":[{"name":"moving average block should return a list","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn1112"},{"name":"moving average should be computed correctly","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn-104176311.666666666666666744.666666666666667"}]},{"name":"Pangram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/pangram/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","inputs":[""],"output":false},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"lowercase pangram","inputs":["abcdefghijklmnopqrstuvwxyz"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"mixed case pangram","inputs":["abcdefghijkLMNOPQRSTUVWXYZ"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"pangram with extra symbols","inputs":["the quick brown fox jumps over a lazy dog!"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"missing a letter","inputs":["abcdefghijkLMNOPQRSTUVWYZ"],"output":false}]},{"name":"Sieve of Eratosthenes","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sieve/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should not consider 1 prime","inputs":[1],"output":[]},{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should find the all primes up to 5","inputs":[5],"output":[2,3,5]},{"type":"CustomBlockTest","name":"should find the all primes up to 30","spec":"factorial %'num'","inputs":[30],"output":[2,3,5,7,11,13,17,19,23,29]}]},{"name":"Sliding Windows","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sliding-windows/template.xml","tests":[]},{"name":"Transposing Music","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/transpose-music/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["78","1"],"output":"79","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["84","-2"],"output":"82","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["36","5"],"output":"41","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["C2","5"],"output":"41","name":"should accept note names (e.g., \"C4\")"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["50","0"],"output":"50","name":"should return original note when transposing by 0"}]},{"name":"Vigenere Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/vigenere/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["how are you?",["1","2","3","4"]],"output":"iqz$bth$zqxC"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["cba",["1","2","3"]],"output":"ddd"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["wow, negative keys?",["-2","-5","-3"]],"output":"ujt*\u001bkcb^rdsc\u001bhctp="},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["what large keys!",["100","200","300"]],"output":"[0\rXh\u0018E:\u0013Ih\u0017IA\u001f\u0005"}]}]}; + const config = {"name":"NetsBlox Exercises","assignments":[{"name":"Acronym","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/acronym/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["I Don't Know"],"output":"IDK"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["President Of The United States"],"output":"POTUS"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Shaking My Head"],"output":"SMH"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Agnetha, Bjorn, Benny, Anni-Frid"],"output":"ABBA"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Zone Improvement Plan"],"output":"ZIP"}]},{"name":"Actor's Birthday","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/actor-birthday/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Keanu Reeves"],"output":"1964-09-02"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Meryl Streep"],"output":"1949-06-22"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Denzel Washington"],"output":"1954-12-28"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Lin-Manuel Miranda"],"output":"1980-01-16"}]},{"name":"Anagram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/anagram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["shepherd","spider"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","ccat"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["olive","ilove"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","CAT"],"output":true}]},{"name":"Atbash Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/atbash/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["abc"],"output":"zyx"},{"name":"should preserve letter case","type":"CustomBlockTest","spec":"encrypt %'message'","function":"iterator fnXYZCBA"},{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["$?! +@"],"output":"$?! +@","name":"should preserve non-letters such as punctuation"}]},{"name":"Between","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/between/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[1,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[3,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,3,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[-6,-5,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[20,-5,5],"output":false}]},{"name":"Bigram Autocomplete","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/bigram-autocomplete/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list","function":"fncatcab"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list with 26 rows","function":"fncatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should contain rows that sum to 100","function":"fn100.5rowcatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return correct probabilities","function":"fn5013catcabchechi"}]},{"name":"Caesar Shift","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/caesar-shift/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["abc",2],"output":"cde"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",100],"output":"()*"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",-50],"output":"\u0012\u0013\u0014"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["with spaces",10],"output":"\u0001s~r*}zkmo}"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["no shift!",0],"output":"no shift!"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["negative wrapping!",-200],"output":"&\u001d\u001f\u0019,!.\u001dX/*\u0019((!&\u001fY"}]},{"name":"Compute the Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average/parsons.xml","tests":[]},{"name":"Compute the Average of a List","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average-list/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","1"]],"output":"1"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","2"]],"output":"1.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["-1","2","4","-3"]],"output":"0.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32"]],"output":-7.4},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32","54"]],"output":2.8333333333333335}]},{"name":"Counting Letter Frequency","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","function":"countabcc11200000000000000000000000"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","function":"counta b ! c26"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","function":"countaAbBcCzZ22200000000000000000000002"}]},{"name":"Counting Letter Frequency as Dictionary","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency-dictionary/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","inputs":["abcc"],"output":[["a",1],["b",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","inputs":["a4cc"],"output":[["a",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","inputs":["xyzZ"],"output":[["x",1],["y",1],["z",2]]}]},{"name":"Cracking the Caesar Shift with Brute Force","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-brute-force/parsons.xml","tests":[{"type":"CustomBlockTest","name":"it should find key when starts with a search word","spec":"find key where %'msg' contains %'words'","function":"code breakerhello world2messagemsg
hello2
"},{"name":"it should find key when using multiple search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces15messagemsg
hellowith15
"},{"name":"it should find key when ends with one of many search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces33messagemsg
hellospaces33
"},{"name":"it should return -1 if cannot decode message","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerno hidden words3messagemsg
hellospaces-1
"}]},{"name":"Cracking the Caesar Shift with a Partial Solution","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-partial-soln/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","c"],"output":2},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["A","a"],"output":32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","A"],"output":-32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["5","0"],"output":-5},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":[".","?"],"output":17}]},{"name":"Cyclic Iterator","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/cyclic-iterator/parsons.xml","tests":[{"name":"block should return a function","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1"},{"name":"sequence should start with the first value in the list","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1messagemsg
1
2424
"},{"name":"sequence should remember position","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn797"},{"name":"sequence should restart after reaching the end","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn777"}]},{"name":"Factorial","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/factorial/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[5],"output":120},{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[0],"output":1},{"type":"CustomBlockTest","name":"should compute the factorial of an unknown input","spec":"factorial %'num'","inputs":[7],"output":5040}]},{"name":"FizzBuzz","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/fizz-buzz/template.xml","tests":[{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[1],"output":1},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-39],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[3],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-50],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[5],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-150],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[15],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[0],"output":"fizzbuzz"}]},{"name":"From Infinite Sequences to Finite Lists","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/take-collect-sequences/parsons.xml","tests":[]},{"name":"Greet","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/greet/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"greet %'person'","name":"greet %'person' should start with \"Hello,\"","function":"blockBrian15Hello"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Bob"],"output":"Hello, Bob!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Alice"],"output":"Hello, Alice!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Cliff"],"output":"Hello, Cliff!"}]},{"name":"Intro to Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/intro-infinite-sequences/parsons.xml","tests":[{"name":"sequence should start with 1","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fnmessagemsg
1
"},{"name":"sequence should remember current position","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"},{"name":"sequence should produce counting numbers","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fntrue"},{"name":"two sequences should iterate independently","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"}]},{"name":"Isogram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/isogram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["letter"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["a"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["arraigning"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect first-order isogram","function":"blocksunflower"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect second-order isogram","function":"blockhorseshoer"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect third-order isogram","function":"blockgeggee"}]},{"name":"Leap Year","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/leap-year/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2015],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1970],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1996],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1960],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2100],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1900],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2000],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2400],"output":true}]},{"name":"Luhn Formula","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/luhn-formula/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"single digits cannot be valid","inputs":["8"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid credit card","inputs":["8273 1232 7352 0569"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"text with non digit is invalid","inputs":["059a"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid long number with even remainder","inputs":["1 2345 6789 1234 5678 9012"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with even digits","inputs":["095 245 88"],"output":true},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with odd number of spaces","inputs":["234 567 891 234"],"output":true}]},{"name":"Mapping Over Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/map-sequence/parsons.xml","tests":[{"name":"map should return another sequence","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map2messagemsg
"},{"name":"new sequence should contain transformed values","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map
by threes3i110true
"}]},{"name":"Minesweeper","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/minesweeper/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","*",""],["*","",""],["","*","*"]]],"output":[[2,"*",1],["*",4,3],[2,"*","*"]],"name":"board w/ mine counts on square board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*"],["*",""],["","*"]]],"output":[["*","*"],["*",4],[2,"*"]],"name":"board w/ mine counts on rectangle board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*","*"],["*","","*"],["","*",""]]],"output":[["*","*","*"],["*",6,"*"],[2,"*",2]],"name":"board w/ mine counts on dense board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","","",""],["","","","*"],["","","",""]]],"output":[[0,0,1,1],[0,0,1,"*"],[0,0,1,1]],"name":"board w/ mine counts on sparse board"}]},{"name":"Moving Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/moving-average/parsons.xml","tests":[{"name":"moving average block should return a list","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn1112"},{"name":"moving average should be computed correctly","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn-104176311.666666666666666744.666666666666667"}]},{"name":"Pangram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/pangram/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","inputs":[""],"output":false},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"lowercase pangram","inputs":["abcdefghijklmnopqrstuvwxyz"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"mixed case pangram","inputs":["abcdefghijkLMNOPQRSTUVWXYZ"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"pangram with extra symbols","inputs":["the quick brown fox jumps over a lazy dog!"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"missing a letter","inputs":["abcdefghijkLMNOPQRSTUVWYZ"],"output":false}]},{"name":"Sieve of Eratosthenes","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sieve/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should not consider 1 prime","inputs":[1],"output":[]},{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should find the all primes up to 5","inputs":[5],"output":[2,3,5]},{"type":"CustomBlockTest","name":"should find the all primes up to 30","spec":"factorial %'num'","inputs":[30],"output":[2,3,5,7,11,13,17,19,23,29]}]},{"name":"Sliding Windows","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sliding-windows/template.xml","tests":[]},{"name":"Transposing Music","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/transpose-music/template.xml","tests":[{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["78","1"],"output":"79","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["84","-2"],"output":"82","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["36","5"],"output":"41","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["C2","5"],"output":"41","name":"should accept note names (e.g., \"C4\")"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["50","0"],"output":"50","name":"should return original note when transposing by 0"}]},{"name":"Vigenere Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/vigenere/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["how are you?",["1","2","3","4"]],"output":"iqz$bth$zqxC"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["cba",["1","2","3"]],"output":"ddd"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["wow, negative keys?",["-2","-5","-3"]],"output":"ujt*\u001bkcb^rdsc\u001bhctp="},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["what large keys!",["100","200","300"]],"output":"[0\rXh\u0018E:\u0013Ih\u0017IA\u001f\u0005"}]}]}; const [ide] = world.children; class CustomBlockAutograder extends Extension { diff --git a/docs/autograders/fizz-buzz.js b/docs/autograders/fizz-buzz.js index 73a8d4f..1cb83af 100644 --- a/docs/autograders/fizz-buzz.js +++ b/docs/autograders/fizz-buzz.js @@ -2,7 +2,7 @@ ScrollFrameMorph, nop, HandleMorph, List, Extension, ToggleMorph, BlockMorph, Color, SpriteMorph, localize, TextMorph, MorphicPreferences, WHITE*/ (function() { - const config = {"name":"NetsBlox Exercises","assignments":[{"name":"Acronym","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/acronym/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["I Don't Know"],"output":"IDK"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["President Of The United States"],"output":"POTUS"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Shaking My Head"],"output":"SMH"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Agnetha, Bjorn, Benny, Anni-Frid"],"output":"ABBA"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Zone Improvement Plan"],"output":"ZIP"}]},{"name":"Actor's Birthday","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/actor-birthday/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Keanu Reeves"],"output":"1964-09-02"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Meryl Streep"],"output":"1949-06-22"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Denzel Washington"],"output":"1954-12-28"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Lin-Manuel Miranda"],"output":"1980-01-16"}]},{"name":"Anagram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/anagram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["shepherd","spider"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","ccat"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["olive","ilove"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","CAT"],"output":true}]},{"name":"Atbash Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/atbash/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["abc"],"output":"zyx"},{"name":"should preserve letter case","type":"CustomBlockTest","spec":"encrypt %'message'","function":"iterator fnXYZCBA"},{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["$?! +@"],"output":"$?! +@","name":"should preserve non-letters such as punctuation"}]},{"name":"Between","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/between/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[1,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[3,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,3,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[-6,-5,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[20,-5,5],"output":false}]},{"name":"Bigram Autocomplete","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/bigram-autocomplete/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list","function":"fncatcab"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list with 26 rows","function":"fncatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should contain rows that sum to 100","function":"fn100.5rowcatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return correct probabilities","function":"fn5013catcabchechi"}]},{"name":"Caesar Shift","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/caesar-shift/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["abc",2],"output":"cde"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",100],"output":"()*"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",-50],"output":"\u0012\u0013\u0014"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["with spaces",10],"output":"\u0001s~r*}zkmo}"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["no shift!",0],"output":"no shift!"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["negative wrapping!",-200],"output":"&\u001d\u001f\u0019,!.\u001dX/*\u0019((!&\u001fY"}]},{"name":"Compute the Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average/parsons.xml","tests":[]},{"name":"Compute the Average of a List","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average-list/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","1"]],"output":"1"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","2"]],"output":"1.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["-1","2","4","-3"]],"output":"0.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32"]],"output":-7.4},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32","54"]],"output":2.8333333333333335}]},{"name":"Counting Letter Frequency","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","function":"countabcc11200000000000000000000000"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","function":"counta b ! c26"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","function":"countaAbBcCzZ22200000000000000000000002"}]},{"name":"Counting Letter Frequency as Dictionary","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency-dictionary/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","inputs":["abcc"],"output":[["a",1],["b",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","inputs":["a4cc"],"output":[["a",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","inputs":["xyzZ"],"output":[["x",1],["y",1],["z",2]]}]},{"name":"Cracking the Caesar Shift with Brute Force","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-brute-force/parsons.xml","tests":[{"type":"CustomBlockTest","name":"it should find key when starts with a search word","spec":"find key where %'msg' contains %'words'","function":"code breakerhello world2messagemsg
hello2
"},{"name":"it should find key when using multiple search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces15messagemsg
hellowith15
"},{"name":"it should find key when ends with one of many search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces33messagemsg
hellospaces33
"},{"name":"it should return -1 if cannot decode message","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerno hidden words3messagemsg
hellospaces-1
"}]},{"name":"Cracking the Caesar Shift with a Partial Solution","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-partial-soln/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","c"],"output":2},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["A","a"],"output":32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","A"],"output":-32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["5","0"],"output":-5},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":[".","?"],"output":17}]},{"name":"Cyclic Iterator","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/cyclic-iterator/parsons.xml","tests":[{"name":"block should return a function","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1"},{"name":"sequence should start with the first value in the list","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1messagemsg
1
2424
"},{"name":"sequence should remember position","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn797"},{"name":"sequence should restart after reaching the end","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn777"}]},{"name":"Factorial","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/factorial/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[5],"output":120},{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[0],"output":1},{"type":"CustomBlockTest","name":"should compute the factorial of an unknown input","spec":"factorial %'num'","inputs":[7],"output":5040}]},{"name":"FizzBuzz","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/fizz-buzz/template.xml","tests":[{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[1],"output":1},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-39],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[3],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-50],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[5],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-150],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[15],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[0],"output":"fizzbuzz"}]},{"name":"From Infinite Sequences to Finite Lists","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/take-collect-sequences/parsons.xml","tests":[]},{"name":"Greet","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/greet/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"greet %'person'","name":"greet %'person' should start with \"Hello,\"","function":"blockBrian15Hello"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Bob"],"output":"Hello, Bob!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Alice"],"output":"Hello, Alice!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Cliff"],"output":"Hello, Cliff!"}]},{"name":"Intro to Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/intro-infinite-sequences/parsons.xml","tests":[{"name":"sequence should start with 1","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fnmessagemsg
1
"},{"name":"sequence should remember current position","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"},{"name":"sequence should produce counting numbers","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fntrue"},{"name":"two sequences should iterate independently","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"}]},{"name":"Isogram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/isogram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["letter"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["a"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["arraigning"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect first-order isogram","function":"blocksunflower"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect second-order isogram","function":"blockhorseshoer"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect third-order isogram","function":"blockgeggee"}]},{"name":"Leap Year","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/leap-year/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2015],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1970],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1996],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1960],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2100],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1900],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2000],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2400],"output":true}]},{"name":"Luhn Formula","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/luhn-formula/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"single digits cannot be valid","inputs":["8"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid credit card","inputs":["8273 1232 7352 0569"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"text with non digit is invalid","inputs":["059a"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid long number with even remainder","inputs":["1 2345 6789 1234 5678 9012"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with even digits","inputs":["095 245 88"],"output":true},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with odd number of spaces","inputs":["234 567 891 234"],"output":true}]},{"name":"Mapping Over Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/map-sequence/parsons.xml","tests":[{"name":"map should return another sequence","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map2messagemsg
"},{"name":"new sequence should contain transformed values","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map
by threes3i110true
"}]},{"name":"Minesweeper","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/minesweeper/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","*",""],["*","",""],["","*","*"]]],"output":[[2,"*",1],["*",4,3],[2,"*","*"]],"name":"board w/ mine counts on square board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*"],["*",""],["","*"]]],"output":[["*","*"],["*",4],[2,"*"]],"name":"board w/ mine counts on rectangle board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*","*"],["*","","*"],["","*",""]]],"output":[["*","*","*"],["*",6,"*"],[2,"*",2]],"name":"board w/ mine counts on dense board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","","",""],["","","","*"],["","","",""]]],"output":[[0,0,1,1],[0,0,1,"*"],[0,0,1,1]],"name":"board w/ mine counts on sparse board"}]},{"name":"Moving Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/moving-average/parsons.xml","tests":[{"name":"moving average block should return a list","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn1112"},{"name":"moving average should be computed correctly","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn-104176311.666666666666666744.666666666666667"}]},{"name":"Pangram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/pangram/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","inputs":[""],"output":false},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"lowercase pangram","inputs":["abcdefghijklmnopqrstuvwxyz"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"mixed case pangram","inputs":["abcdefghijkLMNOPQRSTUVWXYZ"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"pangram with extra symbols","inputs":["the quick brown fox jumps over a lazy dog!"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"missing a letter","inputs":["abcdefghijkLMNOPQRSTUVWYZ"],"output":false}]},{"name":"Sieve of Eratosthenes","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sieve/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should not consider 1 prime","inputs":[1],"output":[]},{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should find the all primes up to 5","inputs":[5],"output":[2,3,5]},{"type":"CustomBlockTest","name":"should find the all primes up to 30","spec":"factorial %'num'","inputs":[30],"output":[2,3,5,7,11,13,17,19,23,29]}]},{"name":"Sliding Windows","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sliding-windows/template.xml","tests":[]},{"name":"Transposing Music","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/transpose-music/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["78","1"],"output":"79","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["84","-2"],"output":"82","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["36","5"],"output":"41","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["C2","5"],"output":"41","name":"should accept note names (e.g., \"C4\")"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["50","0"],"output":"50","name":"should return original note when transposing by 0"}]},{"name":"Vigenere Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/vigenere/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["how are you?",["1","2","3","4"]],"output":"iqz$bth$zqxC"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["cba",["1","2","3"]],"output":"ddd"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["wow, negative keys?",["-2","-5","-3"]],"output":"ujt*\u001bkcb^rdsc\u001bhctp="},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["what large keys!",["100","200","300"]],"output":"[0\rXh\u0018E:\u0013Ih\u0017IA\u001f\u0005"}]}]}; + const config = {"name":"NetsBlox Exercises","assignments":[{"name":"Acronym","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/acronym/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["I Don't Know"],"output":"IDK"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["President Of The United States"],"output":"POTUS"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Shaking My Head"],"output":"SMH"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Agnetha, Bjorn, Benny, Anni-Frid"],"output":"ABBA"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Zone Improvement Plan"],"output":"ZIP"}]},{"name":"Actor's Birthday","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/actor-birthday/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Keanu Reeves"],"output":"1964-09-02"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Meryl Streep"],"output":"1949-06-22"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Denzel Washington"],"output":"1954-12-28"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Lin-Manuel Miranda"],"output":"1980-01-16"}]},{"name":"Anagram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/anagram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["shepherd","spider"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","ccat"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["olive","ilove"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","CAT"],"output":true}]},{"name":"Atbash Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/atbash/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["abc"],"output":"zyx"},{"name":"should preserve letter case","type":"CustomBlockTest","spec":"encrypt %'message'","function":"iterator fnXYZCBA"},{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["$?! +@"],"output":"$?! +@","name":"should preserve non-letters such as punctuation"}]},{"name":"Between","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/between/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[1,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[3,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,3,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[-6,-5,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[20,-5,5],"output":false}]},{"name":"Bigram Autocomplete","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/bigram-autocomplete/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list","function":"fncatcab"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list with 26 rows","function":"fncatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should contain rows that sum to 100","function":"fn100.5rowcatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return correct probabilities","function":"fn5013catcabchechi"}]},{"name":"Caesar Shift","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/caesar-shift/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["abc",2],"output":"cde"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",100],"output":"()*"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",-50],"output":"\u0012\u0013\u0014"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["with spaces",10],"output":"\u0001s~r*}zkmo}"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["no shift!",0],"output":"no shift!"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["negative wrapping!",-200],"output":"&\u001d\u001f\u0019,!.\u001dX/*\u0019((!&\u001fY"}]},{"name":"Compute the Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average/parsons.xml","tests":[]},{"name":"Compute the Average of a List","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average-list/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","1"]],"output":"1"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","2"]],"output":"1.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["-1","2","4","-3"]],"output":"0.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32"]],"output":-7.4},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32","54"]],"output":2.8333333333333335}]},{"name":"Counting Letter Frequency","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","function":"countabcc11200000000000000000000000"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","function":"counta b ! c26"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","function":"countaAbBcCzZ22200000000000000000000002"}]},{"name":"Counting Letter Frequency as Dictionary","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency-dictionary/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","inputs":["abcc"],"output":[["a",1],["b",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","inputs":["a4cc"],"output":[["a",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","inputs":["xyzZ"],"output":[["x",1],["y",1],["z",2]]}]},{"name":"Cracking the Caesar Shift with Brute Force","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-brute-force/parsons.xml","tests":[{"type":"CustomBlockTest","name":"it should find key when starts with a search word","spec":"find key where %'msg' contains %'words'","function":"code breakerhello world2messagemsg
hello2
"},{"name":"it should find key when using multiple search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces15messagemsg
hellowith15
"},{"name":"it should find key when ends with one of many search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces33messagemsg
hellospaces33
"},{"name":"it should return -1 if cannot decode message","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerno hidden words3messagemsg
hellospaces-1
"}]},{"name":"Cracking the Caesar Shift with a Partial Solution","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-partial-soln/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","c"],"output":2},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["A","a"],"output":32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","A"],"output":-32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["5","0"],"output":-5},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":[".","?"],"output":17}]},{"name":"Cyclic Iterator","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/cyclic-iterator/parsons.xml","tests":[{"name":"block should return a function","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1"},{"name":"sequence should start with the first value in the list","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1messagemsg
1
2424
"},{"name":"sequence should remember position","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn797"},{"name":"sequence should restart after reaching the end","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn777"}]},{"name":"Factorial","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/factorial/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[5],"output":120},{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[0],"output":1},{"type":"CustomBlockTest","name":"should compute the factorial of an unknown input","spec":"factorial %'num'","inputs":[7],"output":5040}]},{"name":"FizzBuzz","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/fizz-buzz/template.xml","tests":[{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[1],"output":1},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-39],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[3],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-50],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[5],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-150],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[15],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[0],"output":"fizzbuzz"}]},{"name":"From Infinite Sequences to Finite Lists","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/take-collect-sequences/parsons.xml","tests":[]},{"name":"Greet","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/greet/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"greet %'person'","name":"greet %'person' should start with \"Hello,\"","function":"blockBrian15Hello"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Bob"],"output":"Hello, Bob!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Alice"],"output":"Hello, Alice!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Cliff"],"output":"Hello, Cliff!"}]},{"name":"Intro to Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/intro-infinite-sequences/parsons.xml","tests":[{"name":"sequence should start with 1","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fnmessagemsg
1
"},{"name":"sequence should remember current position","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"},{"name":"sequence should produce counting numbers","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fntrue"},{"name":"two sequences should iterate independently","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"}]},{"name":"Isogram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/isogram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["letter"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["a"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["arraigning"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect first-order isogram","function":"blocksunflower"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect second-order isogram","function":"blockhorseshoer"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect third-order isogram","function":"blockgeggee"}]},{"name":"Leap Year","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/leap-year/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2015],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1970],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1996],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1960],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2100],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1900],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2000],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2400],"output":true}]},{"name":"Luhn Formula","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/luhn-formula/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"single digits cannot be valid","inputs":["8"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid credit card","inputs":["8273 1232 7352 0569"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"text with non digit is invalid","inputs":["059a"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid long number with even remainder","inputs":["1 2345 6789 1234 5678 9012"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with even digits","inputs":["095 245 88"],"output":true},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with odd number of spaces","inputs":["234 567 891 234"],"output":true}]},{"name":"Mapping Over Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/map-sequence/parsons.xml","tests":[{"name":"map should return another sequence","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map2messagemsg
"},{"name":"new sequence should contain transformed values","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map
by threes3i110true
"}]},{"name":"Minesweeper","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/minesweeper/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","*",""],["*","",""],["","*","*"]]],"output":[[2,"*",1],["*",4,3],[2,"*","*"]],"name":"board w/ mine counts on square board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*"],["*",""],["","*"]]],"output":[["*","*"],["*",4],[2,"*"]],"name":"board w/ mine counts on rectangle board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*","*"],["*","","*"],["","*",""]]],"output":[["*","*","*"],["*",6,"*"],[2,"*",2]],"name":"board w/ mine counts on dense board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","","",""],["","","","*"],["","","",""]]],"output":[[0,0,1,1],[0,0,1,"*"],[0,0,1,1]],"name":"board w/ mine counts on sparse board"}]},{"name":"Moving Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/moving-average/parsons.xml","tests":[{"name":"moving average block should return a list","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn1112"},{"name":"moving average should be computed correctly","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn-104176311.666666666666666744.666666666666667"}]},{"name":"Pangram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/pangram/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","inputs":[""],"output":false},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"lowercase pangram","inputs":["abcdefghijklmnopqrstuvwxyz"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"mixed case pangram","inputs":["abcdefghijkLMNOPQRSTUVWXYZ"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"pangram with extra symbols","inputs":["the quick brown fox jumps over a lazy dog!"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"missing a letter","inputs":["abcdefghijkLMNOPQRSTUVWYZ"],"output":false}]},{"name":"Sieve of Eratosthenes","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sieve/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should not consider 1 prime","inputs":[1],"output":[]},{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should find the all primes up to 5","inputs":[5],"output":[2,3,5]},{"type":"CustomBlockTest","name":"should find the all primes up to 30","spec":"factorial %'num'","inputs":[30],"output":[2,3,5,7,11,13,17,19,23,29]}]},{"name":"Sliding Windows","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sliding-windows/template.xml","tests":[]},{"name":"Transposing Music","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/transpose-music/template.xml","tests":[{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["78","1"],"output":"79","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["84","-2"],"output":"82","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["36","5"],"output":"41","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["C2","5"],"output":"41","name":"should accept note names (e.g., \"C4\")"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["50","0"],"output":"50","name":"should return original note when transposing by 0"}]},{"name":"Vigenere Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/vigenere/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["how are you?",["1","2","3","4"]],"output":"iqz$bth$zqxC"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["cba",["1","2","3"]],"output":"ddd"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["wow, negative keys?",["-2","-5","-3"]],"output":"ujt*\u001bkcb^rdsc\u001bhctp="},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["what large keys!",["100","200","300"]],"output":"[0\rXh\u0018E:\u0013Ih\u0017IA\u001f\u0005"}]}]}; const [ide] = world.children; class CustomBlockAutograder extends Extension { diff --git a/docs/autograders/greet.js b/docs/autograders/greet.js index d1ec520..b52180e 100644 --- a/docs/autograders/greet.js +++ b/docs/autograders/greet.js @@ -2,7 +2,7 @@ ScrollFrameMorph, nop, HandleMorph, List, Extension, ToggleMorph, BlockMorph, Color, SpriteMorph, localize, TextMorph, MorphicPreferences, WHITE*/ (function() { - const config = {"name":"NetsBlox Exercises","assignments":[{"name":"Acronym","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/acronym/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["I Don't Know"],"output":"IDK"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["President Of The United States"],"output":"POTUS"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Shaking My Head"],"output":"SMH"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Agnetha, Bjorn, Benny, Anni-Frid"],"output":"ABBA"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Zone Improvement Plan"],"output":"ZIP"}]},{"name":"Actor's Birthday","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/actor-birthday/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Keanu Reeves"],"output":"1964-09-02"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Meryl Streep"],"output":"1949-06-22"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Denzel Washington"],"output":"1954-12-28"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Lin-Manuel Miranda"],"output":"1980-01-16"}]},{"name":"Anagram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/anagram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["shepherd","spider"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","ccat"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["olive","ilove"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","CAT"],"output":true}]},{"name":"Atbash Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/atbash/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["abc"],"output":"zyx"},{"name":"should preserve letter case","type":"CustomBlockTest","spec":"encrypt %'message'","function":"iterator fnXYZCBA"},{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["$?! +@"],"output":"$?! +@","name":"should preserve non-letters such as punctuation"}]},{"name":"Between","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/between/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[1,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[3,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,3,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[-6,-5,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[20,-5,5],"output":false}]},{"name":"Bigram Autocomplete","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/bigram-autocomplete/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list","function":"fncatcab"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list with 26 rows","function":"fncatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should contain rows that sum to 100","function":"fn100.5rowcatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return correct probabilities","function":"fn5013catcabchechi"}]},{"name":"Caesar Shift","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/caesar-shift/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["abc",2],"output":"cde"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",100],"output":"()*"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",-50],"output":"\u0012\u0013\u0014"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["with spaces",10],"output":"\u0001s~r*}zkmo}"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["no shift!",0],"output":"no shift!"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["negative wrapping!",-200],"output":"&\u001d\u001f\u0019,!.\u001dX/*\u0019((!&\u001fY"}]},{"name":"Compute the Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average/parsons.xml","tests":[]},{"name":"Compute the Average of a List","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average-list/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","1"]],"output":"1"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","2"]],"output":"1.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["-1","2","4","-3"]],"output":"0.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32"]],"output":-7.4},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32","54"]],"output":2.8333333333333335}]},{"name":"Counting Letter Frequency","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","function":"countabcc11200000000000000000000000"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","function":"counta b ! c26"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","function":"countaAbBcCzZ22200000000000000000000002"}]},{"name":"Counting Letter Frequency as Dictionary","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency-dictionary/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","inputs":["abcc"],"output":[["a",1],["b",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","inputs":["a4cc"],"output":[["a",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","inputs":["xyzZ"],"output":[["x",1],["y",1],["z",2]]}]},{"name":"Cracking the Caesar Shift with Brute Force","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-brute-force/parsons.xml","tests":[{"type":"CustomBlockTest","name":"it should find key when starts with a search word","spec":"find key where %'msg' contains %'words'","function":"code breakerhello world2messagemsg
hello2
"},{"name":"it should find key when using multiple search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces15messagemsg
hellowith15
"},{"name":"it should find key when ends with one of many search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces33messagemsg
hellospaces33
"},{"name":"it should return -1 if cannot decode message","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerno hidden words3messagemsg
hellospaces-1
"}]},{"name":"Cracking the Caesar Shift with a Partial Solution","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-partial-soln/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","c"],"output":2},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["A","a"],"output":32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","A"],"output":-32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["5","0"],"output":-5},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":[".","?"],"output":17}]},{"name":"Cyclic Iterator","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/cyclic-iterator/parsons.xml","tests":[{"name":"block should return a function","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1"},{"name":"sequence should start with the first value in the list","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1messagemsg
1
2424
"},{"name":"sequence should remember position","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn797"},{"name":"sequence should restart after reaching the end","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn777"}]},{"name":"Factorial","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/factorial/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[5],"output":120},{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[0],"output":1},{"type":"CustomBlockTest","name":"should compute the factorial of an unknown input","spec":"factorial %'num'","inputs":[7],"output":5040}]},{"name":"FizzBuzz","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/fizz-buzz/template.xml","tests":[{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[1],"output":1},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-39],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[3],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-50],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[5],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-150],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[15],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[0],"output":"fizzbuzz"}]},{"name":"From Infinite Sequences to Finite Lists","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/take-collect-sequences/parsons.xml","tests":[]},{"name":"Greet","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/greet/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"greet %'person'","name":"greet %'person' should start with \"Hello,\"","function":"blockBrian15Hello"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Bob"],"output":"Hello, Bob!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Alice"],"output":"Hello, Alice!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Cliff"],"output":"Hello, Cliff!"}]},{"name":"Intro to Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/intro-infinite-sequences/parsons.xml","tests":[{"name":"sequence should start with 1","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fnmessagemsg
1
"},{"name":"sequence should remember current position","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"},{"name":"sequence should produce counting numbers","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fntrue"},{"name":"two sequences should iterate independently","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"}]},{"name":"Isogram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/isogram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["letter"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["a"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["arraigning"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect first-order isogram","function":"blocksunflower"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect second-order isogram","function":"blockhorseshoer"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect third-order isogram","function":"blockgeggee"}]},{"name":"Leap Year","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/leap-year/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2015],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1970],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1996],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1960],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2100],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1900],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2000],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2400],"output":true}]},{"name":"Luhn Formula","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/luhn-formula/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"single digits cannot be valid","inputs":["8"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid credit card","inputs":["8273 1232 7352 0569"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"text with non digit is invalid","inputs":["059a"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid long number with even remainder","inputs":["1 2345 6789 1234 5678 9012"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with even digits","inputs":["095 245 88"],"output":true},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with odd number of spaces","inputs":["234 567 891 234"],"output":true}]},{"name":"Mapping Over Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/map-sequence/parsons.xml","tests":[{"name":"map should return another sequence","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map2messagemsg
"},{"name":"new sequence should contain transformed values","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map
by threes3i110true
"}]},{"name":"Minesweeper","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/minesweeper/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","*",""],["*","",""],["","*","*"]]],"output":[[2,"*",1],["*",4,3],[2,"*","*"]],"name":"board w/ mine counts on square board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*"],["*",""],["","*"]]],"output":[["*","*"],["*",4],[2,"*"]],"name":"board w/ mine counts on rectangle board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*","*"],["*","","*"],["","*",""]]],"output":[["*","*","*"],["*",6,"*"],[2,"*",2]],"name":"board w/ mine counts on dense board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","","",""],["","","","*"],["","","",""]]],"output":[[0,0,1,1],[0,0,1,"*"],[0,0,1,1]],"name":"board w/ mine counts on sparse board"}]},{"name":"Moving Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/moving-average/parsons.xml","tests":[{"name":"moving average block should return a list","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn1112"},{"name":"moving average should be computed correctly","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn-104176311.666666666666666744.666666666666667"}]},{"name":"Pangram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/pangram/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","inputs":[""],"output":false},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"lowercase pangram","inputs":["abcdefghijklmnopqrstuvwxyz"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"mixed case pangram","inputs":["abcdefghijkLMNOPQRSTUVWXYZ"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"pangram with extra symbols","inputs":["the quick brown fox jumps over a lazy dog!"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"missing a letter","inputs":["abcdefghijkLMNOPQRSTUVWYZ"],"output":false}]},{"name":"Sieve of Eratosthenes","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sieve/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should not consider 1 prime","inputs":[1],"output":[]},{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should find the all primes up to 5","inputs":[5],"output":[2,3,5]},{"type":"CustomBlockTest","name":"should find the all primes up to 30","spec":"factorial %'num'","inputs":[30],"output":[2,3,5,7,11,13,17,19,23,29]}]},{"name":"Sliding Windows","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sliding-windows/template.xml","tests":[]},{"name":"Transposing Music","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/transpose-music/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["78","1"],"output":"79","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["84","-2"],"output":"82","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["36","5"],"output":"41","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["C2","5"],"output":"41","name":"should accept note names (e.g., \"C4\")"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["50","0"],"output":"50","name":"should return original note when transposing by 0"}]},{"name":"Vigenere Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/vigenere/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["how are you?",["1","2","3","4"]],"output":"iqz$bth$zqxC"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["cba",["1","2","3"]],"output":"ddd"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["wow, negative keys?",["-2","-5","-3"]],"output":"ujt*\u001bkcb^rdsc\u001bhctp="},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["what large keys!",["100","200","300"]],"output":"[0\rXh\u0018E:\u0013Ih\u0017IA\u001f\u0005"}]}]}; + const config = {"name":"NetsBlox Exercises","assignments":[{"name":"Acronym","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/acronym/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["I Don't Know"],"output":"IDK"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["President Of The United States"],"output":"POTUS"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Shaking My Head"],"output":"SMH"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Agnetha, Bjorn, Benny, Anni-Frid"],"output":"ABBA"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Zone Improvement Plan"],"output":"ZIP"}]},{"name":"Actor's Birthday","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/actor-birthday/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Keanu Reeves"],"output":"1964-09-02"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Meryl Streep"],"output":"1949-06-22"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Denzel Washington"],"output":"1954-12-28"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Lin-Manuel Miranda"],"output":"1980-01-16"}]},{"name":"Anagram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/anagram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["shepherd","spider"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","ccat"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["olive","ilove"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","CAT"],"output":true}]},{"name":"Atbash Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/atbash/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["abc"],"output":"zyx"},{"name":"should preserve letter case","type":"CustomBlockTest","spec":"encrypt %'message'","function":"iterator fnXYZCBA"},{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["$?! +@"],"output":"$?! +@","name":"should preserve non-letters such as punctuation"}]},{"name":"Between","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/between/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[1,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[3,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,3,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[-6,-5,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[20,-5,5],"output":false}]},{"name":"Bigram Autocomplete","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/bigram-autocomplete/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list","function":"fncatcab"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list with 26 rows","function":"fncatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should contain rows that sum to 100","function":"fn100.5rowcatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return correct probabilities","function":"fn5013catcabchechi"}]},{"name":"Caesar Shift","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/caesar-shift/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["abc",2],"output":"cde"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",100],"output":"()*"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",-50],"output":"\u0012\u0013\u0014"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["with spaces",10],"output":"\u0001s~r*}zkmo}"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["no shift!",0],"output":"no shift!"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["negative wrapping!",-200],"output":"&\u001d\u001f\u0019,!.\u001dX/*\u0019((!&\u001fY"}]},{"name":"Compute the Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average/parsons.xml","tests":[]},{"name":"Compute the Average of a List","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average-list/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","1"]],"output":"1"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","2"]],"output":"1.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["-1","2","4","-3"]],"output":"0.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32"]],"output":-7.4},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32","54"]],"output":2.8333333333333335}]},{"name":"Counting Letter Frequency","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","function":"countabcc11200000000000000000000000"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","function":"counta b ! c26"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","function":"countaAbBcCzZ22200000000000000000000002"}]},{"name":"Counting Letter Frequency as Dictionary","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency-dictionary/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","inputs":["abcc"],"output":[["a",1],["b",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","inputs":["a4cc"],"output":[["a",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","inputs":["xyzZ"],"output":[["x",1],["y",1],["z",2]]}]},{"name":"Cracking the Caesar Shift with Brute Force","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-brute-force/parsons.xml","tests":[{"type":"CustomBlockTest","name":"it should find key when starts with a search word","spec":"find key where %'msg' contains %'words'","function":"code breakerhello world2messagemsg
hello2
"},{"name":"it should find key when using multiple search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces15messagemsg
hellowith15
"},{"name":"it should find key when ends with one of many search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces33messagemsg
hellospaces33
"},{"name":"it should return -1 if cannot decode message","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerno hidden words3messagemsg
hellospaces-1
"}]},{"name":"Cracking the Caesar Shift with a Partial Solution","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-partial-soln/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","c"],"output":2},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["A","a"],"output":32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","A"],"output":-32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["5","0"],"output":-5},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":[".","?"],"output":17}]},{"name":"Cyclic Iterator","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/cyclic-iterator/parsons.xml","tests":[{"name":"block should return a function","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1"},{"name":"sequence should start with the first value in the list","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1messagemsg
1
2424
"},{"name":"sequence should remember position","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn797"},{"name":"sequence should restart after reaching the end","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn777"}]},{"name":"Factorial","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/factorial/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[5],"output":120},{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[0],"output":1},{"type":"CustomBlockTest","name":"should compute the factorial of an unknown input","spec":"factorial %'num'","inputs":[7],"output":5040}]},{"name":"FizzBuzz","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/fizz-buzz/template.xml","tests":[{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[1],"output":1},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-39],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[3],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-50],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[5],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-150],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[15],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[0],"output":"fizzbuzz"}]},{"name":"From Infinite Sequences to Finite Lists","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/take-collect-sequences/parsons.xml","tests":[]},{"name":"Greet","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/greet/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"greet %'person'","name":"greet %'person' should start with \"Hello,\"","function":"blockBrian15Hello"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Bob"],"output":"Hello, Bob!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Alice"],"output":"Hello, Alice!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Cliff"],"output":"Hello, Cliff!"}]},{"name":"Intro to Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/intro-infinite-sequences/parsons.xml","tests":[{"name":"sequence should start with 1","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fnmessagemsg
1
"},{"name":"sequence should remember current position","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"},{"name":"sequence should produce counting numbers","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fntrue"},{"name":"two sequences should iterate independently","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"}]},{"name":"Isogram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/isogram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["letter"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["a"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["arraigning"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect first-order isogram","function":"blocksunflower"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect second-order isogram","function":"blockhorseshoer"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect third-order isogram","function":"blockgeggee"}]},{"name":"Leap Year","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/leap-year/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2015],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1970],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1996],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1960],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2100],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1900],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2000],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2400],"output":true}]},{"name":"Luhn Formula","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/luhn-formula/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"single digits cannot be valid","inputs":["8"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid credit card","inputs":["8273 1232 7352 0569"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"text with non digit is invalid","inputs":["059a"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid long number with even remainder","inputs":["1 2345 6789 1234 5678 9012"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with even digits","inputs":["095 245 88"],"output":true},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with odd number of spaces","inputs":["234 567 891 234"],"output":true}]},{"name":"Mapping Over Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/map-sequence/parsons.xml","tests":[{"name":"map should return another sequence","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map2messagemsg
"},{"name":"new sequence should contain transformed values","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map
by threes3i110true
"}]},{"name":"Minesweeper","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/minesweeper/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","*",""],["*","",""],["","*","*"]]],"output":[[2,"*",1],["*",4,3],[2,"*","*"]],"name":"board w/ mine counts on square board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*"],["*",""],["","*"]]],"output":[["*","*"],["*",4],[2,"*"]],"name":"board w/ mine counts on rectangle board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*","*"],["*","","*"],["","*",""]]],"output":[["*","*","*"],["*",6,"*"],[2,"*",2]],"name":"board w/ mine counts on dense board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","","",""],["","","","*"],["","","",""]]],"output":[[0,0,1,1],[0,0,1,"*"],[0,0,1,1]],"name":"board w/ mine counts on sparse board"}]},{"name":"Moving Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/moving-average/parsons.xml","tests":[{"name":"moving average block should return a list","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn1112"},{"name":"moving average should be computed correctly","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn-104176311.666666666666666744.666666666666667"}]},{"name":"Pangram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/pangram/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","inputs":[""],"output":false},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"lowercase pangram","inputs":["abcdefghijklmnopqrstuvwxyz"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"mixed case pangram","inputs":["abcdefghijkLMNOPQRSTUVWXYZ"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"pangram with extra symbols","inputs":["the quick brown fox jumps over a lazy dog!"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"missing a letter","inputs":["abcdefghijkLMNOPQRSTUVWYZ"],"output":false}]},{"name":"Sieve of Eratosthenes","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sieve/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should not consider 1 prime","inputs":[1],"output":[]},{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should find the all primes up to 5","inputs":[5],"output":[2,3,5]},{"type":"CustomBlockTest","name":"should find the all primes up to 30","spec":"factorial %'num'","inputs":[30],"output":[2,3,5,7,11,13,17,19,23,29]}]},{"name":"Sliding Windows","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sliding-windows/template.xml","tests":[]},{"name":"Transposing Music","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/transpose-music/template.xml","tests":[{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["78","1"],"output":"79","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["84","-2"],"output":"82","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["36","5"],"output":"41","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["C2","5"],"output":"41","name":"should accept note names (e.g., \"C4\")"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["50","0"],"output":"50","name":"should return original note when transposing by 0"}]},{"name":"Vigenere Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/vigenere/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["how are you?",["1","2","3","4"]],"output":"iqz$bth$zqxC"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["cba",["1","2","3"]],"output":"ddd"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["wow, negative keys?",["-2","-5","-3"]],"output":"ujt*\u001bkcb^rdsc\u001bhctp="},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["what large keys!",["100","200","300"]],"output":"[0\rXh\u0018E:\u0013Ih\u0017IA\u001f\u0005"}]}]}; const [ide] = world.children; class CustomBlockAutograder extends Extension { diff --git a/docs/autograders/intro-infinite-sequences.js b/docs/autograders/intro-infinite-sequences.js index 3b2f8e4..169acdb 100644 --- a/docs/autograders/intro-infinite-sequences.js +++ b/docs/autograders/intro-infinite-sequences.js @@ -2,7 +2,7 @@ ScrollFrameMorph, nop, HandleMorph, List, Extension, ToggleMorph, BlockMorph, Color, SpriteMorph, localize, TextMorph, MorphicPreferences, WHITE*/ (function() { - const config = {"name":"NetsBlox Exercises","assignments":[{"name":"Acronym","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/acronym/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["I Don't Know"],"output":"IDK"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["President Of The United States"],"output":"POTUS"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Shaking My Head"],"output":"SMH"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Agnetha, Bjorn, Benny, Anni-Frid"],"output":"ABBA"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Zone Improvement Plan"],"output":"ZIP"}]},{"name":"Actor's Birthday","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/actor-birthday/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Keanu Reeves"],"output":"1964-09-02"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Meryl Streep"],"output":"1949-06-22"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Denzel Washington"],"output":"1954-12-28"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Lin-Manuel Miranda"],"output":"1980-01-16"}]},{"name":"Anagram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/anagram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["shepherd","spider"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","ccat"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["olive","ilove"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","CAT"],"output":true}]},{"name":"Atbash Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/atbash/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["abc"],"output":"zyx"},{"name":"should preserve letter case","type":"CustomBlockTest","spec":"encrypt %'message'","function":"iterator fnXYZCBA"},{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["$?! +@"],"output":"$?! +@","name":"should preserve non-letters such as punctuation"}]},{"name":"Between","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/between/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[1,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[3,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,3,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[-6,-5,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[20,-5,5],"output":false}]},{"name":"Bigram Autocomplete","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/bigram-autocomplete/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list","function":"fncatcab"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list with 26 rows","function":"fncatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should contain rows that sum to 100","function":"fn100.5rowcatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return correct probabilities","function":"fn5013catcabchechi"}]},{"name":"Caesar Shift","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/caesar-shift/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["abc",2],"output":"cde"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",100],"output":"()*"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",-50],"output":"\u0012\u0013\u0014"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["with spaces",10],"output":"\u0001s~r*}zkmo}"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["no shift!",0],"output":"no shift!"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["negative wrapping!",-200],"output":"&\u001d\u001f\u0019,!.\u001dX/*\u0019((!&\u001fY"}]},{"name":"Compute the Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average/parsons.xml","tests":[]},{"name":"Compute the Average of a List","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average-list/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","1"]],"output":"1"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","2"]],"output":"1.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["-1","2","4","-3"]],"output":"0.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32"]],"output":-7.4},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32","54"]],"output":2.8333333333333335}]},{"name":"Counting Letter Frequency","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","function":"countabcc11200000000000000000000000"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","function":"counta b ! c26"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","function":"countaAbBcCzZ22200000000000000000000002"}]},{"name":"Counting Letter Frequency as Dictionary","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency-dictionary/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","inputs":["abcc"],"output":[["a",1],["b",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","inputs":["a4cc"],"output":[["a",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","inputs":["xyzZ"],"output":[["x",1],["y",1],["z",2]]}]},{"name":"Cracking the Caesar Shift with Brute Force","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-brute-force/parsons.xml","tests":[{"type":"CustomBlockTest","name":"it should find key when starts with a search word","spec":"find key where %'msg' contains %'words'","function":"code breakerhello world2messagemsg
hello2
"},{"name":"it should find key when using multiple search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces15messagemsg
hellowith15
"},{"name":"it should find key when ends with one of many search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces33messagemsg
hellospaces33
"},{"name":"it should return -1 if cannot decode message","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerno hidden words3messagemsg
hellospaces-1
"}]},{"name":"Cracking the Caesar Shift with a Partial Solution","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-partial-soln/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","c"],"output":2},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["A","a"],"output":32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","A"],"output":-32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["5","0"],"output":-5},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":[".","?"],"output":17}]},{"name":"Cyclic Iterator","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/cyclic-iterator/parsons.xml","tests":[{"name":"block should return a function","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1"},{"name":"sequence should start with the first value in the list","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1messagemsg
1
2424
"},{"name":"sequence should remember position","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn797"},{"name":"sequence should restart after reaching the end","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn777"}]},{"name":"Factorial","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/factorial/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[5],"output":120},{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[0],"output":1},{"type":"CustomBlockTest","name":"should compute the factorial of an unknown input","spec":"factorial %'num'","inputs":[7],"output":5040}]},{"name":"FizzBuzz","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/fizz-buzz/template.xml","tests":[{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[1],"output":1},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-39],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[3],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-50],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[5],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-150],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[15],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[0],"output":"fizzbuzz"}]},{"name":"From Infinite Sequences to Finite Lists","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/take-collect-sequences/parsons.xml","tests":[]},{"name":"Greet","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/greet/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"greet %'person'","name":"greet %'person' should start with \"Hello,\"","function":"blockBrian15Hello"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Bob"],"output":"Hello, Bob!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Alice"],"output":"Hello, Alice!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Cliff"],"output":"Hello, Cliff!"}]},{"name":"Intro to Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/intro-infinite-sequences/parsons.xml","tests":[{"name":"sequence should start with 1","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fnmessagemsg
1
"},{"name":"sequence should remember current position","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"},{"name":"sequence should produce counting numbers","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fntrue"},{"name":"two sequences should iterate independently","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"}]},{"name":"Isogram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/isogram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["letter"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["a"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["arraigning"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect first-order isogram","function":"blocksunflower"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect second-order isogram","function":"blockhorseshoer"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect third-order isogram","function":"blockgeggee"}]},{"name":"Leap Year","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/leap-year/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2015],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1970],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1996],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1960],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2100],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1900],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2000],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2400],"output":true}]},{"name":"Luhn Formula","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/luhn-formula/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"single digits cannot be valid","inputs":["8"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid credit card","inputs":["8273 1232 7352 0569"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"text with non digit is invalid","inputs":["059a"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid long number with even remainder","inputs":["1 2345 6789 1234 5678 9012"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with even digits","inputs":["095 245 88"],"output":true},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with odd number of spaces","inputs":["234 567 891 234"],"output":true}]},{"name":"Mapping Over Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/map-sequence/parsons.xml","tests":[{"name":"map should return another sequence","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map2messagemsg
"},{"name":"new sequence should contain transformed values","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map
by threes3i110true
"}]},{"name":"Minesweeper","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/minesweeper/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","*",""],["*","",""],["","*","*"]]],"output":[[2,"*",1],["*",4,3],[2,"*","*"]],"name":"board w/ mine counts on square board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*"],["*",""],["","*"]]],"output":[["*","*"],["*",4],[2,"*"]],"name":"board w/ mine counts on rectangle board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*","*"],["*","","*"],["","*",""]]],"output":[["*","*","*"],["*",6,"*"],[2,"*",2]],"name":"board w/ mine counts on dense board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","","",""],["","","","*"],["","","",""]]],"output":[[0,0,1,1],[0,0,1,"*"],[0,0,1,1]],"name":"board w/ mine counts on sparse board"}]},{"name":"Moving Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/moving-average/parsons.xml","tests":[{"name":"moving average block should return a list","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn1112"},{"name":"moving average should be computed correctly","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn-104176311.666666666666666744.666666666666667"}]},{"name":"Pangram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/pangram/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","inputs":[""],"output":false},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"lowercase pangram","inputs":["abcdefghijklmnopqrstuvwxyz"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"mixed case pangram","inputs":["abcdefghijkLMNOPQRSTUVWXYZ"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"pangram with extra symbols","inputs":["the quick brown fox jumps over a lazy dog!"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"missing a letter","inputs":["abcdefghijkLMNOPQRSTUVWYZ"],"output":false}]},{"name":"Sieve of Eratosthenes","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sieve/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should not consider 1 prime","inputs":[1],"output":[]},{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should find the all primes up to 5","inputs":[5],"output":[2,3,5]},{"type":"CustomBlockTest","name":"should find the all primes up to 30","spec":"factorial %'num'","inputs":[30],"output":[2,3,5,7,11,13,17,19,23,29]}]},{"name":"Sliding Windows","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sliding-windows/template.xml","tests":[]},{"name":"Transposing Music","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/transpose-music/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["78","1"],"output":"79","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["84","-2"],"output":"82","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["36","5"],"output":"41","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["C2","5"],"output":"41","name":"should accept note names (e.g., \"C4\")"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["50","0"],"output":"50","name":"should return original note when transposing by 0"}]},{"name":"Vigenere Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/vigenere/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["how are you?",["1","2","3","4"]],"output":"iqz$bth$zqxC"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["cba",["1","2","3"]],"output":"ddd"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["wow, negative keys?",["-2","-5","-3"]],"output":"ujt*\u001bkcb^rdsc\u001bhctp="},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["what large keys!",["100","200","300"]],"output":"[0\rXh\u0018E:\u0013Ih\u0017IA\u001f\u0005"}]}]}; + const config = {"name":"NetsBlox Exercises","assignments":[{"name":"Acronym","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/acronym/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["I Don't Know"],"output":"IDK"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["President Of The United States"],"output":"POTUS"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Shaking My Head"],"output":"SMH"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Agnetha, Bjorn, Benny, Anni-Frid"],"output":"ABBA"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Zone Improvement Plan"],"output":"ZIP"}]},{"name":"Actor's Birthday","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/actor-birthday/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Keanu Reeves"],"output":"1964-09-02"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Meryl Streep"],"output":"1949-06-22"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Denzel Washington"],"output":"1954-12-28"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Lin-Manuel Miranda"],"output":"1980-01-16"}]},{"name":"Anagram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/anagram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["shepherd","spider"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","ccat"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["olive","ilove"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","CAT"],"output":true}]},{"name":"Atbash Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/atbash/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["abc"],"output":"zyx"},{"name":"should preserve letter case","type":"CustomBlockTest","spec":"encrypt %'message'","function":"iterator fnXYZCBA"},{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["$?! +@"],"output":"$?! +@","name":"should preserve non-letters such as punctuation"}]},{"name":"Between","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/between/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[1,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[3,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,3,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[-6,-5,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[20,-5,5],"output":false}]},{"name":"Bigram Autocomplete","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/bigram-autocomplete/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list","function":"fncatcab"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list with 26 rows","function":"fncatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should contain rows that sum to 100","function":"fn100.5rowcatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return correct probabilities","function":"fn5013catcabchechi"}]},{"name":"Caesar Shift","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/caesar-shift/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["abc",2],"output":"cde"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",100],"output":"()*"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",-50],"output":"\u0012\u0013\u0014"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["with spaces",10],"output":"\u0001s~r*}zkmo}"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["no shift!",0],"output":"no shift!"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["negative wrapping!",-200],"output":"&\u001d\u001f\u0019,!.\u001dX/*\u0019((!&\u001fY"}]},{"name":"Compute the Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average/parsons.xml","tests":[]},{"name":"Compute the Average of a List","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average-list/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","1"]],"output":"1"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","2"]],"output":"1.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["-1","2","4","-3"]],"output":"0.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32"]],"output":-7.4},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32","54"]],"output":2.8333333333333335}]},{"name":"Counting Letter Frequency","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","function":"countabcc11200000000000000000000000"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","function":"counta b ! c26"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","function":"countaAbBcCzZ22200000000000000000000002"}]},{"name":"Counting Letter Frequency as Dictionary","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency-dictionary/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","inputs":["abcc"],"output":[["a",1],["b",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","inputs":["a4cc"],"output":[["a",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","inputs":["xyzZ"],"output":[["x",1],["y",1],["z",2]]}]},{"name":"Cracking the Caesar Shift with Brute Force","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-brute-force/parsons.xml","tests":[{"type":"CustomBlockTest","name":"it should find key when starts with a search word","spec":"find key where %'msg' contains %'words'","function":"code breakerhello world2messagemsg
hello2
"},{"name":"it should find key when using multiple search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces15messagemsg
hellowith15
"},{"name":"it should find key when ends with one of many search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces33messagemsg
hellospaces33
"},{"name":"it should return -1 if cannot decode message","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerno hidden words3messagemsg
hellospaces-1
"}]},{"name":"Cracking the Caesar Shift with a Partial Solution","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-partial-soln/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","c"],"output":2},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["A","a"],"output":32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","A"],"output":-32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["5","0"],"output":-5},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":[".","?"],"output":17}]},{"name":"Cyclic Iterator","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/cyclic-iterator/parsons.xml","tests":[{"name":"block should return a function","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1"},{"name":"sequence should start with the first value in the list","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1messagemsg
1
2424
"},{"name":"sequence should remember position","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn797"},{"name":"sequence should restart after reaching the end","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn777"}]},{"name":"Factorial","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/factorial/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[5],"output":120},{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[0],"output":1},{"type":"CustomBlockTest","name":"should compute the factorial of an unknown input","spec":"factorial %'num'","inputs":[7],"output":5040}]},{"name":"FizzBuzz","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/fizz-buzz/template.xml","tests":[{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[1],"output":1},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-39],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[3],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-50],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[5],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-150],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[15],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[0],"output":"fizzbuzz"}]},{"name":"From Infinite Sequences to Finite Lists","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/take-collect-sequences/parsons.xml","tests":[]},{"name":"Greet","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/greet/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"greet %'person'","name":"greet %'person' should start with \"Hello,\"","function":"blockBrian15Hello"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Bob"],"output":"Hello, Bob!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Alice"],"output":"Hello, Alice!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Cliff"],"output":"Hello, Cliff!"}]},{"name":"Intro to Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/intro-infinite-sequences/parsons.xml","tests":[{"name":"sequence should start with 1","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fnmessagemsg
1
"},{"name":"sequence should remember current position","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"},{"name":"sequence should produce counting numbers","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fntrue"},{"name":"two sequences should iterate independently","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"}]},{"name":"Isogram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/isogram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["letter"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["a"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["arraigning"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect first-order isogram","function":"blocksunflower"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect second-order isogram","function":"blockhorseshoer"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect third-order isogram","function":"blockgeggee"}]},{"name":"Leap Year","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/leap-year/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2015],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1970],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1996],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1960],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2100],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1900],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2000],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2400],"output":true}]},{"name":"Luhn Formula","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/luhn-formula/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"single digits cannot be valid","inputs":["8"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid credit card","inputs":["8273 1232 7352 0569"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"text with non digit is invalid","inputs":["059a"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid long number with even remainder","inputs":["1 2345 6789 1234 5678 9012"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with even digits","inputs":["095 245 88"],"output":true},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with odd number of spaces","inputs":["234 567 891 234"],"output":true}]},{"name":"Mapping Over Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/map-sequence/parsons.xml","tests":[{"name":"map should return another sequence","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map2messagemsg
"},{"name":"new sequence should contain transformed values","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map
by threes3i110true
"}]},{"name":"Minesweeper","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/minesweeper/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","*",""],["*","",""],["","*","*"]]],"output":[[2,"*",1],["*",4,3],[2,"*","*"]],"name":"board w/ mine counts on square board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*"],["*",""],["","*"]]],"output":[["*","*"],["*",4],[2,"*"]],"name":"board w/ mine counts on rectangle board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*","*"],["*","","*"],["","*",""]]],"output":[["*","*","*"],["*",6,"*"],[2,"*",2]],"name":"board w/ mine counts on dense board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","","",""],["","","","*"],["","","",""]]],"output":[[0,0,1,1],[0,0,1,"*"],[0,0,1,1]],"name":"board w/ mine counts on sparse board"}]},{"name":"Moving Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/moving-average/parsons.xml","tests":[{"name":"moving average block should return a list","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn1112"},{"name":"moving average should be computed correctly","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn-104176311.666666666666666744.666666666666667"}]},{"name":"Pangram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/pangram/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","inputs":[""],"output":false},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"lowercase pangram","inputs":["abcdefghijklmnopqrstuvwxyz"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"mixed case pangram","inputs":["abcdefghijkLMNOPQRSTUVWXYZ"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"pangram with extra symbols","inputs":["the quick brown fox jumps over a lazy dog!"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"missing a letter","inputs":["abcdefghijkLMNOPQRSTUVWYZ"],"output":false}]},{"name":"Sieve of Eratosthenes","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sieve/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should not consider 1 prime","inputs":[1],"output":[]},{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should find the all primes up to 5","inputs":[5],"output":[2,3,5]},{"type":"CustomBlockTest","name":"should find the all primes up to 30","spec":"factorial %'num'","inputs":[30],"output":[2,3,5,7,11,13,17,19,23,29]}]},{"name":"Sliding Windows","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sliding-windows/template.xml","tests":[]},{"name":"Transposing Music","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/transpose-music/template.xml","tests":[{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["78","1"],"output":"79","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["84","-2"],"output":"82","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["36","5"],"output":"41","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["C2","5"],"output":"41","name":"should accept note names (e.g., \"C4\")"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["50","0"],"output":"50","name":"should return original note when transposing by 0"}]},{"name":"Vigenere Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/vigenere/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["how are you?",["1","2","3","4"]],"output":"iqz$bth$zqxC"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["cba",["1","2","3"]],"output":"ddd"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["wow, negative keys?",["-2","-5","-3"]],"output":"ujt*\u001bkcb^rdsc\u001bhctp="},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["what large keys!",["100","200","300"]],"output":"[0\rXh\u0018E:\u0013Ih\u0017IA\u001f\u0005"}]}]}; const [ide] = world.children; class CustomBlockAutograder extends Extension { diff --git a/docs/autograders/isogram.js b/docs/autograders/isogram.js index 1f7b749..fc6be42 100644 --- a/docs/autograders/isogram.js +++ b/docs/autograders/isogram.js @@ -2,7 +2,7 @@ ScrollFrameMorph, nop, HandleMorph, List, Extension, ToggleMorph, BlockMorph, Color, SpriteMorph, localize, TextMorph, MorphicPreferences, WHITE*/ (function() { - const config = {"name":"NetsBlox Exercises","assignments":[{"name":"Acronym","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/acronym/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["I Don't Know"],"output":"IDK"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["President Of The United States"],"output":"POTUS"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Shaking My Head"],"output":"SMH"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Agnetha, Bjorn, Benny, Anni-Frid"],"output":"ABBA"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Zone Improvement Plan"],"output":"ZIP"}]},{"name":"Actor's Birthday","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/actor-birthday/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Keanu Reeves"],"output":"1964-09-02"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Meryl Streep"],"output":"1949-06-22"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Denzel Washington"],"output":"1954-12-28"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Lin-Manuel Miranda"],"output":"1980-01-16"}]},{"name":"Anagram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/anagram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["shepherd","spider"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","ccat"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["olive","ilove"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","CAT"],"output":true}]},{"name":"Atbash Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/atbash/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["abc"],"output":"zyx"},{"name":"should preserve letter case","type":"CustomBlockTest","spec":"encrypt %'message'","function":"iterator fnXYZCBA"},{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["$?! +@"],"output":"$?! +@","name":"should preserve non-letters such as punctuation"}]},{"name":"Between","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/between/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[1,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[3,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,3,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[-6,-5,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[20,-5,5],"output":false}]},{"name":"Bigram Autocomplete","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/bigram-autocomplete/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list","function":"fncatcab"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list with 26 rows","function":"fncatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should contain rows that sum to 100","function":"fn100.5rowcatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return correct probabilities","function":"fn5013catcabchechi"}]},{"name":"Caesar Shift","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/caesar-shift/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["abc",2],"output":"cde"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",100],"output":"()*"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",-50],"output":"\u0012\u0013\u0014"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["with spaces",10],"output":"\u0001s~r*}zkmo}"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["no shift!",0],"output":"no shift!"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["negative wrapping!",-200],"output":"&\u001d\u001f\u0019,!.\u001dX/*\u0019((!&\u001fY"}]},{"name":"Compute the Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average/parsons.xml","tests":[]},{"name":"Compute the Average of a List","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average-list/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","1"]],"output":"1"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","2"]],"output":"1.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["-1","2","4","-3"]],"output":"0.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32"]],"output":-7.4},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32","54"]],"output":2.8333333333333335}]},{"name":"Counting Letter Frequency","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","function":"countabcc11200000000000000000000000"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","function":"counta b ! c26"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","function":"countaAbBcCzZ22200000000000000000000002"}]},{"name":"Counting Letter Frequency as Dictionary","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency-dictionary/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","inputs":["abcc"],"output":[["a",1],["b",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","inputs":["a4cc"],"output":[["a",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","inputs":["xyzZ"],"output":[["x",1],["y",1],["z",2]]}]},{"name":"Cracking the Caesar Shift with Brute Force","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-brute-force/parsons.xml","tests":[{"type":"CustomBlockTest","name":"it should find key when starts with a search word","spec":"find key where %'msg' contains %'words'","function":"code breakerhello world2messagemsg
hello2
"},{"name":"it should find key when using multiple search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces15messagemsg
hellowith15
"},{"name":"it should find key when ends with one of many search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces33messagemsg
hellospaces33
"},{"name":"it should return -1 if cannot decode message","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerno hidden words3messagemsg
hellospaces-1
"}]},{"name":"Cracking the Caesar Shift with a Partial Solution","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-partial-soln/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","c"],"output":2},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["A","a"],"output":32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","A"],"output":-32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["5","0"],"output":-5},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":[".","?"],"output":17}]},{"name":"Cyclic Iterator","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/cyclic-iterator/parsons.xml","tests":[{"name":"block should return a function","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1"},{"name":"sequence should start with the first value in the list","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1messagemsg
1
2424
"},{"name":"sequence should remember position","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn797"},{"name":"sequence should restart after reaching the end","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn777"}]},{"name":"Factorial","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/factorial/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[5],"output":120},{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[0],"output":1},{"type":"CustomBlockTest","name":"should compute the factorial of an unknown input","spec":"factorial %'num'","inputs":[7],"output":5040}]},{"name":"FizzBuzz","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/fizz-buzz/template.xml","tests":[{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[1],"output":1},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-39],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[3],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-50],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[5],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-150],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[15],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[0],"output":"fizzbuzz"}]},{"name":"From Infinite Sequences to Finite Lists","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/take-collect-sequences/parsons.xml","tests":[]},{"name":"Greet","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/greet/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"greet %'person'","name":"greet %'person' should start with \"Hello,\"","function":"blockBrian15Hello"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Bob"],"output":"Hello, Bob!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Alice"],"output":"Hello, Alice!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Cliff"],"output":"Hello, Cliff!"}]},{"name":"Intro to Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/intro-infinite-sequences/parsons.xml","tests":[{"name":"sequence should start with 1","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fnmessagemsg
1
"},{"name":"sequence should remember current position","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"},{"name":"sequence should produce counting numbers","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fntrue"},{"name":"two sequences should iterate independently","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"}]},{"name":"Isogram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/isogram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["letter"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["a"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["arraigning"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect first-order isogram","function":"blocksunflower"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect second-order isogram","function":"blockhorseshoer"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect third-order isogram","function":"blockgeggee"}]},{"name":"Leap Year","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/leap-year/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2015],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1970],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1996],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1960],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2100],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1900],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2000],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2400],"output":true}]},{"name":"Luhn Formula","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/luhn-formula/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"single digits cannot be valid","inputs":["8"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid credit card","inputs":["8273 1232 7352 0569"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"text with non digit is invalid","inputs":["059a"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid long number with even remainder","inputs":["1 2345 6789 1234 5678 9012"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with even digits","inputs":["095 245 88"],"output":true},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with odd number of spaces","inputs":["234 567 891 234"],"output":true}]},{"name":"Mapping Over Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/map-sequence/parsons.xml","tests":[{"name":"map should return another sequence","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map2messagemsg
"},{"name":"new sequence should contain transformed values","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map
by threes3i110true
"}]},{"name":"Minesweeper","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/minesweeper/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","*",""],["*","",""],["","*","*"]]],"output":[[2,"*",1],["*",4,3],[2,"*","*"]],"name":"board w/ mine counts on square board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*"],["*",""],["","*"]]],"output":[["*","*"],["*",4],[2,"*"]],"name":"board w/ mine counts on rectangle board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*","*"],["*","","*"],["","*",""]]],"output":[["*","*","*"],["*",6,"*"],[2,"*",2]],"name":"board w/ mine counts on dense board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","","",""],["","","","*"],["","","",""]]],"output":[[0,0,1,1],[0,0,1,"*"],[0,0,1,1]],"name":"board w/ mine counts on sparse board"}]},{"name":"Moving Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/moving-average/parsons.xml","tests":[{"name":"moving average block should return a list","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn1112"},{"name":"moving average should be computed correctly","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn-104176311.666666666666666744.666666666666667"}]},{"name":"Pangram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/pangram/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","inputs":[""],"output":false},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"lowercase pangram","inputs":["abcdefghijklmnopqrstuvwxyz"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"mixed case pangram","inputs":["abcdefghijkLMNOPQRSTUVWXYZ"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"pangram with extra symbols","inputs":["the quick brown fox jumps over a lazy dog!"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"missing a letter","inputs":["abcdefghijkLMNOPQRSTUVWYZ"],"output":false}]},{"name":"Sieve of Eratosthenes","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sieve/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should not consider 1 prime","inputs":[1],"output":[]},{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should find the all primes up to 5","inputs":[5],"output":[2,3,5]},{"type":"CustomBlockTest","name":"should find the all primes up to 30","spec":"factorial %'num'","inputs":[30],"output":[2,3,5,7,11,13,17,19,23,29]}]},{"name":"Sliding Windows","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sliding-windows/template.xml","tests":[]},{"name":"Transposing Music","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/transpose-music/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["78","1"],"output":"79","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["84","-2"],"output":"82","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["36","5"],"output":"41","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["C2","5"],"output":"41","name":"should accept note names (e.g., \"C4\")"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["50","0"],"output":"50","name":"should return original note when transposing by 0"}]},{"name":"Vigenere Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/vigenere/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["how are you?",["1","2","3","4"]],"output":"iqz$bth$zqxC"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["cba",["1","2","3"]],"output":"ddd"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["wow, negative keys?",["-2","-5","-3"]],"output":"ujt*\u001bkcb^rdsc\u001bhctp="},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["what large keys!",["100","200","300"]],"output":"[0\rXh\u0018E:\u0013Ih\u0017IA\u001f\u0005"}]}]}; + const config = {"name":"NetsBlox Exercises","assignments":[{"name":"Acronym","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/acronym/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["I Don't Know"],"output":"IDK"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["President Of The United States"],"output":"POTUS"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Shaking My Head"],"output":"SMH"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Agnetha, Bjorn, Benny, Anni-Frid"],"output":"ABBA"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Zone Improvement Plan"],"output":"ZIP"}]},{"name":"Actor's Birthday","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/actor-birthday/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Keanu Reeves"],"output":"1964-09-02"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Meryl Streep"],"output":"1949-06-22"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Denzel Washington"],"output":"1954-12-28"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Lin-Manuel Miranda"],"output":"1980-01-16"}]},{"name":"Anagram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/anagram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["shepherd","spider"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","ccat"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["olive","ilove"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","CAT"],"output":true}]},{"name":"Atbash Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/atbash/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["abc"],"output":"zyx"},{"name":"should preserve letter case","type":"CustomBlockTest","spec":"encrypt %'message'","function":"iterator fnXYZCBA"},{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["$?! +@"],"output":"$?! +@","name":"should preserve non-letters such as punctuation"}]},{"name":"Between","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/between/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[1,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[3,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,3,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[-6,-5,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[20,-5,5],"output":false}]},{"name":"Bigram Autocomplete","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/bigram-autocomplete/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list","function":"fncatcab"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list with 26 rows","function":"fncatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should contain rows that sum to 100","function":"fn100.5rowcatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return correct probabilities","function":"fn5013catcabchechi"}]},{"name":"Caesar Shift","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/caesar-shift/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["abc",2],"output":"cde"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",100],"output":"()*"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",-50],"output":"\u0012\u0013\u0014"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["with spaces",10],"output":"\u0001s~r*}zkmo}"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["no shift!",0],"output":"no shift!"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["negative wrapping!",-200],"output":"&\u001d\u001f\u0019,!.\u001dX/*\u0019((!&\u001fY"}]},{"name":"Compute the Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average/parsons.xml","tests":[]},{"name":"Compute the Average of a List","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average-list/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","1"]],"output":"1"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","2"]],"output":"1.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["-1","2","4","-3"]],"output":"0.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32"]],"output":-7.4},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32","54"]],"output":2.8333333333333335}]},{"name":"Counting Letter Frequency","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","function":"countabcc11200000000000000000000000"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","function":"counta b ! c26"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","function":"countaAbBcCzZ22200000000000000000000002"}]},{"name":"Counting Letter Frequency as Dictionary","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency-dictionary/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","inputs":["abcc"],"output":[["a",1],["b",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","inputs":["a4cc"],"output":[["a",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","inputs":["xyzZ"],"output":[["x",1],["y",1],["z",2]]}]},{"name":"Cracking the Caesar Shift with Brute Force","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-brute-force/parsons.xml","tests":[{"type":"CustomBlockTest","name":"it should find key when starts with a search word","spec":"find key where %'msg' contains %'words'","function":"code breakerhello world2messagemsg
hello2
"},{"name":"it should find key when using multiple search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces15messagemsg
hellowith15
"},{"name":"it should find key when ends with one of many search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces33messagemsg
hellospaces33
"},{"name":"it should return -1 if cannot decode message","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerno hidden words3messagemsg
hellospaces-1
"}]},{"name":"Cracking the Caesar Shift with a Partial Solution","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-partial-soln/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","c"],"output":2},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["A","a"],"output":32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","A"],"output":-32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["5","0"],"output":-5},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":[".","?"],"output":17}]},{"name":"Cyclic Iterator","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/cyclic-iterator/parsons.xml","tests":[{"name":"block should return a function","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1"},{"name":"sequence should start with the first value in the list","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1messagemsg
1
2424
"},{"name":"sequence should remember position","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn797"},{"name":"sequence should restart after reaching the end","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn777"}]},{"name":"Factorial","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/factorial/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[5],"output":120},{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[0],"output":1},{"type":"CustomBlockTest","name":"should compute the factorial of an unknown input","spec":"factorial %'num'","inputs":[7],"output":5040}]},{"name":"FizzBuzz","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/fizz-buzz/template.xml","tests":[{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[1],"output":1},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-39],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[3],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-50],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[5],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-150],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[15],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[0],"output":"fizzbuzz"}]},{"name":"From Infinite Sequences to Finite Lists","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/take-collect-sequences/parsons.xml","tests":[]},{"name":"Greet","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/greet/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"greet %'person'","name":"greet %'person' should start with \"Hello,\"","function":"blockBrian15Hello"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Bob"],"output":"Hello, Bob!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Alice"],"output":"Hello, Alice!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Cliff"],"output":"Hello, Cliff!"}]},{"name":"Intro to Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/intro-infinite-sequences/parsons.xml","tests":[{"name":"sequence should start with 1","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fnmessagemsg
1
"},{"name":"sequence should remember current position","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"},{"name":"sequence should produce counting numbers","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fntrue"},{"name":"two sequences should iterate independently","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"}]},{"name":"Isogram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/isogram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["letter"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["a"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["arraigning"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect first-order isogram","function":"blocksunflower"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect second-order isogram","function":"blockhorseshoer"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect third-order isogram","function":"blockgeggee"}]},{"name":"Leap Year","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/leap-year/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2015],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1970],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1996],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1960],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2100],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1900],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2000],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2400],"output":true}]},{"name":"Luhn Formula","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/luhn-formula/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"single digits cannot be valid","inputs":["8"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid credit card","inputs":["8273 1232 7352 0569"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"text with non digit is invalid","inputs":["059a"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid long number with even remainder","inputs":["1 2345 6789 1234 5678 9012"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with even digits","inputs":["095 245 88"],"output":true},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with odd number of spaces","inputs":["234 567 891 234"],"output":true}]},{"name":"Mapping Over Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/map-sequence/parsons.xml","tests":[{"name":"map should return another sequence","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map2messagemsg
"},{"name":"new sequence should contain transformed values","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map
by threes3i110true
"}]},{"name":"Minesweeper","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/minesweeper/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","*",""],["*","",""],["","*","*"]]],"output":[[2,"*",1],["*",4,3],[2,"*","*"]],"name":"board w/ mine counts on square board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*"],["*",""],["","*"]]],"output":[["*","*"],["*",4],[2,"*"]],"name":"board w/ mine counts on rectangle board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*","*"],["*","","*"],["","*",""]]],"output":[["*","*","*"],["*",6,"*"],[2,"*",2]],"name":"board w/ mine counts on dense board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","","",""],["","","","*"],["","","",""]]],"output":[[0,0,1,1],[0,0,1,"*"],[0,0,1,1]],"name":"board w/ mine counts on sparse board"}]},{"name":"Moving Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/moving-average/parsons.xml","tests":[{"name":"moving average block should return a list","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn1112"},{"name":"moving average should be computed correctly","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn-104176311.666666666666666744.666666666666667"}]},{"name":"Pangram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/pangram/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","inputs":[""],"output":false},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"lowercase pangram","inputs":["abcdefghijklmnopqrstuvwxyz"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"mixed case pangram","inputs":["abcdefghijkLMNOPQRSTUVWXYZ"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"pangram with extra symbols","inputs":["the quick brown fox jumps over a lazy dog!"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"missing a letter","inputs":["abcdefghijkLMNOPQRSTUVWYZ"],"output":false}]},{"name":"Sieve of Eratosthenes","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sieve/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should not consider 1 prime","inputs":[1],"output":[]},{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should find the all primes up to 5","inputs":[5],"output":[2,3,5]},{"type":"CustomBlockTest","name":"should find the all primes up to 30","spec":"factorial %'num'","inputs":[30],"output":[2,3,5,7,11,13,17,19,23,29]}]},{"name":"Sliding Windows","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sliding-windows/template.xml","tests":[]},{"name":"Transposing Music","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/transpose-music/template.xml","tests":[{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["78","1"],"output":"79","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["84","-2"],"output":"82","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["36","5"],"output":"41","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["C2","5"],"output":"41","name":"should accept note names (e.g., \"C4\")"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["50","0"],"output":"50","name":"should return original note when transposing by 0"}]},{"name":"Vigenere Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/vigenere/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["how are you?",["1","2","3","4"]],"output":"iqz$bth$zqxC"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["cba",["1","2","3"]],"output":"ddd"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["wow, negative keys?",["-2","-5","-3"]],"output":"ujt*\u001bkcb^rdsc\u001bhctp="},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["what large keys!",["100","200","300"]],"output":"[0\rXh\u0018E:\u0013Ih\u0017IA\u001f\u0005"}]}]}; const [ide] = world.children; class CustomBlockAutograder extends Extension { diff --git a/docs/autograders/leap-year.js b/docs/autograders/leap-year.js index 5b48e75..60b6af6 100644 --- a/docs/autograders/leap-year.js +++ b/docs/autograders/leap-year.js @@ -2,7 +2,7 @@ ScrollFrameMorph, nop, HandleMorph, List, Extension, ToggleMorph, BlockMorph, Color, SpriteMorph, localize, TextMorph, MorphicPreferences, WHITE*/ (function() { - const config = {"name":"NetsBlox Exercises","assignments":[{"name":"Acronym","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/acronym/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["I Don't Know"],"output":"IDK"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["President Of The United States"],"output":"POTUS"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Shaking My Head"],"output":"SMH"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Agnetha, Bjorn, Benny, Anni-Frid"],"output":"ABBA"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Zone Improvement Plan"],"output":"ZIP"}]},{"name":"Actor's Birthday","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/actor-birthday/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Keanu Reeves"],"output":"1964-09-02"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Meryl Streep"],"output":"1949-06-22"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Denzel Washington"],"output":"1954-12-28"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Lin-Manuel Miranda"],"output":"1980-01-16"}]},{"name":"Anagram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/anagram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["shepherd","spider"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","ccat"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["olive","ilove"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","CAT"],"output":true}]},{"name":"Atbash Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/atbash/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["abc"],"output":"zyx"},{"name":"should preserve letter case","type":"CustomBlockTest","spec":"encrypt %'message'","function":"iterator fnXYZCBA"},{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["$?! +@"],"output":"$?! +@","name":"should preserve non-letters such as punctuation"}]},{"name":"Between","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/between/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[1,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[3,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,3,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[-6,-5,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[20,-5,5],"output":false}]},{"name":"Bigram Autocomplete","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/bigram-autocomplete/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list","function":"fncatcab"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list with 26 rows","function":"fncatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should contain rows that sum to 100","function":"fn100.5rowcatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return correct probabilities","function":"fn5013catcabchechi"}]},{"name":"Caesar Shift","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/caesar-shift/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["abc",2],"output":"cde"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",100],"output":"()*"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",-50],"output":"\u0012\u0013\u0014"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["with spaces",10],"output":"\u0001s~r*}zkmo}"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["no shift!",0],"output":"no shift!"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["negative wrapping!",-200],"output":"&\u001d\u001f\u0019,!.\u001dX/*\u0019((!&\u001fY"}]},{"name":"Compute the Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average/parsons.xml","tests":[]},{"name":"Compute the Average of a List","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average-list/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","1"]],"output":"1"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","2"]],"output":"1.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["-1","2","4","-3"]],"output":"0.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32"]],"output":-7.4},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32","54"]],"output":2.8333333333333335}]},{"name":"Counting Letter Frequency","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","function":"countabcc11200000000000000000000000"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","function":"counta b ! c26"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","function":"countaAbBcCzZ22200000000000000000000002"}]},{"name":"Counting Letter Frequency as Dictionary","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency-dictionary/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","inputs":["abcc"],"output":[["a",1],["b",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","inputs":["a4cc"],"output":[["a",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","inputs":["xyzZ"],"output":[["x",1],["y",1],["z",2]]}]},{"name":"Cracking the Caesar Shift with Brute Force","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-brute-force/parsons.xml","tests":[{"type":"CustomBlockTest","name":"it should find key when starts with a search word","spec":"find key where %'msg' contains %'words'","function":"code breakerhello world2messagemsg
hello2
"},{"name":"it should find key when using multiple search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces15messagemsg
hellowith15
"},{"name":"it should find key when ends with one of many search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces33messagemsg
hellospaces33
"},{"name":"it should return -1 if cannot decode message","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerno hidden words3messagemsg
hellospaces-1
"}]},{"name":"Cracking the Caesar Shift with a Partial Solution","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-partial-soln/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","c"],"output":2},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["A","a"],"output":32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","A"],"output":-32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["5","0"],"output":-5},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":[".","?"],"output":17}]},{"name":"Cyclic Iterator","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/cyclic-iterator/parsons.xml","tests":[{"name":"block should return a function","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1"},{"name":"sequence should start with the first value in the list","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1messagemsg
1
2424
"},{"name":"sequence should remember position","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn797"},{"name":"sequence should restart after reaching the end","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn777"}]},{"name":"Factorial","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/factorial/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[5],"output":120},{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[0],"output":1},{"type":"CustomBlockTest","name":"should compute the factorial of an unknown input","spec":"factorial %'num'","inputs":[7],"output":5040}]},{"name":"FizzBuzz","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/fizz-buzz/template.xml","tests":[{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[1],"output":1},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-39],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[3],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-50],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[5],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-150],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[15],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[0],"output":"fizzbuzz"}]},{"name":"From Infinite Sequences to Finite Lists","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/take-collect-sequences/parsons.xml","tests":[]},{"name":"Greet","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/greet/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"greet %'person'","name":"greet %'person' should start with \"Hello,\"","function":"blockBrian15Hello"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Bob"],"output":"Hello, Bob!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Alice"],"output":"Hello, Alice!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Cliff"],"output":"Hello, Cliff!"}]},{"name":"Intro to Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/intro-infinite-sequences/parsons.xml","tests":[{"name":"sequence should start with 1","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fnmessagemsg
1
"},{"name":"sequence should remember current position","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"},{"name":"sequence should produce counting numbers","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fntrue"},{"name":"two sequences should iterate independently","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"}]},{"name":"Isogram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/isogram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["letter"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["a"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["arraigning"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect first-order isogram","function":"blocksunflower"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect second-order isogram","function":"blockhorseshoer"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect third-order isogram","function":"blockgeggee"}]},{"name":"Leap Year","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/leap-year/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2015],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1970],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1996],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1960],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2100],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1900],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2000],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2400],"output":true}]},{"name":"Luhn Formula","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/luhn-formula/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"single digits cannot be valid","inputs":["8"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid credit card","inputs":["8273 1232 7352 0569"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"text with non digit is invalid","inputs":["059a"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid long number with even remainder","inputs":["1 2345 6789 1234 5678 9012"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with even digits","inputs":["095 245 88"],"output":true},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with odd number of spaces","inputs":["234 567 891 234"],"output":true}]},{"name":"Mapping Over Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/map-sequence/parsons.xml","tests":[{"name":"map should return another sequence","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map2messagemsg
"},{"name":"new sequence should contain transformed values","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map
by threes3i110true
"}]},{"name":"Minesweeper","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/minesweeper/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","*",""],["*","",""],["","*","*"]]],"output":[[2,"*",1],["*",4,3],[2,"*","*"]],"name":"board w/ mine counts on square board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*"],["*",""],["","*"]]],"output":[["*","*"],["*",4],[2,"*"]],"name":"board w/ mine counts on rectangle board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*","*"],["*","","*"],["","*",""]]],"output":[["*","*","*"],["*",6,"*"],[2,"*",2]],"name":"board w/ mine counts on dense board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","","",""],["","","","*"],["","","",""]]],"output":[[0,0,1,1],[0,0,1,"*"],[0,0,1,1]],"name":"board w/ mine counts on sparse board"}]},{"name":"Moving Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/moving-average/parsons.xml","tests":[{"name":"moving average block should return a list","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn1112"},{"name":"moving average should be computed correctly","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn-104176311.666666666666666744.666666666666667"}]},{"name":"Pangram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/pangram/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","inputs":[""],"output":false},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"lowercase pangram","inputs":["abcdefghijklmnopqrstuvwxyz"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"mixed case pangram","inputs":["abcdefghijkLMNOPQRSTUVWXYZ"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"pangram with extra symbols","inputs":["the quick brown fox jumps over a lazy dog!"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"missing a letter","inputs":["abcdefghijkLMNOPQRSTUVWYZ"],"output":false}]},{"name":"Sieve of Eratosthenes","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sieve/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should not consider 1 prime","inputs":[1],"output":[]},{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should find the all primes up to 5","inputs":[5],"output":[2,3,5]},{"type":"CustomBlockTest","name":"should find the all primes up to 30","spec":"factorial %'num'","inputs":[30],"output":[2,3,5,7,11,13,17,19,23,29]}]},{"name":"Sliding Windows","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sliding-windows/template.xml","tests":[]},{"name":"Transposing Music","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/transpose-music/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["78","1"],"output":"79","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["84","-2"],"output":"82","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["36","5"],"output":"41","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["C2","5"],"output":"41","name":"should accept note names (e.g., \"C4\")"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["50","0"],"output":"50","name":"should return original note when transposing by 0"}]},{"name":"Vigenere Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/vigenere/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["how are you?",["1","2","3","4"]],"output":"iqz$bth$zqxC"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["cba",["1","2","3"]],"output":"ddd"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["wow, negative keys?",["-2","-5","-3"]],"output":"ujt*\u001bkcb^rdsc\u001bhctp="},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["what large keys!",["100","200","300"]],"output":"[0\rXh\u0018E:\u0013Ih\u0017IA\u001f\u0005"}]}]}; + const config = {"name":"NetsBlox Exercises","assignments":[{"name":"Acronym","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/acronym/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["I Don't Know"],"output":"IDK"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["President Of The United States"],"output":"POTUS"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Shaking My Head"],"output":"SMH"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Agnetha, Bjorn, Benny, Anni-Frid"],"output":"ABBA"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Zone Improvement Plan"],"output":"ZIP"}]},{"name":"Actor's Birthday","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/actor-birthday/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Keanu Reeves"],"output":"1964-09-02"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Meryl Streep"],"output":"1949-06-22"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Denzel Washington"],"output":"1954-12-28"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Lin-Manuel Miranda"],"output":"1980-01-16"}]},{"name":"Anagram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/anagram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["shepherd","spider"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","ccat"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["olive","ilove"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","CAT"],"output":true}]},{"name":"Atbash Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/atbash/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["abc"],"output":"zyx"},{"name":"should preserve letter case","type":"CustomBlockTest","spec":"encrypt %'message'","function":"iterator fnXYZCBA"},{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["$?! +@"],"output":"$?! +@","name":"should preserve non-letters such as punctuation"}]},{"name":"Between","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/between/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[1,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[3,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,3,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[-6,-5,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[20,-5,5],"output":false}]},{"name":"Bigram Autocomplete","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/bigram-autocomplete/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list","function":"fncatcab"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list with 26 rows","function":"fncatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should contain rows that sum to 100","function":"fn100.5rowcatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return correct probabilities","function":"fn5013catcabchechi"}]},{"name":"Caesar Shift","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/caesar-shift/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["abc",2],"output":"cde"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",100],"output":"()*"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",-50],"output":"\u0012\u0013\u0014"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["with spaces",10],"output":"\u0001s~r*}zkmo}"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["no shift!",0],"output":"no shift!"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["negative wrapping!",-200],"output":"&\u001d\u001f\u0019,!.\u001dX/*\u0019((!&\u001fY"}]},{"name":"Compute the Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average/parsons.xml","tests":[]},{"name":"Compute the Average of a List","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average-list/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","1"]],"output":"1"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","2"]],"output":"1.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["-1","2","4","-3"]],"output":"0.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32"]],"output":-7.4},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32","54"]],"output":2.8333333333333335}]},{"name":"Counting Letter Frequency","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","function":"countabcc11200000000000000000000000"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","function":"counta b ! c26"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","function":"countaAbBcCzZ22200000000000000000000002"}]},{"name":"Counting Letter Frequency as Dictionary","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency-dictionary/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","inputs":["abcc"],"output":[["a",1],["b",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","inputs":["a4cc"],"output":[["a",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","inputs":["xyzZ"],"output":[["x",1],["y",1],["z",2]]}]},{"name":"Cracking the Caesar Shift with Brute Force","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-brute-force/parsons.xml","tests":[{"type":"CustomBlockTest","name":"it should find key when starts with a search word","spec":"find key where %'msg' contains %'words'","function":"code breakerhello world2messagemsg
hello2
"},{"name":"it should find key when using multiple search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces15messagemsg
hellowith15
"},{"name":"it should find key when ends with one of many search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces33messagemsg
hellospaces33
"},{"name":"it should return -1 if cannot decode message","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerno hidden words3messagemsg
hellospaces-1
"}]},{"name":"Cracking the Caesar Shift with a Partial Solution","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-partial-soln/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","c"],"output":2},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["A","a"],"output":32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","A"],"output":-32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["5","0"],"output":-5},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":[".","?"],"output":17}]},{"name":"Cyclic Iterator","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/cyclic-iterator/parsons.xml","tests":[{"name":"block should return a function","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1"},{"name":"sequence should start with the first value in the list","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1messagemsg
1
2424
"},{"name":"sequence should remember position","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn797"},{"name":"sequence should restart after reaching the end","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn777"}]},{"name":"Factorial","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/factorial/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[5],"output":120},{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[0],"output":1},{"type":"CustomBlockTest","name":"should compute the factorial of an unknown input","spec":"factorial %'num'","inputs":[7],"output":5040}]},{"name":"FizzBuzz","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/fizz-buzz/template.xml","tests":[{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[1],"output":1},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-39],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[3],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-50],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[5],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-150],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[15],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[0],"output":"fizzbuzz"}]},{"name":"From Infinite Sequences to Finite Lists","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/take-collect-sequences/parsons.xml","tests":[]},{"name":"Greet","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/greet/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"greet %'person'","name":"greet %'person' should start with \"Hello,\"","function":"blockBrian15Hello"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Bob"],"output":"Hello, Bob!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Alice"],"output":"Hello, Alice!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Cliff"],"output":"Hello, Cliff!"}]},{"name":"Intro to Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/intro-infinite-sequences/parsons.xml","tests":[{"name":"sequence should start with 1","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fnmessagemsg
1
"},{"name":"sequence should remember current position","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"},{"name":"sequence should produce counting numbers","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fntrue"},{"name":"two sequences should iterate independently","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"}]},{"name":"Isogram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/isogram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["letter"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["a"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["arraigning"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect first-order isogram","function":"blocksunflower"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect second-order isogram","function":"blockhorseshoer"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect third-order isogram","function":"blockgeggee"}]},{"name":"Leap Year","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/leap-year/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2015],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1970],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1996],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1960],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2100],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1900],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2000],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2400],"output":true}]},{"name":"Luhn Formula","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/luhn-formula/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"single digits cannot be valid","inputs":["8"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid credit card","inputs":["8273 1232 7352 0569"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"text with non digit is invalid","inputs":["059a"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid long number with even remainder","inputs":["1 2345 6789 1234 5678 9012"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with even digits","inputs":["095 245 88"],"output":true},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with odd number of spaces","inputs":["234 567 891 234"],"output":true}]},{"name":"Mapping Over Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/map-sequence/parsons.xml","tests":[{"name":"map should return another sequence","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map2messagemsg
"},{"name":"new sequence should contain transformed values","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map
by threes3i110true
"}]},{"name":"Minesweeper","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/minesweeper/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","*",""],["*","",""],["","*","*"]]],"output":[[2,"*",1],["*",4,3],[2,"*","*"]],"name":"board w/ mine counts on square board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*"],["*",""],["","*"]]],"output":[["*","*"],["*",4],[2,"*"]],"name":"board w/ mine counts on rectangle board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*","*"],["*","","*"],["","*",""]]],"output":[["*","*","*"],["*",6,"*"],[2,"*",2]],"name":"board w/ mine counts on dense board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","","",""],["","","","*"],["","","",""]]],"output":[[0,0,1,1],[0,0,1,"*"],[0,0,1,1]],"name":"board w/ mine counts on sparse board"}]},{"name":"Moving Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/moving-average/parsons.xml","tests":[{"name":"moving average block should return a list","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn1112"},{"name":"moving average should be computed correctly","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn-104176311.666666666666666744.666666666666667"}]},{"name":"Pangram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/pangram/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","inputs":[""],"output":false},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"lowercase pangram","inputs":["abcdefghijklmnopqrstuvwxyz"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"mixed case pangram","inputs":["abcdefghijkLMNOPQRSTUVWXYZ"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"pangram with extra symbols","inputs":["the quick brown fox jumps over a lazy dog!"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"missing a letter","inputs":["abcdefghijkLMNOPQRSTUVWYZ"],"output":false}]},{"name":"Sieve of Eratosthenes","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sieve/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should not consider 1 prime","inputs":[1],"output":[]},{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should find the all primes up to 5","inputs":[5],"output":[2,3,5]},{"type":"CustomBlockTest","name":"should find the all primes up to 30","spec":"factorial %'num'","inputs":[30],"output":[2,3,5,7,11,13,17,19,23,29]}]},{"name":"Sliding Windows","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sliding-windows/template.xml","tests":[]},{"name":"Transposing Music","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/transpose-music/template.xml","tests":[{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["78","1"],"output":"79","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["84","-2"],"output":"82","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["36","5"],"output":"41","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["C2","5"],"output":"41","name":"should accept note names (e.g., \"C4\")"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["50","0"],"output":"50","name":"should return original note when transposing by 0"}]},{"name":"Vigenere Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/vigenere/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["how are you?",["1","2","3","4"]],"output":"iqz$bth$zqxC"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["cba",["1","2","3"]],"output":"ddd"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["wow, negative keys?",["-2","-5","-3"]],"output":"ujt*\u001bkcb^rdsc\u001bhctp="},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["what large keys!",["100","200","300"]],"output":"[0\rXh\u0018E:\u0013Ih\u0017IA\u001f\u0005"}]}]}; const [ide] = world.children; class CustomBlockAutograder extends Extension { diff --git a/docs/autograders/letter-frequency-dictionary.js b/docs/autograders/letter-frequency-dictionary.js index c09e7a5..a4e79a4 100644 --- a/docs/autograders/letter-frequency-dictionary.js +++ b/docs/autograders/letter-frequency-dictionary.js @@ -2,7 +2,7 @@ ScrollFrameMorph, nop, HandleMorph, List, Extension, ToggleMorph, BlockMorph, Color, SpriteMorph, localize, TextMorph, MorphicPreferences, WHITE*/ (function() { - const config = {"name":"NetsBlox Exercises","assignments":[{"name":"Acronym","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/acronym/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["I Don't Know"],"output":"IDK"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["President Of The United States"],"output":"POTUS"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Shaking My Head"],"output":"SMH"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Agnetha, Bjorn, Benny, Anni-Frid"],"output":"ABBA"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Zone Improvement Plan"],"output":"ZIP"}]},{"name":"Actor's Birthday","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/actor-birthday/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Keanu Reeves"],"output":"1964-09-02"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Meryl Streep"],"output":"1949-06-22"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Denzel Washington"],"output":"1954-12-28"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Lin-Manuel Miranda"],"output":"1980-01-16"}]},{"name":"Anagram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/anagram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["shepherd","spider"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","ccat"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["olive","ilove"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","CAT"],"output":true}]},{"name":"Atbash Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/atbash/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["abc"],"output":"zyx"},{"name":"should preserve letter case","type":"CustomBlockTest","spec":"encrypt %'message'","function":"iterator fnXYZCBA"},{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["$?! +@"],"output":"$?! +@","name":"should preserve non-letters such as punctuation"}]},{"name":"Between","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/between/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[1,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[3,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,3,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[-6,-5,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[20,-5,5],"output":false}]},{"name":"Bigram Autocomplete","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/bigram-autocomplete/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list","function":"fncatcab"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list with 26 rows","function":"fncatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should contain rows that sum to 100","function":"fn100.5rowcatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return correct probabilities","function":"fn5013catcabchechi"}]},{"name":"Caesar Shift","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/caesar-shift/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["abc",2],"output":"cde"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",100],"output":"()*"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",-50],"output":"\u0012\u0013\u0014"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["with spaces",10],"output":"\u0001s~r*}zkmo}"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["no shift!",0],"output":"no shift!"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["negative wrapping!",-200],"output":"&\u001d\u001f\u0019,!.\u001dX/*\u0019((!&\u001fY"}]},{"name":"Compute the Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average/parsons.xml","tests":[]},{"name":"Compute the Average of a List","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average-list/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","1"]],"output":"1"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","2"]],"output":"1.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["-1","2","4","-3"]],"output":"0.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32"]],"output":-7.4},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32","54"]],"output":2.8333333333333335}]},{"name":"Counting Letter Frequency","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","function":"countabcc11200000000000000000000000"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","function":"counta b ! c26"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","function":"countaAbBcCzZ22200000000000000000000002"}]},{"name":"Counting Letter Frequency as Dictionary","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency-dictionary/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","inputs":["abcc"],"output":[["a",1],["b",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","inputs":["a4cc"],"output":[["a",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","inputs":["xyzZ"],"output":[["x",1],["y",1],["z",2]]}]},{"name":"Cracking the Caesar Shift with Brute Force","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-brute-force/parsons.xml","tests":[{"type":"CustomBlockTest","name":"it should find key when starts with a search word","spec":"find key where %'msg' contains %'words'","function":"code breakerhello world2messagemsg
hello2
"},{"name":"it should find key when using multiple search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces15messagemsg
hellowith15
"},{"name":"it should find key when ends with one of many search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces33messagemsg
hellospaces33
"},{"name":"it should return -1 if cannot decode message","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerno hidden words3messagemsg
hellospaces-1
"}]},{"name":"Cracking the Caesar Shift with a Partial Solution","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-partial-soln/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","c"],"output":2},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["A","a"],"output":32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","A"],"output":-32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["5","0"],"output":-5},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":[".","?"],"output":17}]},{"name":"Cyclic Iterator","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/cyclic-iterator/parsons.xml","tests":[{"name":"block should return a function","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1"},{"name":"sequence should start with the first value in the list","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1messagemsg
1
2424
"},{"name":"sequence should remember position","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn797"},{"name":"sequence should restart after reaching the end","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn777"}]},{"name":"Factorial","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/factorial/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[5],"output":120},{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[0],"output":1},{"type":"CustomBlockTest","name":"should compute the factorial of an unknown input","spec":"factorial %'num'","inputs":[7],"output":5040}]},{"name":"FizzBuzz","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/fizz-buzz/template.xml","tests":[{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[1],"output":1},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-39],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[3],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-50],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[5],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-150],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[15],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[0],"output":"fizzbuzz"}]},{"name":"From Infinite Sequences to Finite Lists","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/take-collect-sequences/parsons.xml","tests":[]},{"name":"Greet","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/greet/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"greet %'person'","name":"greet %'person' should start with \"Hello,\"","function":"blockBrian15Hello"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Bob"],"output":"Hello, Bob!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Alice"],"output":"Hello, Alice!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Cliff"],"output":"Hello, Cliff!"}]},{"name":"Intro to Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/intro-infinite-sequences/parsons.xml","tests":[{"name":"sequence should start with 1","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fnmessagemsg
1
"},{"name":"sequence should remember current position","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"},{"name":"sequence should produce counting numbers","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fntrue"},{"name":"two sequences should iterate independently","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"}]},{"name":"Isogram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/isogram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["letter"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["a"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["arraigning"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect first-order isogram","function":"blocksunflower"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect second-order isogram","function":"blockhorseshoer"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect third-order isogram","function":"blockgeggee"}]},{"name":"Leap Year","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/leap-year/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2015],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1970],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1996],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1960],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2100],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1900],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2000],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2400],"output":true}]},{"name":"Luhn Formula","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/luhn-formula/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"single digits cannot be valid","inputs":["8"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid credit card","inputs":["8273 1232 7352 0569"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"text with non digit is invalid","inputs":["059a"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid long number with even remainder","inputs":["1 2345 6789 1234 5678 9012"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with even digits","inputs":["095 245 88"],"output":true},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with odd number of spaces","inputs":["234 567 891 234"],"output":true}]},{"name":"Mapping Over Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/map-sequence/parsons.xml","tests":[{"name":"map should return another sequence","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map2messagemsg
"},{"name":"new sequence should contain transformed values","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map
by threes3i110true
"}]},{"name":"Minesweeper","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/minesweeper/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","*",""],["*","",""],["","*","*"]]],"output":[[2,"*",1],["*",4,3],[2,"*","*"]],"name":"board w/ mine counts on square board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*"],["*",""],["","*"]]],"output":[["*","*"],["*",4],[2,"*"]],"name":"board w/ mine counts on rectangle board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*","*"],["*","","*"],["","*",""]]],"output":[["*","*","*"],["*",6,"*"],[2,"*",2]],"name":"board w/ mine counts on dense board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","","",""],["","","","*"],["","","",""]]],"output":[[0,0,1,1],[0,0,1,"*"],[0,0,1,1]],"name":"board w/ mine counts on sparse board"}]},{"name":"Moving Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/moving-average/parsons.xml","tests":[{"name":"moving average block should return a list","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn1112"},{"name":"moving average should be computed correctly","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn-104176311.666666666666666744.666666666666667"}]},{"name":"Pangram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/pangram/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","inputs":[""],"output":false},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"lowercase pangram","inputs":["abcdefghijklmnopqrstuvwxyz"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"mixed case pangram","inputs":["abcdefghijkLMNOPQRSTUVWXYZ"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"pangram with extra symbols","inputs":["the quick brown fox jumps over a lazy dog!"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"missing a letter","inputs":["abcdefghijkLMNOPQRSTUVWYZ"],"output":false}]},{"name":"Sieve of Eratosthenes","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sieve/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should not consider 1 prime","inputs":[1],"output":[]},{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should find the all primes up to 5","inputs":[5],"output":[2,3,5]},{"type":"CustomBlockTest","name":"should find the all primes up to 30","spec":"factorial %'num'","inputs":[30],"output":[2,3,5,7,11,13,17,19,23,29]}]},{"name":"Sliding Windows","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sliding-windows/template.xml","tests":[]},{"name":"Transposing Music","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/transpose-music/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["78","1"],"output":"79","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["84","-2"],"output":"82","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["36","5"],"output":"41","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["C2","5"],"output":"41","name":"should accept note names (e.g., \"C4\")"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["50","0"],"output":"50","name":"should return original note when transposing by 0"}]},{"name":"Vigenere Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/vigenere/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["how are you?",["1","2","3","4"]],"output":"iqz$bth$zqxC"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["cba",["1","2","3"]],"output":"ddd"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["wow, negative keys?",["-2","-5","-3"]],"output":"ujt*\u001bkcb^rdsc\u001bhctp="},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["what large keys!",["100","200","300"]],"output":"[0\rXh\u0018E:\u0013Ih\u0017IA\u001f\u0005"}]}]}; + const config = {"name":"NetsBlox Exercises","assignments":[{"name":"Acronym","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/acronym/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["I Don't Know"],"output":"IDK"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["President Of The United States"],"output":"POTUS"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Shaking My Head"],"output":"SMH"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Agnetha, Bjorn, Benny, Anni-Frid"],"output":"ABBA"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Zone Improvement Plan"],"output":"ZIP"}]},{"name":"Actor's Birthday","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/actor-birthday/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Keanu Reeves"],"output":"1964-09-02"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Meryl Streep"],"output":"1949-06-22"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Denzel Washington"],"output":"1954-12-28"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Lin-Manuel Miranda"],"output":"1980-01-16"}]},{"name":"Anagram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/anagram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["shepherd","spider"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","ccat"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["olive","ilove"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","CAT"],"output":true}]},{"name":"Atbash Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/atbash/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["abc"],"output":"zyx"},{"name":"should preserve letter case","type":"CustomBlockTest","spec":"encrypt %'message'","function":"iterator fnXYZCBA"},{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["$?! +@"],"output":"$?! +@","name":"should preserve non-letters such as punctuation"}]},{"name":"Between","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/between/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[1,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[3,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,3,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[-6,-5,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[20,-5,5],"output":false}]},{"name":"Bigram Autocomplete","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/bigram-autocomplete/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list","function":"fncatcab"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list with 26 rows","function":"fncatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should contain rows that sum to 100","function":"fn100.5rowcatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return correct probabilities","function":"fn5013catcabchechi"}]},{"name":"Caesar Shift","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/caesar-shift/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["abc",2],"output":"cde"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",100],"output":"()*"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",-50],"output":"\u0012\u0013\u0014"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["with spaces",10],"output":"\u0001s~r*}zkmo}"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["no shift!",0],"output":"no shift!"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["negative wrapping!",-200],"output":"&\u001d\u001f\u0019,!.\u001dX/*\u0019((!&\u001fY"}]},{"name":"Compute the Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average/parsons.xml","tests":[]},{"name":"Compute the Average of a List","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average-list/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","1"]],"output":"1"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","2"]],"output":"1.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["-1","2","4","-3"]],"output":"0.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32"]],"output":-7.4},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32","54"]],"output":2.8333333333333335}]},{"name":"Counting Letter Frequency","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","function":"countabcc11200000000000000000000000"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","function":"counta b ! c26"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","function":"countaAbBcCzZ22200000000000000000000002"}]},{"name":"Counting Letter Frequency as Dictionary","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency-dictionary/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","inputs":["abcc"],"output":[["a",1],["b",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","inputs":["a4cc"],"output":[["a",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","inputs":["xyzZ"],"output":[["x",1],["y",1],["z",2]]}]},{"name":"Cracking the Caesar Shift with Brute Force","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-brute-force/parsons.xml","tests":[{"type":"CustomBlockTest","name":"it should find key when starts with a search word","spec":"find key where %'msg' contains %'words'","function":"code breakerhello world2messagemsg
hello2
"},{"name":"it should find key when using multiple search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces15messagemsg
hellowith15
"},{"name":"it should find key when ends with one of many search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces33messagemsg
hellospaces33
"},{"name":"it should return -1 if cannot decode message","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerno hidden words3messagemsg
hellospaces-1
"}]},{"name":"Cracking the Caesar Shift with a Partial Solution","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-partial-soln/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","c"],"output":2},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["A","a"],"output":32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","A"],"output":-32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["5","0"],"output":-5},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":[".","?"],"output":17}]},{"name":"Cyclic Iterator","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/cyclic-iterator/parsons.xml","tests":[{"name":"block should return a function","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1"},{"name":"sequence should start with the first value in the list","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1messagemsg
1
2424
"},{"name":"sequence should remember position","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn797"},{"name":"sequence should restart after reaching the end","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn777"}]},{"name":"Factorial","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/factorial/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[5],"output":120},{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[0],"output":1},{"type":"CustomBlockTest","name":"should compute the factorial of an unknown input","spec":"factorial %'num'","inputs":[7],"output":5040}]},{"name":"FizzBuzz","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/fizz-buzz/template.xml","tests":[{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[1],"output":1},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-39],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[3],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-50],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[5],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-150],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[15],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[0],"output":"fizzbuzz"}]},{"name":"From Infinite Sequences to Finite Lists","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/take-collect-sequences/parsons.xml","tests":[]},{"name":"Greet","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/greet/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"greet %'person'","name":"greet %'person' should start with \"Hello,\"","function":"blockBrian15Hello"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Bob"],"output":"Hello, Bob!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Alice"],"output":"Hello, Alice!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Cliff"],"output":"Hello, Cliff!"}]},{"name":"Intro to Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/intro-infinite-sequences/parsons.xml","tests":[{"name":"sequence should start with 1","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fnmessagemsg
1
"},{"name":"sequence should remember current position","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"},{"name":"sequence should produce counting numbers","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fntrue"},{"name":"two sequences should iterate independently","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"}]},{"name":"Isogram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/isogram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["letter"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["a"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["arraigning"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect first-order isogram","function":"blocksunflower"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect second-order isogram","function":"blockhorseshoer"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect third-order isogram","function":"blockgeggee"}]},{"name":"Leap Year","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/leap-year/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2015],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1970],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1996],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1960],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2100],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1900],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2000],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2400],"output":true}]},{"name":"Luhn Formula","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/luhn-formula/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"single digits cannot be valid","inputs":["8"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid credit card","inputs":["8273 1232 7352 0569"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"text with non digit is invalid","inputs":["059a"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid long number with even remainder","inputs":["1 2345 6789 1234 5678 9012"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with even digits","inputs":["095 245 88"],"output":true},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with odd number of spaces","inputs":["234 567 891 234"],"output":true}]},{"name":"Mapping Over Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/map-sequence/parsons.xml","tests":[{"name":"map should return another sequence","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map2messagemsg
"},{"name":"new sequence should contain transformed values","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map
by threes3i110true
"}]},{"name":"Minesweeper","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/minesweeper/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","*",""],["*","",""],["","*","*"]]],"output":[[2,"*",1],["*",4,3],[2,"*","*"]],"name":"board w/ mine counts on square board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*"],["*",""],["","*"]]],"output":[["*","*"],["*",4],[2,"*"]],"name":"board w/ mine counts on rectangle board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*","*"],["*","","*"],["","*",""]]],"output":[["*","*","*"],["*",6,"*"],[2,"*",2]],"name":"board w/ mine counts on dense board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","","",""],["","","","*"],["","","",""]]],"output":[[0,0,1,1],[0,0,1,"*"],[0,0,1,1]],"name":"board w/ mine counts on sparse board"}]},{"name":"Moving Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/moving-average/parsons.xml","tests":[{"name":"moving average block should return a list","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn1112"},{"name":"moving average should be computed correctly","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn-104176311.666666666666666744.666666666666667"}]},{"name":"Pangram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/pangram/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","inputs":[""],"output":false},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"lowercase pangram","inputs":["abcdefghijklmnopqrstuvwxyz"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"mixed case pangram","inputs":["abcdefghijkLMNOPQRSTUVWXYZ"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"pangram with extra symbols","inputs":["the quick brown fox jumps over a lazy dog!"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"missing a letter","inputs":["abcdefghijkLMNOPQRSTUVWYZ"],"output":false}]},{"name":"Sieve of Eratosthenes","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sieve/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should not consider 1 prime","inputs":[1],"output":[]},{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should find the all primes up to 5","inputs":[5],"output":[2,3,5]},{"type":"CustomBlockTest","name":"should find the all primes up to 30","spec":"factorial %'num'","inputs":[30],"output":[2,3,5,7,11,13,17,19,23,29]}]},{"name":"Sliding Windows","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sliding-windows/template.xml","tests":[]},{"name":"Transposing Music","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/transpose-music/template.xml","tests":[{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["78","1"],"output":"79","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["84","-2"],"output":"82","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["36","5"],"output":"41","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["C2","5"],"output":"41","name":"should accept note names (e.g., \"C4\")"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["50","0"],"output":"50","name":"should return original note when transposing by 0"}]},{"name":"Vigenere Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/vigenere/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["how are you?",["1","2","3","4"]],"output":"iqz$bth$zqxC"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["cba",["1","2","3"]],"output":"ddd"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["wow, negative keys?",["-2","-5","-3"]],"output":"ujt*\u001bkcb^rdsc\u001bhctp="},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["what large keys!",["100","200","300"]],"output":"[0\rXh\u0018E:\u0013Ih\u0017IA\u001f\u0005"}]}]}; const [ide] = world.children; class CustomBlockAutograder extends Extension { diff --git a/docs/autograders/letter-frequency.js b/docs/autograders/letter-frequency.js index b2420c9..52fbc8c 100644 --- a/docs/autograders/letter-frequency.js +++ b/docs/autograders/letter-frequency.js @@ -2,7 +2,7 @@ ScrollFrameMorph, nop, HandleMorph, List, Extension, ToggleMorph, BlockMorph, Color, SpriteMorph, localize, TextMorph, MorphicPreferences, WHITE*/ (function() { - const config = {"name":"NetsBlox Exercises","assignments":[{"name":"Acronym","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/acronym/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["I Don't Know"],"output":"IDK"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["President Of The United States"],"output":"POTUS"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Shaking My Head"],"output":"SMH"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Agnetha, Bjorn, Benny, Anni-Frid"],"output":"ABBA"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Zone Improvement Plan"],"output":"ZIP"}]},{"name":"Actor's Birthday","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/actor-birthday/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Keanu Reeves"],"output":"1964-09-02"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Meryl Streep"],"output":"1949-06-22"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Denzel Washington"],"output":"1954-12-28"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Lin-Manuel Miranda"],"output":"1980-01-16"}]},{"name":"Anagram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/anagram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["shepherd","spider"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","ccat"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["olive","ilove"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","CAT"],"output":true}]},{"name":"Atbash Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/atbash/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["abc"],"output":"zyx"},{"name":"should preserve letter case","type":"CustomBlockTest","spec":"encrypt %'message'","function":"iterator fnXYZCBA"},{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["$?! +@"],"output":"$?! +@","name":"should preserve non-letters such as punctuation"}]},{"name":"Between","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/between/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[1,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[3,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,3,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[-6,-5,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[20,-5,5],"output":false}]},{"name":"Bigram Autocomplete","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/bigram-autocomplete/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list","function":"fncatcab"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list with 26 rows","function":"fncatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should contain rows that sum to 100","function":"fn100.5rowcatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return correct probabilities","function":"fn5013catcabchechi"}]},{"name":"Caesar Shift","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/caesar-shift/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["abc",2],"output":"cde"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",100],"output":"()*"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",-50],"output":"\u0012\u0013\u0014"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["with spaces",10],"output":"\u0001s~r*}zkmo}"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["no shift!",0],"output":"no shift!"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["negative wrapping!",-200],"output":"&\u001d\u001f\u0019,!.\u001dX/*\u0019((!&\u001fY"}]},{"name":"Compute the Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average/parsons.xml","tests":[]},{"name":"Compute the Average of a List","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average-list/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","1"]],"output":"1"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","2"]],"output":"1.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["-1","2","4","-3"]],"output":"0.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32"]],"output":-7.4},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32","54"]],"output":2.8333333333333335}]},{"name":"Counting Letter Frequency","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","function":"countabcc11200000000000000000000000"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","function":"counta b ! c26"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","function":"countaAbBcCzZ22200000000000000000000002"}]},{"name":"Counting Letter Frequency as Dictionary","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency-dictionary/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","inputs":["abcc"],"output":[["a",1],["b",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","inputs":["a4cc"],"output":[["a",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","inputs":["xyzZ"],"output":[["x",1],["y",1],["z",2]]}]},{"name":"Cracking the Caesar Shift with Brute Force","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-brute-force/parsons.xml","tests":[{"type":"CustomBlockTest","name":"it should find key when starts with a search word","spec":"find key where %'msg' contains %'words'","function":"code breakerhello world2messagemsg
hello2
"},{"name":"it should find key when using multiple search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces15messagemsg
hellowith15
"},{"name":"it should find key when ends with one of many search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces33messagemsg
hellospaces33
"},{"name":"it should return -1 if cannot decode message","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerno hidden words3messagemsg
hellospaces-1
"}]},{"name":"Cracking the Caesar Shift with a Partial Solution","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-partial-soln/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","c"],"output":2},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["A","a"],"output":32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","A"],"output":-32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["5","0"],"output":-5},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":[".","?"],"output":17}]},{"name":"Cyclic Iterator","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/cyclic-iterator/parsons.xml","tests":[{"name":"block should return a function","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1"},{"name":"sequence should start with the first value in the list","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1messagemsg
1
2424
"},{"name":"sequence should remember position","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn797"},{"name":"sequence should restart after reaching the end","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn777"}]},{"name":"Factorial","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/factorial/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[5],"output":120},{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[0],"output":1},{"type":"CustomBlockTest","name":"should compute the factorial of an unknown input","spec":"factorial %'num'","inputs":[7],"output":5040}]},{"name":"FizzBuzz","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/fizz-buzz/template.xml","tests":[{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[1],"output":1},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-39],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[3],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-50],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[5],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-150],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[15],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[0],"output":"fizzbuzz"}]},{"name":"From Infinite Sequences to Finite Lists","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/take-collect-sequences/parsons.xml","tests":[]},{"name":"Greet","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/greet/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"greet %'person'","name":"greet %'person' should start with \"Hello,\"","function":"blockBrian15Hello"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Bob"],"output":"Hello, Bob!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Alice"],"output":"Hello, Alice!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Cliff"],"output":"Hello, Cliff!"}]},{"name":"Intro to Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/intro-infinite-sequences/parsons.xml","tests":[{"name":"sequence should start with 1","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fnmessagemsg
1
"},{"name":"sequence should remember current position","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"},{"name":"sequence should produce counting numbers","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fntrue"},{"name":"two sequences should iterate independently","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"}]},{"name":"Isogram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/isogram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["letter"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["a"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["arraigning"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect first-order isogram","function":"blocksunflower"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect second-order isogram","function":"blockhorseshoer"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect third-order isogram","function":"blockgeggee"}]},{"name":"Leap Year","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/leap-year/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2015],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1970],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1996],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1960],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2100],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1900],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2000],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2400],"output":true}]},{"name":"Luhn Formula","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/luhn-formula/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"single digits cannot be valid","inputs":["8"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid credit card","inputs":["8273 1232 7352 0569"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"text with non digit is invalid","inputs":["059a"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid long number with even remainder","inputs":["1 2345 6789 1234 5678 9012"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with even digits","inputs":["095 245 88"],"output":true},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with odd number of spaces","inputs":["234 567 891 234"],"output":true}]},{"name":"Mapping Over Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/map-sequence/parsons.xml","tests":[{"name":"map should return another sequence","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map2messagemsg
"},{"name":"new sequence should contain transformed values","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map
by threes3i110true
"}]},{"name":"Minesweeper","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/minesweeper/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","*",""],["*","",""],["","*","*"]]],"output":[[2,"*",1],["*",4,3],[2,"*","*"]],"name":"board w/ mine counts on square board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*"],["*",""],["","*"]]],"output":[["*","*"],["*",4],[2,"*"]],"name":"board w/ mine counts on rectangle board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*","*"],["*","","*"],["","*",""]]],"output":[["*","*","*"],["*",6,"*"],[2,"*",2]],"name":"board w/ mine counts on dense board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","","",""],["","","","*"],["","","",""]]],"output":[[0,0,1,1],[0,0,1,"*"],[0,0,1,1]],"name":"board w/ mine counts on sparse board"}]},{"name":"Moving Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/moving-average/parsons.xml","tests":[{"name":"moving average block should return a list","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn1112"},{"name":"moving average should be computed correctly","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn-104176311.666666666666666744.666666666666667"}]},{"name":"Pangram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/pangram/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","inputs":[""],"output":false},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"lowercase pangram","inputs":["abcdefghijklmnopqrstuvwxyz"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"mixed case pangram","inputs":["abcdefghijkLMNOPQRSTUVWXYZ"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"pangram with extra symbols","inputs":["the quick brown fox jumps over a lazy dog!"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"missing a letter","inputs":["abcdefghijkLMNOPQRSTUVWYZ"],"output":false}]},{"name":"Sieve of Eratosthenes","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sieve/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should not consider 1 prime","inputs":[1],"output":[]},{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should find the all primes up to 5","inputs":[5],"output":[2,3,5]},{"type":"CustomBlockTest","name":"should find the all primes up to 30","spec":"factorial %'num'","inputs":[30],"output":[2,3,5,7,11,13,17,19,23,29]}]},{"name":"Sliding Windows","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sliding-windows/template.xml","tests":[]},{"name":"Transposing Music","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/transpose-music/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["78","1"],"output":"79","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["84","-2"],"output":"82","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["36","5"],"output":"41","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["C2","5"],"output":"41","name":"should accept note names (e.g., \"C4\")"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["50","0"],"output":"50","name":"should return original note when transposing by 0"}]},{"name":"Vigenere Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/vigenere/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["how are you?",["1","2","3","4"]],"output":"iqz$bth$zqxC"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["cba",["1","2","3"]],"output":"ddd"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["wow, negative keys?",["-2","-5","-3"]],"output":"ujt*\u001bkcb^rdsc\u001bhctp="},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["what large keys!",["100","200","300"]],"output":"[0\rXh\u0018E:\u0013Ih\u0017IA\u001f\u0005"}]}]}; + const config = {"name":"NetsBlox Exercises","assignments":[{"name":"Acronym","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/acronym/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["I Don't Know"],"output":"IDK"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["President Of The United States"],"output":"POTUS"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Shaking My Head"],"output":"SMH"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Agnetha, Bjorn, Benny, Anni-Frid"],"output":"ABBA"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Zone Improvement Plan"],"output":"ZIP"}]},{"name":"Actor's Birthday","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/actor-birthday/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Keanu Reeves"],"output":"1964-09-02"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Meryl Streep"],"output":"1949-06-22"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Denzel Washington"],"output":"1954-12-28"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Lin-Manuel Miranda"],"output":"1980-01-16"}]},{"name":"Anagram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/anagram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["shepherd","spider"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","ccat"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["olive","ilove"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","CAT"],"output":true}]},{"name":"Atbash Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/atbash/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["abc"],"output":"zyx"},{"name":"should preserve letter case","type":"CustomBlockTest","spec":"encrypt %'message'","function":"iterator fnXYZCBA"},{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["$?! +@"],"output":"$?! +@","name":"should preserve non-letters such as punctuation"}]},{"name":"Between","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/between/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[1,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[3,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,3,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[-6,-5,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[20,-5,5],"output":false}]},{"name":"Bigram Autocomplete","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/bigram-autocomplete/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list","function":"fncatcab"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list with 26 rows","function":"fncatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should contain rows that sum to 100","function":"fn100.5rowcatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return correct probabilities","function":"fn5013catcabchechi"}]},{"name":"Caesar Shift","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/caesar-shift/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["abc",2],"output":"cde"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",100],"output":"()*"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",-50],"output":"\u0012\u0013\u0014"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["with spaces",10],"output":"\u0001s~r*}zkmo}"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["no shift!",0],"output":"no shift!"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["negative wrapping!",-200],"output":"&\u001d\u001f\u0019,!.\u001dX/*\u0019((!&\u001fY"}]},{"name":"Compute the Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average/parsons.xml","tests":[]},{"name":"Compute the Average of a List","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average-list/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","1"]],"output":"1"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","2"]],"output":"1.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["-1","2","4","-3"]],"output":"0.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32"]],"output":-7.4},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32","54"]],"output":2.8333333333333335}]},{"name":"Counting Letter Frequency","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","function":"countabcc11200000000000000000000000"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","function":"counta b ! c26"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","function":"countaAbBcCzZ22200000000000000000000002"}]},{"name":"Counting Letter Frequency as Dictionary","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency-dictionary/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","inputs":["abcc"],"output":[["a",1],["b",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","inputs":["a4cc"],"output":[["a",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","inputs":["xyzZ"],"output":[["x",1],["y",1],["z",2]]}]},{"name":"Cracking the Caesar Shift with Brute Force","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-brute-force/parsons.xml","tests":[{"type":"CustomBlockTest","name":"it should find key when starts with a search word","spec":"find key where %'msg' contains %'words'","function":"code breakerhello world2messagemsg
hello2
"},{"name":"it should find key when using multiple search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces15messagemsg
hellowith15
"},{"name":"it should find key when ends with one of many search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces33messagemsg
hellospaces33
"},{"name":"it should return -1 if cannot decode message","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerno hidden words3messagemsg
hellospaces-1
"}]},{"name":"Cracking the Caesar Shift with a Partial Solution","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-partial-soln/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","c"],"output":2},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["A","a"],"output":32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","A"],"output":-32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["5","0"],"output":-5},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":[".","?"],"output":17}]},{"name":"Cyclic Iterator","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/cyclic-iterator/parsons.xml","tests":[{"name":"block should return a function","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1"},{"name":"sequence should start with the first value in the list","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1messagemsg
1
2424
"},{"name":"sequence should remember position","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn797"},{"name":"sequence should restart after reaching the end","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn777"}]},{"name":"Factorial","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/factorial/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[5],"output":120},{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[0],"output":1},{"type":"CustomBlockTest","name":"should compute the factorial of an unknown input","spec":"factorial %'num'","inputs":[7],"output":5040}]},{"name":"FizzBuzz","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/fizz-buzz/template.xml","tests":[{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[1],"output":1},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-39],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[3],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-50],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[5],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-150],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[15],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[0],"output":"fizzbuzz"}]},{"name":"From Infinite Sequences to Finite Lists","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/take-collect-sequences/parsons.xml","tests":[]},{"name":"Greet","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/greet/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"greet %'person'","name":"greet %'person' should start with \"Hello,\"","function":"blockBrian15Hello"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Bob"],"output":"Hello, Bob!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Alice"],"output":"Hello, Alice!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Cliff"],"output":"Hello, Cliff!"}]},{"name":"Intro to Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/intro-infinite-sequences/parsons.xml","tests":[{"name":"sequence should start with 1","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fnmessagemsg
1
"},{"name":"sequence should remember current position","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"},{"name":"sequence should produce counting numbers","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fntrue"},{"name":"two sequences should iterate independently","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"}]},{"name":"Isogram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/isogram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["letter"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["a"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["arraigning"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect first-order isogram","function":"blocksunflower"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect second-order isogram","function":"blockhorseshoer"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect third-order isogram","function":"blockgeggee"}]},{"name":"Leap Year","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/leap-year/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2015],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1970],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1996],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1960],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2100],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1900],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2000],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2400],"output":true}]},{"name":"Luhn Formula","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/luhn-formula/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"single digits cannot be valid","inputs":["8"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid credit card","inputs":["8273 1232 7352 0569"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"text with non digit is invalid","inputs":["059a"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid long number with even remainder","inputs":["1 2345 6789 1234 5678 9012"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with even digits","inputs":["095 245 88"],"output":true},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with odd number of spaces","inputs":["234 567 891 234"],"output":true}]},{"name":"Mapping Over Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/map-sequence/parsons.xml","tests":[{"name":"map should return another sequence","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map2messagemsg
"},{"name":"new sequence should contain transformed values","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map
by threes3i110true
"}]},{"name":"Minesweeper","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/minesweeper/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","*",""],["*","",""],["","*","*"]]],"output":[[2,"*",1],["*",4,3],[2,"*","*"]],"name":"board w/ mine counts on square board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*"],["*",""],["","*"]]],"output":[["*","*"],["*",4],[2,"*"]],"name":"board w/ mine counts on rectangle board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*","*"],["*","","*"],["","*",""]]],"output":[["*","*","*"],["*",6,"*"],[2,"*",2]],"name":"board w/ mine counts on dense board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","","",""],["","","","*"],["","","",""]]],"output":[[0,0,1,1],[0,0,1,"*"],[0,0,1,1]],"name":"board w/ mine counts on sparse board"}]},{"name":"Moving Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/moving-average/parsons.xml","tests":[{"name":"moving average block should return a list","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn1112"},{"name":"moving average should be computed correctly","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn-104176311.666666666666666744.666666666666667"}]},{"name":"Pangram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/pangram/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","inputs":[""],"output":false},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"lowercase pangram","inputs":["abcdefghijklmnopqrstuvwxyz"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"mixed case pangram","inputs":["abcdefghijkLMNOPQRSTUVWXYZ"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"pangram with extra symbols","inputs":["the quick brown fox jumps over a lazy dog!"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"missing a letter","inputs":["abcdefghijkLMNOPQRSTUVWYZ"],"output":false}]},{"name":"Sieve of Eratosthenes","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sieve/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should not consider 1 prime","inputs":[1],"output":[]},{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should find the all primes up to 5","inputs":[5],"output":[2,3,5]},{"type":"CustomBlockTest","name":"should find the all primes up to 30","spec":"factorial %'num'","inputs":[30],"output":[2,3,5,7,11,13,17,19,23,29]}]},{"name":"Sliding Windows","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sliding-windows/template.xml","tests":[]},{"name":"Transposing Music","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/transpose-music/template.xml","tests":[{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["78","1"],"output":"79","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["84","-2"],"output":"82","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["36","5"],"output":"41","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["C2","5"],"output":"41","name":"should accept note names (e.g., \"C4\")"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["50","0"],"output":"50","name":"should return original note when transposing by 0"}]},{"name":"Vigenere Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/vigenere/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["how are you?",["1","2","3","4"]],"output":"iqz$bth$zqxC"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["cba",["1","2","3"]],"output":"ddd"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["wow, negative keys?",["-2","-5","-3"]],"output":"ujt*\u001bkcb^rdsc\u001bhctp="},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["what large keys!",["100","200","300"]],"output":"[0\rXh\u0018E:\u0013Ih\u0017IA\u001f\u0005"}]}]}; const [ide] = world.children; class CustomBlockAutograder extends Extension { diff --git a/docs/autograders/luhn-formula.js b/docs/autograders/luhn-formula.js index ce4d623..438231b 100644 --- a/docs/autograders/luhn-formula.js +++ b/docs/autograders/luhn-formula.js @@ -2,7 +2,7 @@ ScrollFrameMorph, nop, HandleMorph, List, Extension, ToggleMorph, BlockMorph, Color, SpriteMorph, localize, TextMorph, MorphicPreferences, WHITE*/ (function() { - const config = {"name":"NetsBlox Exercises","assignments":[{"name":"Acronym","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/acronym/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["I Don't Know"],"output":"IDK"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["President Of The United States"],"output":"POTUS"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Shaking My Head"],"output":"SMH"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Agnetha, Bjorn, Benny, Anni-Frid"],"output":"ABBA"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Zone Improvement Plan"],"output":"ZIP"}]},{"name":"Actor's Birthday","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/actor-birthday/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Keanu Reeves"],"output":"1964-09-02"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Meryl Streep"],"output":"1949-06-22"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Denzel Washington"],"output":"1954-12-28"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Lin-Manuel Miranda"],"output":"1980-01-16"}]},{"name":"Anagram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/anagram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["shepherd","spider"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","ccat"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["olive","ilove"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","CAT"],"output":true}]},{"name":"Atbash Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/atbash/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["abc"],"output":"zyx"},{"name":"should preserve letter case","type":"CustomBlockTest","spec":"encrypt %'message'","function":"iterator fnXYZCBA"},{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["$?! +@"],"output":"$?! +@","name":"should preserve non-letters such as punctuation"}]},{"name":"Between","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/between/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[1,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[3,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,3,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[-6,-5,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[20,-5,5],"output":false}]},{"name":"Bigram Autocomplete","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/bigram-autocomplete/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list","function":"fncatcab"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list with 26 rows","function":"fncatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should contain rows that sum to 100","function":"fn100.5rowcatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return correct probabilities","function":"fn5013catcabchechi"}]},{"name":"Caesar Shift","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/caesar-shift/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["abc",2],"output":"cde"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",100],"output":"()*"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",-50],"output":"\u0012\u0013\u0014"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["with spaces",10],"output":"\u0001s~r*}zkmo}"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["no shift!",0],"output":"no shift!"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["negative wrapping!",-200],"output":"&\u001d\u001f\u0019,!.\u001dX/*\u0019((!&\u001fY"}]},{"name":"Compute the Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average/parsons.xml","tests":[]},{"name":"Compute the Average of a List","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average-list/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","1"]],"output":"1"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","2"]],"output":"1.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["-1","2","4","-3"]],"output":"0.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32"]],"output":-7.4},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32","54"]],"output":2.8333333333333335}]},{"name":"Counting Letter Frequency","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","function":"countabcc11200000000000000000000000"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","function":"counta b ! c26"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","function":"countaAbBcCzZ22200000000000000000000002"}]},{"name":"Counting Letter Frequency as Dictionary","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency-dictionary/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","inputs":["abcc"],"output":[["a",1],["b",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","inputs":["a4cc"],"output":[["a",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","inputs":["xyzZ"],"output":[["x",1],["y",1],["z",2]]}]},{"name":"Cracking the Caesar Shift with Brute Force","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-brute-force/parsons.xml","tests":[{"type":"CustomBlockTest","name":"it should find key when starts with a search word","spec":"find key where %'msg' contains %'words'","function":"code breakerhello world2messagemsg
hello2
"},{"name":"it should find key when using multiple search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces15messagemsg
hellowith15
"},{"name":"it should find key when ends with one of many search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces33messagemsg
hellospaces33
"},{"name":"it should return -1 if cannot decode message","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerno hidden words3messagemsg
hellospaces-1
"}]},{"name":"Cracking the Caesar Shift with a Partial Solution","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-partial-soln/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","c"],"output":2},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["A","a"],"output":32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","A"],"output":-32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["5","0"],"output":-5},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":[".","?"],"output":17}]},{"name":"Cyclic Iterator","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/cyclic-iterator/parsons.xml","tests":[{"name":"block should return a function","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1"},{"name":"sequence should start with the first value in the list","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1messagemsg
1
2424
"},{"name":"sequence should remember position","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn797"},{"name":"sequence should restart after reaching the end","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn777"}]},{"name":"Factorial","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/factorial/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[5],"output":120},{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[0],"output":1},{"type":"CustomBlockTest","name":"should compute the factorial of an unknown input","spec":"factorial %'num'","inputs":[7],"output":5040}]},{"name":"FizzBuzz","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/fizz-buzz/template.xml","tests":[{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[1],"output":1},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-39],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[3],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-50],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[5],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-150],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[15],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[0],"output":"fizzbuzz"}]},{"name":"From Infinite Sequences to Finite Lists","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/take-collect-sequences/parsons.xml","tests":[]},{"name":"Greet","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/greet/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"greet %'person'","name":"greet %'person' should start with \"Hello,\"","function":"blockBrian15Hello"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Bob"],"output":"Hello, Bob!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Alice"],"output":"Hello, Alice!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Cliff"],"output":"Hello, Cliff!"}]},{"name":"Intro to Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/intro-infinite-sequences/parsons.xml","tests":[{"name":"sequence should start with 1","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fnmessagemsg
1
"},{"name":"sequence should remember current position","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"},{"name":"sequence should produce counting numbers","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fntrue"},{"name":"two sequences should iterate independently","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"}]},{"name":"Isogram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/isogram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["letter"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["a"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["arraigning"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect first-order isogram","function":"blocksunflower"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect second-order isogram","function":"blockhorseshoer"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect third-order isogram","function":"blockgeggee"}]},{"name":"Leap Year","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/leap-year/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2015],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1970],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1996],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1960],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2100],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1900],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2000],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2400],"output":true}]},{"name":"Luhn Formula","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/luhn-formula/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"single digits cannot be valid","inputs":["8"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid credit card","inputs":["8273 1232 7352 0569"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"text with non digit is invalid","inputs":["059a"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid long number with even remainder","inputs":["1 2345 6789 1234 5678 9012"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with even digits","inputs":["095 245 88"],"output":true},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with odd number of spaces","inputs":["234 567 891 234"],"output":true}]},{"name":"Mapping Over Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/map-sequence/parsons.xml","tests":[{"name":"map should return another sequence","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map2messagemsg
"},{"name":"new sequence should contain transformed values","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map
by threes3i110true
"}]},{"name":"Minesweeper","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/minesweeper/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","*",""],["*","",""],["","*","*"]]],"output":[[2,"*",1],["*",4,3],[2,"*","*"]],"name":"board w/ mine counts on square board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*"],["*",""],["","*"]]],"output":[["*","*"],["*",4],[2,"*"]],"name":"board w/ mine counts on rectangle board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*","*"],["*","","*"],["","*",""]]],"output":[["*","*","*"],["*",6,"*"],[2,"*",2]],"name":"board w/ mine counts on dense board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","","",""],["","","","*"],["","","",""]]],"output":[[0,0,1,1],[0,0,1,"*"],[0,0,1,1]],"name":"board w/ mine counts on sparse board"}]},{"name":"Moving Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/moving-average/parsons.xml","tests":[{"name":"moving average block should return a list","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn1112"},{"name":"moving average should be computed correctly","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn-104176311.666666666666666744.666666666666667"}]},{"name":"Pangram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/pangram/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","inputs":[""],"output":false},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"lowercase pangram","inputs":["abcdefghijklmnopqrstuvwxyz"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"mixed case pangram","inputs":["abcdefghijkLMNOPQRSTUVWXYZ"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"pangram with extra symbols","inputs":["the quick brown fox jumps over a lazy dog!"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"missing a letter","inputs":["abcdefghijkLMNOPQRSTUVWYZ"],"output":false}]},{"name":"Sieve of Eratosthenes","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sieve/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should not consider 1 prime","inputs":[1],"output":[]},{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should find the all primes up to 5","inputs":[5],"output":[2,3,5]},{"type":"CustomBlockTest","name":"should find the all primes up to 30","spec":"factorial %'num'","inputs":[30],"output":[2,3,5,7,11,13,17,19,23,29]}]},{"name":"Sliding Windows","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sliding-windows/template.xml","tests":[]},{"name":"Transposing Music","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/transpose-music/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["78","1"],"output":"79","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["84","-2"],"output":"82","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["36","5"],"output":"41","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["C2","5"],"output":"41","name":"should accept note names (e.g., \"C4\")"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["50","0"],"output":"50","name":"should return original note when transposing by 0"}]},{"name":"Vigenere Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/vigenere/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["how are you?",["1","2","3","4"]],"output":"iqz$bth$zqxC"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["cba",["1","2","3"]],"output":"ddd"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["wow, negative keys?",["-2","-5","-3"]],"output":"ujt*\u001bkcb^rdsc\u001bhctp="},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["what large keys!",["100","200","300"]],"output":"[0\rXh\u0018E:\u0013Ih\u0017IA\u001f\u0005"}]}]}; + const config = {"name":"NetsBlox Exercises","assignments":[{"name":"Acronym","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/acronym/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["I Don't Know"],"output":"IDK"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["President Of The United States"],"output":"POTUS"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Shaking My Head"],"output":"SMH"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Agnetha, Bjorn, Benny, Anni-Frid"],"output":"ABBA"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Zone Improvement Plan"],"output":"ZIP"}]},{"name":"Actor's Birthday","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/actor-birthday/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Keanu Reeves"],"output":"1964-09-02"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Meryl Streep"],"output":"1949-06-22"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Denzel Washington"],"output":"1954-12-28"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Lin-Manuel Miranda"],"output":"1980-01-16"}]},{"name":"Anagram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/anagram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["shepherd","spider"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","ccat"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["olive","ilove"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","CAT"],"output":true}]},{"name":"Atbash Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/atbash/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["abc"],"output":"zyx"},{"name":"should preserve letter case","type":"CustomBlockTest","spec":"encrypt %'message'","function":"iterator fnXYZCBA"},{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["$?! +@"],"output":"$?! +@","name":"should preserve non-letters such as punctuation"}]},{"name":"Between","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/between/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[1,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[3,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,3,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[-6,-5,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[20,-5,5],"output":false}]},{"name":"Bigram Autocomplete","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/bigram-autocomplete/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list","function":"fncatcab"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list with 26 rows","function":"fncatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should contain rows that sum to 100","function":"fn100.5rowcatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return correct probabilities","function":"fn5013catcabchechi"}]},{"name":"Caesar Shift","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/caesar-shift/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["abc",2],"output":"cde"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",100],"output":"()*"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",-50],"output":"\u0012\u0013\u0014"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["with spaces",10],"output":"\u0001s~r*}zkmo}"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["no shift!",0],"output":"no shift!"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["negative wrapping!",-200],"output":"&\u001d\u001f\u0019,!.\u001dX/*\u0019((!&\u001fY"}]},{"name":"Compute the Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average/parsons.xml","tests":[]},{"name":"Compute the Average of a List","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average-list/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","1"]],"output":"1"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","2"]],"output":"1.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["-1","2","4","-3"]],"output":"0.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32"]],"output":-7.4},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32","54"]],"output":2.8333333333333335}]},{"name":"Counting Letter Frequency","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","function":"countabcc11200000000000000000000000"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","function":"counta b ! c26"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","function":"countaAbBcCzZ22200000000000000000000002"}]},{"name":"Counting Letter Frequency as Dictionary","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency-dictionary/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","inputs":["abcc"],"output":[["a",1],["b",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","inputs":["a4cc"],"output":[["a",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","inputs":["xyzZ"],"output":[["x",1],["y",1],["z",2]]}]},{"name":"Cracking the Caesar Shift with Brute Force","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-brute-force/parsons.xml","tests":[{"type":"CustomBlockTest","name":"it should find key when starts with a search word","spec":"find key where %'msg' contains %'words'","function":"code breakerhello world2messagemsg
hello2
"},{"name":"it should find key when using multiple search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces15messagemsg
hellowith15
"},{"name":"it should find key when ends with one of many search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces33messagemsg
hellospaces33
"},{"name":"it should return -1 if cannot decode message","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerno hidden words3messagemsg
hellospaces-1
"}]},{"name":"Cracking the Caesar Shift with a Partial Solution","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-partial-soln/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","c"],"output":2},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["A","a"],"output":32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","A"],"output":-32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["5","0"],"output":-5},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":[".","?"],"output":17}]},{"name":"Cyclic Iterator","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/cyclic-iterator/parsons.xml","tests":[{"name":"block should return a function","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1"},{"name":"sequence should start with the first value in the list","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1messagemsg
1
2424
"},{"name":"sequence should remember position","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn797"},{"name":"sequence should restart after reaching the end","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn777"}]},{"name":"Factorial","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/factorial/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[5],"output":120},{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[0],"output":1},{"type":"CustomBlockTest","name":"should compute the factorial of an unknown input","spec":"factorial %'num'","inputs":[7],"output":5040}]},{"name":"FizzBuzz","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/fizz-buzz/template.xml","tests":[{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[1],"output":1},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-39],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[3],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-50],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[5],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-150],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[15],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[0],"output":"fizzbuzz"}]},{"name":"From Infinite Sequences to Finite Lists","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/take-collect-sequences/parsons.xml","tests":[]},{"name":"Greet","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/greet/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"greet %'person'","name":"greet %'person' should start with \"Hello,\"","function":"blockBrian15Hello"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Bob"],"output":"Hello, Bob!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Alice"],"output":"Hello, Alice!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Cliff"],"output":"Hello, Cliff!"}]},{"name":"Intro to Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/intro-infinite-sequences/parsons.xml","tests":[{"name":"sequence should start with 1","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fnmessagemsg
1
"},{"name":"sequence should remember current position","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"},{"name":"sequence should produce counting numbers","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fntrue"},{"name":"two sequences should iterate independently","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"}]},{"name":"Isogram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/isogram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["letter"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["a"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["arraigning"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect first-order isogram","function":"blocksunflower"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect second-order isogram","function":"blockhorseshoer"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect third-order isogram","function":"blockgeggee"}]},{"name":"Leap Year","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/leap-year/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2015],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1970],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1996],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1960],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2100],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1900],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2000],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2400],"output":true}]},{"name":"Luhn Formula","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/luhn-formula/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"single digits cannot be valid","inputs":["8"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid credit card","inputs":["8273 1232 7352 0569"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"text with non digit is invalid","inputs":["059a"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid long number with even remainder","inputs":["1 2345 6789 1234 5678 9012"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with even digits","inputs":["095 245 88"],"output":true},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with odd number of spaces","inputs":["234 567 891 234"],"output":true}]},{"name":"Mapping Over Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/map-sequence/parsons.xml","tests":[{"name":"map should return another sequence","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map2messagemsg
"},{"name":"new sequence should contain transformed values","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map
by threes3i110true
"}]},{"name":"Minesweeper","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/minesweeper/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","*",""],["*","",""],["","*","*"]]],"output":[[2,"*",1],["*",4,3],[2,"*","*"]],"name":"board w/ mine counts on square board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*"],["*",""],["","*"]]],"output":[["*","*"],["*",4],[2,"*"]],"name":"board w/ mine counts on rectangle board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*","*"],["*","","*"],["","*",""]]],"output":[["*","*","*"],["*",6,"*"],[2,"*",2]],"name":"board w/ mine counts on dense board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","","",""],["","","","*"],["","","",""]]],"output":[[0,0,1,1],[0,0,1,"*"],[0,0,1,1]],"name":"board w/ mine counts on sparse board"}]},{"name":"Moving Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/moving-average/parsons.xml","tests":[{"name":"moving average block should return a list","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn1112"},{"name":"moving average should be computed correctly","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn-104176311.666666666666666744.666666666666667"}]},{"name":"Pangram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/pangram/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","inputs":[""],"output":false},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"lowercase pangram","inputs":["abcdefghijklmnopqrstuvwxyz"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"mixed case pangram","inputs":["abcdefghijkLMNOPQRSTUVWXYZ"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"pangram with extra symbols","inputs":["the quick brown fox jumps over a lazy dog!"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"missing a letter","inputs":["abcdefghijkLMNOPQRSTUVWYZ"],"output":false}]},{"name":"Sieve of Eratosthenes","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sieve/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should not consider 1 prime","inputs":[1],"output":[]},{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should find the all primes up to 5","inputs":[5],"output":[2,3,5]},{"type":"CustomBlockTest","name":"should find the all primes up to 30","spec":"factorial %'num'","inputs":[30],"output":[2,3,5,7,11,13,17,19,23,29]}]},{"name":"Sliding Windows","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sliding-windows/template.xml","tests":[]},{"name":"Transposing Music","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/transpose-music/template.xml","tests":[{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["78","1"],"output":"79","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["84","-2"],"output":"82","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["36","5"],"output":"41","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["C2","5"],"output":"41","name":"should accept note names (e.g., \"C4\")"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["50","0"],"output":"50","name":"should return original note when transposing by 0"}]},{"name":"Vigenere Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/vigenere/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["how are you?",["1","2","3","4"]],"output":"iqz$bth$zqxC"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["cba",["1","2","3"]],"output":"ddd"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["wow, negative keys?",["-2","-5","-3"]],"output":"ujt*\u001bkcb^rdsc\u001bhctp="},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["what large keys!",["100","200","300"]],"output":"[0\rXh\u0018E:\u0013Ih\u0017IA\u001f\u0005"}]}]}; const [ide] = world.children; class CustomBlockAutograder extends Extension { diff --git a/docs/autograders/map-sequence.js b/docs/autograders/map-sequence.js index 3dc01cc..453be55 100644 --- a/docs/autograders/map-sequence.js +++ b/docs/autograders/map-sequence.js @@ -2,7 +2,7 @@ ScrollFrameMorph, nop, HandleMorph, List, Extension, ToggleMorph, BlockMorph, Color, SpriteMorph, localize, TextMorph, MorphicPreferences, WHITE*/ (function() { - const config = {"name":"NetsBlox Exercises","assignments":[{"name":"Acronym","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/acronym/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["I Don't Know"],"output":"IDK"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["President Of The United States"],"output":"POTUS"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Shaking My Head"],"output":"SMH"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Agnetha, Bjorn, Benny, Anni-Frid"],"output":"ABBA"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Zone Improvement Plan"],"output":"ZIP"}]},{"name":"Actor's Birthday","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/actor-birthday/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Keanu Reeves"],"output":"1964-09-02"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Meryl Streep"],"output":"1949-06-22"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Denzel Washington"],"output":"1954-12-28"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Lin-Manuel Miranda"],"output":"1980-01-16"}]},{"name":"Anagram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/anagram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["shepherd","spider"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","ccat"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["olive","ilove"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","CAT"],"output":true}]},{"name":"Atbash Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/atbash/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["abc"],"output":"zyx"},{"name":"should preserve letter case","type":"CustomBlockTest","spec":"encrypt %'message'","function":"iterator fnXYZCBA"},{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["$?! +@"],"output":"$?! +@","name":"should preserve non-letters such as punctuation"}]},{"name":"Between","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/between/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[1,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[3,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,3,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[-6,-5,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[20,-5,5],"output":false}]},{"name":"Bigram Autocomplete","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/bigram-autocomplete/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list","function":"fncatcab"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list with 26 rows","function":"fncatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should contain rows that sum to 100","function":"fn100.5rowcatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return correct probabilities","function":"fn5013catcabchechi"}]},{"name":"Caesar Shift","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/caesar-shift/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["abc",2],"output":"cde"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",100],"output":"()*"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",-50],"output":"\u0012\u0013\u0014"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["with spaces",10],"output":"\u0001s~r*}zkmo}"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["no shift!",0],"output":"no shift!"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["negative wrapping!",-200],"output":"&\u001d\u001f\u0019,!.\u001dX/*\u0019((!&\u001fY"}]},{"name":"Compute the Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average/parsons.xml","tests":[]},{"name":"Compute the Average of a List","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average-list/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","1"]],"output":"1"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","2"]],"output":"1.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["-1","2","4","-3"]],"output":"0.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32"]],"output":-7.4},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32","54"]],"output":2.8333333333333335}]},{"name":"Counting Letter Frequency","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","function":"countabcc11200000000000000000000000"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","function":"counta b ! c26"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","function":"countaAbBcCzZ22200000000000000000000002"}]},{"name":"Counting Letter Frequency as Dictionary","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency-dictionary/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","inputs":["abcc"],"output":[["a",1],["b",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","inputs":["a4cc"],"output":[["a",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","inputs":["xyzZ"],"output":[["x",1],["y",1],["z",2]]}]},{"name":"Cracking the Caesar Shift with Brute Force","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-brute-force/parsons.xml","tests":[{"type":"CustomBlockTest","name":"it should find key when starts with a search word","spec":"find key where %'msg' contains %'words'","function":"code breakerhello world2messagemsg
hello2
"},{"name":"it should find key when using multiple search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces15messagemsg
hellowith15
"},{"name":"it should find key when ends with one of many search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces33messagemsg
hellospaces33
"},{"name":"it should return -1 if cannot decode message","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerno hidden words3messagemsg
hellospaces-1
"}]},{"name":"Cracking the Caesar Shift with a Partial Solution","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-partial-soln/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","c"],"output":2},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["A","a"],"output":32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","A"],"output":-32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["5","0"],"output":-5},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":[".","?"],"output":17}]},{"name":"Cyclic Iterator","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/cyclic-iterator/parsons.xml","tests":[{"name":"block should return a function","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1"},{"name":"sequence should start with the first value in the list","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1messagemsg
1
2424
"},{"name":"sequence should remember position","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn797"},{"name":"sequence should restart after reaching the end","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn777"}]},{"name":"Factorial","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/factorial/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[5],"output":120},{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[0],"output":1},{"type":"CustomBlockTest","name":"should compute the factorial of an unknown input","spec":"factorial %'num'","inputs":[7],"output":5040}]},{"name":"FizzBuzz","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/fizz-buzz/template.xml","tests":[{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[1],"output":1},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-39],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[3],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-50],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[5],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-150],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[15],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[0],"output":"fizzbuzz"}]},{"name":"From Infinite Sequences to Finite Lists","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/take-collect-sequences/parsons.xml","tests":[]},{"name":"Greet","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/greet/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"greet %'person'","name":"greet %'person' should start with \"Hello,\"","function":"blockBrian15Hello"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Bob"],"output":"Hello, Bob!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Alice"],"output":"Hello, Alice!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Cliff"],"output":"Hello, Cliff!"}]},{"name":"Intro to Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/intro-infinite-sequences/parsons.xml","tests":[{"name":"sequence should start with 1","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fnmessagemsg
1
"},{"name":"sequence should remember current position","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"},{"name":"sequence should produce counting numbers","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fntrue"},{"name":"two sequences should iterate independently","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"}]},{"name":"Isogram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/isogram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["letter"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["a"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["arraigning"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect first-order isogram","function":"blocksunflower"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect second-order isogram","function":"blockhorseshoer"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect third-order isogram","function":"blockgeggee"}]},{"name":"Leap Year","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/leap-year/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2015],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1970],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1996],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1960],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2100],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1900],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2000],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2400],"output":true}]},{"name":"Luhn Formula","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/luhn-formula/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"single digits cannot be valid","inputs":["8"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid credit card","inputs":["8273 1232 7352 0569"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"text with non digit is invalid","inputs":["059a"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid long number with even remainder","inputs":["1 2345 6789 1234 5678 9012"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with even digits","inputs":["095 245 88"],"output":true},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with odd number of spaces","inputs":["234 567 891 234"],"output":true}]},{"name":"Mapping Over Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/map-sequence/parsons.xml","tests":[{"name":"map should return another sequence","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map2messagemsg
"},{"name":"new sequence should contain transformed values","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map
by threes3i110true
"}]},{"name":"Minesweeper","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/minesweeper/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","*",""],["*","",""],["","*","*"]]],"output":[[2,"*",1],["*",4,3],[2,"*","*"]],"name":"board w/ mine counts on square board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*"],["*",""],["","*"]]],"output":[["*","*"],["*",4],[2,"*"]],"name":"board w/ mine counts on rectangle board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*","*"],["*","","*"],["","*",""]]],"output":[["*","*","*"],["*",6,"*"],[2,"*",2]],"name":"board w/ mine counts on dense board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","","",""],["","","","*"],["","","",""]]],"output":[[0,0,1,1],[0,0,1,"*"],[0,0,1,1]],"name":"board w/ mine counts on sparse board"}]},{"name":"Moving Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/moving-average/parsons.xml","tests":[{"name":"moving average block should return a list","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn1112"},{"name":"moving average should be computed correctly","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn-104176311.666666666666666744.666666666666667"}]},{"name":"Pangram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/pangram/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","inputs":[""],"output":false},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"lowercase pangram","inputs":["abcdefghijklmnopqrstuvwxyz"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"mixed case pangram","inputs":["abcdefghijkLMNOPQRSTUVWXYZ"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"pangram with extra symbols","inputs":["the quick brown fox jumps over a lazy dog!"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"missing a letter","inputs":["abcdefghijkLMNOPQRSTUVWYZ"],"output":false}]},{"name":"Sieve of Eratosthenes","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sieve/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should not consider 1 prime","inputs":[1],"output":[]},{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should find the all primes up to 5","inputs":[5],"output":[2,3,5]},{"type":"CustomBlockTest","name":"should find the all primes up to 30","spec":"factorial %'num'","inputs":[30],"output":[2,3,5,7,11,13,17,19,23,29]}]},{"name":"Sliding Windows","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sliding-windows/template.xml","tests":[]},{"name":"Transposing Music","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/transpose-music/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["78","1"],"output":"79","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["84","-2"],"output":"82","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["36","5"],"output":"41","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["C2","5"],"output":"41","name":"should accept note names (e.g., \"C4\")"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["50","0"],"output":"50","name":"should return original note when transposing by 0"}]},{"name":"Vigenere Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/vigenere/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["how are you?",["1","2","3","4"]],"output":"iqz$bth$zqxC"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["cba",["1","2","3"]],"output":"ddd"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["wow, negative keys?",["-2","-5","-3"]],"output":"ujt*\u001bkcb^rdsc\u001bhctp="},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["what large keys!",["100","200","300"]],"output":"[0\rXh\u0018E:\u0013Ih\u0017IA\u001f\u0005"}]}]}; + const config = {"name":"NetsBlox Exercises","assignments":[{"name":"Acronym","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/acronym/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["I Don't Know"],"output":"IDK"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["President Of The United States"],"output":"POTUS"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Shaking My Head"],"output":"SMH"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Agnetha, Bjorn, Benny, Anni-Frid"],"output":"ABBA"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Zone Improvement Plan"],"output":"ZIP"}]},{"name":"Actor's Birthday","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/actor-birthday/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Keanu Reeves"],"output":"1964-09-02"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Meryl Streep"],"output":"1949-06-22"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Denzel Washington"],"output":"1954-12-28"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Lin-Manuel Miranda"],"output":"1980-01-16"}]},{"name":"Anagram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/anagram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["shepherd","spider"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","ccat"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["olive","ilove"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","CAT"],"output":true}]},{"name":"Atbash Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/atbash/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["abc"],"output":"zyx"},{"name":"should preserve letter case","type":"CustomBlockTest","spec":"encrypt %'message'","function":"iterator fnXYZCBA"},{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["$?! +@"],"output":"$?! +@","name":"should preserve non-letters such as punctuation"}]},{"name":"Between","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/between/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[1,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[3,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,3,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[-6,-5,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[20,-5,5],"output":false}]},{"name":"Bigram Autocomplete","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/bigram-autocomplete/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list","function":"fncatcab"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list with 26 rows","function":"fncatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should contain rows that sum to 100","function":"fn100.5rowcatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return correct probabilities","function":"fn5013catcabchechi"}]},{"name":"Caesar Shift","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/caesar-shift/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["abc",2],"output":"cde"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",100],"output":"()*"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",-50],"output":"\u0012\u0013\u0014"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["with spaces",10],"output":"\u0001s~r*}zkmo}"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["no shift!",0],"output":"no shift!"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["negative wrapping!",-200],"output":"&\u001d\u001f\u0019,!.\u001dX/*\u0019((!&\u001fY"}]},{"name":"Compute the Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average/parsons.xml","tests":[]},{"name":"Compute the Average of a List","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average-list/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","1"]],"output":"1"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","2"]],"output":"1.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["-1","2","4","-3"]],"output":"0.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32"]],"output":-7.4},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32","54"]],"output":2.8333333333333335}]},{"name":"Counting Letter Frequency","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","function":"countabcc11200000000000000000000000"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","function":"counta b ! c26"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","function":"countaAbBcCzZ22200000000000000000000002"}]},{"name":"Counting Letter Frequency as Dictionary","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency-dictionary/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","inputs":["abcc"],"output":[["a",1],["b",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","inputs":["a4cc"],"output":[["a",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","inputs":["xyzZ"],"output":[["x",1],["y",1],["z",2]]}]},{"name":"Cracking the Caesar Shift with Brute Force","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-brute-force/parsons.xml","tests":[{"type":"CustomBlockTest","name":"it should find key when starts with a search word","spec":"find key where %'msg' contains %'words'","function":"code breakerhello world2messagemsg
hello2
"},{"name":"it should find key when using multiple search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces15messagemsg
hellowith15
"},{"name":"it should find key when ends with one of many search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces33messagemsg
hellospaces33
"},{"name":"it should return -1 if cannot decode message","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerno hidden words3messagemsg
hellospaces-1
"}]},{"name":"Cracking the Caesar Shift with a Partial Solution","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-partial-soln/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","c"],"output":2},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["A","a"],"output":32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","A"],"output":-32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["5","0"],"output":-5},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":[".","?"],"output":17}]},{"name":"Cyclic Iterator","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/cyclic-iterator/parsons.xml","tests":[{"name":"block should return a function","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1"},{"name":"sequence should start with the first value in the list","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1messagemsg
1
2424
"},{"name":"sequence should remember position","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn797"},{"name":"sequence should restart after reaching the end","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn777"}]},{"name":"Factorial","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/factorial/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[5],"output":120},{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[0],"output":1},{"type":"CustomBlockTest","name":"should compute the factorial of an unknown input","spec":"factorial %'num'","inputs":[7],"output":5040}]},{"name":"FizzBuzz","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/fizz-buzz/template.xml","tests":[{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[1],"output":1},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-39],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[3],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-50],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[5],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-150],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[15],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[0],"output":"fizzbuzz"}]},{"name":"From Infinite Sequences to Finite Lists","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/take-collect-sequences/parsons.xml","tests":[]},{"name":"Greet","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/greet/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"greet %'person'","name":"greet %'person' should start with \"Hello,\"","function":"blockBrian15Hello"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Bob"],"output":"Hello, Bob!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Alice"],"output":"Hello, Alice!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Cliff"],"output":"Hello, Cliff!"}]},{"name":"Intro to Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/intro-infinite-sequences/parsons.xml","tests":[{"name":"sequence should start with 1","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fnmessagemsg
1
"},{"name":"sequence should remember current position","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"},{"name":"sequence should produce counting numbers","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fntrue"},{"name":"two sequences should iterate independently","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"}]},{"name":"Isogram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/isogram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["letter"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["a"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["arraigning"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect first-order isogram","function":"blocksunflower"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect second-order isogram","function":"blockhorseshoer"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect third-order isogram","function":"blockgeggee"}]},{"name":"Leap Year","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/leap-year/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2015],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1970],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1996],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1960],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2100],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1900],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2000],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2400],"output":true}]},{"name":"Luhn Formula","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/luhn-formula/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"single digits cannot be valid","inputs":["8"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid credit card","inputs":["8273 1232 7352 0569"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"text with non digit is invalid","inputs":["059a"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid long number with even remainder","inputs":["1 2345 6789 1234 5678 9012"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with even digits","inputs":["095 245 88"],"output":true},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with odd number of spaces","inputs":["234 567 891 234"],"output":true}]},{"name":"Mapping Over Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/map-sequence/parsons.xml","tests":[{"name":"map should return another sequence","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map2messagemsg
"},{"name":"new sequence should contain transformed values","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map
by threes3i110true
"}]},{"name":"Minesweeper","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/minesweeper/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","*",""],["*","",""],["","*","*"]]],"output":[[2,"*",1],["*",4,3],[2,"*","*"]],"name":"board w/ mine counts on square board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*"],["*",""],["","*"]]],"output":[["*","*"],["*",4],[2,"*"]],"name":"board w/ mine counts on rectangle board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*","*"],["*","","*"],["","*",""]]],"output":[["*","*","*"],["*",6,"*"],[2,"*",2]],"name":"board w/ mine counts on dense board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","","",""],["","","","*"],["","","",""]]],"output":[[0,0,1,1],[0,0,1,"*"],[0,0,1,1]],"name":"board w/ mine counts on sparse board"}]},{"name":"Moving Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/moving-average/parsons.xml","tests":[{"name":"moving average block should return a list","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn1112"},{"name":"moving average should be computed correctly","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn-104176311.666666666666666744.666666666666667"}]},{"name":"Pangram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/pangram/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","inputs":[""],"output":false},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"lowercase pangram","inputs":["abcdefghijklmnopqrstuvwxyz"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"mixed case pangram","inputs":["abcdefghijkLMNOPQRSTUVWXYZ"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"pangram with extra symbols","inputs":["the quick brown fox jumps over a lazy dog!"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"missing a letter","inputs":["abcdefghijkLMNOPQRSTUVWYZ"],"output":false}]},{"name":"Sieve of Eratosthenes","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sieve/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should not consider 1 prime","inputs":[1],"output":[]},{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should find the all primes up to 5","inputs":[5],"output":[2,3,5]},{"type":"CustomBlockTest","name":"should find the all primes up to 30","spec":"factorial %'num'","inputs":[30],"output":[2,3,5,7,11,13,17,19,23,29]}]},{"name":"Sliding Windows","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sliding-windows/template.xml","tests":[]},{"name":"Transposing Music","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/transpose-music/template.xml","tests":[{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["78","1"],"output":"79","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["84","-2"],"output":"82","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["36","5"],"output":"41","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["C2","5"],"output":"41","name":"should accept note names (e.g., \"C4\")"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["50","0"],"output":"50","name":"should return original note when transposing by 0"}]},{"name":"Vigenere Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/vigenere/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["how are you?",["1","2","3","4"]],"output":"iqz$bth$zqxC"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["cba",["1","2","3"]],"output":"ddd"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["wow, negative keys?",["-2","-5","-3"]],"output":"ujt*\u001bkcb^rdsc\u001bhctp="},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["what large keys!",["100","200","300"]],"output":"[0\rXh\u0018E:\u0013Ih\u0017IA\u001f\u0005"}]}]}; const [ide] = world.children; class CustomBlockAutograder extends Extension { diff --git a/docs/autograders/minesweeper.js b/docs/autograders/minesweeper.js index c14024c..377be6e 100644 --- a/docs/autograders/minesweeper.js +++ b/docs/autograders/minesweeper.js @@ -2,7 +2,7 @@ ScrollFrameMorph, nop, HandleMorph, List, Extension, ToggleMorph, BlockMorph, Color, SpriteMorph, localize, TextMorph, MorphicPreferences, WHITE*/ (function() { - const config = {"name":"NetsBlox Exercises","assignments":[{"name":"Acronym","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/acronym/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["I Don't Know"],"output":"IDK"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["President Of The United States"],"output":"POTUS"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Shaking My Head"],"output":"SMH"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Agnetha, Bjorn, Benny, Anni-Frid"],"output":"ABBA"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Zone Improvement Plan"],"output":"ZIP"}]},{"name":"Actor's Birthday","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/actor-birthday/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Keanu Reeves"],"output":"1964-09-02"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Meryl Streep"],"output":"1949-06-22"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Denzel Washington"],"output":"1954-12-28"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Lin-Manuel Miranda"],"output":"1980-01-16"}]},{"name":"Anagram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/anagram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["shepherd","spider"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","ccat"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["olive","ilove"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","CAT"],"output":true}]},{"name":"Atbash Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/atbash/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["abc"],"output":"zyx"},{"name":"should preserve letter case","type":"CustomBlockTest","spec":"encrypt %'message'","function":"iterator fnXYZCBA"},{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["$?! +@"],"output":"$?! +@","name":"should preserve non-letters such as punctuation"}]},{"name":"Between","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/between/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[1,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[3,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,3,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[-6,-5,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[20,-5,5],"output":false}]},{"name":"Bigram Autocomplete","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/bigram-autocomplete/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list","function":"fncatcab"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list with 26 rows","function":"fncatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should contain rows that sum to 100","function":"fn100.5rowcatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return correct probabilities","function":"fn5013catcabchechi"}]},{"name":"Caesar Shift","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/caesar-shift/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["abc",2],"output":"cde"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",100],"output":"()*"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",-50],"output":"\u0012\u0013\u0014"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["with spaces",10],"output":"\u0001s~r*}zkmo}"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["no shift!",0],"output":"no shift!"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["negative wrapping!",-200],"output":"&\u001d\u001f\u0019,!.\u001dX/*\u0019((!&\u001fY"}]},{"name":"Compute the Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average/parsons.xml","tests":[]},{"name":"Compute the Average of a List","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average-list/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","1"]],"output":"1"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","2"]],"output":"1.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["-1","2","4","-3"]],"output":"0.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32"]],"output":-7.4},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32","54"]],"output":2.8333333333333335}]},{"name":"Counting Letter Frequency","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","function":"countabcc11200000000000000000000000"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","function":"counta b ! c26"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","function":"countaAbBcCzZ22200000000000000000000002"}]},{"name":"Counting Letter Frequency as Dictionary","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency-dictionary/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","inputs":["abcc"],"output":[["a",1],["b",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","inputs":["a4cc"],"output":[["a",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","inputs":["xyzZ"],"output":[["x",1],["y",1],["z",2]]}]},{"name":"Cracking the Caesar Shift with Brute Force","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-brute-force/parsons.xml","tests":[{"type":"CustomBlockTest","name":"it should find key when starts with a search word","spec":"find key where %'msg' contains %'words'","function":"code breakerhello world2messagemsg
hello2
"},{"name":"it should find key when using multiple search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces15messagemsg
hellowith15
"},{"name":"it should find key when ends with one of many search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces33messagemsg
hellospaces33
"},{"name":"it should return -1 if cannot decode message","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerno hidden words3messagemsg
hellospaces-1
"}]},{"name":"Cracking the Caesar Shift with a Partial Solution","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-partial-soln/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","c"],"output":2},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["A","a"],"output":32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","A"],"output":-32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["5","0"],"output":-5},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":[".","?"],"output":17}]},{"name":"Cyclic Iterator","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/cyclic-iterator/parsons.xml","tests":[{"name":"block should return a function","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1"},{"name":"sequence should start with the first value in the list","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1messagemsg
1
2424
"},{"name":"sequence should remember position","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn797"},{"name":"sequence should restart after reaching the end","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn777"}]},{"name":"Factorial","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/factorial/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[5],"output":120},{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[0],"output":1},{"type":"CustomBlockTest","name":"should compute the factorial of an unknown input","spec":"factorial %'num'","inputs":[7],"output":5040}]},{"name":"FizzBuzz","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/fizz-buzz/template.xml","tests":[{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[1],"output":1},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-39],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[3],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-50],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[5],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-150],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[15],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[0],"output":"fizzbuzz"}]},{"name":"From Infinite Sequences to Finite Lists","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/take-collect-sequences/parsons.xml","tests":[]},{"name":"Greet","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/greet/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"greet %'person'","name":"greet %'person' should start with \"Hello,\"","function":"blockBrian15Hello"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Bob"],"output":"Hello, Bob!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Alice"],"output":"Hello, Alice!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Cliff"],"output":"Hello, Cliff!"}]},{"name":"Intro to Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/intro-infinite-sequences/parsons.xml","tests":[{"name":"sequence should start with 1","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fnmessagemsg
1
"},{"name":"sequence should remember current position","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"},{"name":"sequence should produce counting numbers","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fntrue"},{"name":"two sequences should iterate independently","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"}]},{"name":"Isogram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/isogram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["letter"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["a"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["arraigning"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect first-order isogram","function":"blocksunflower"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect second-order isogram","function":"blockhorseshoer"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect third-order isogram","function":"blockgeggee"}]},{"name":"Leap Year","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/leap-year/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2015],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1970],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1996],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1960],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2100],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1900],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2000],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2400],"output":true}]},{"name":"Luhn Formula","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/luhn-formula/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"single digits cannot be valid","inputs":["8"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid credit card","inputs":["8273 1232 7352 0569"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"text with non digit is invalid","inputs":["059a"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid long number with even remainder","inputs":["1 2345 6789 1234 5678 9012"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with even digits","inputs":["095 245 88"],"output":true},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with odd number of spaces","inputs":["234 567 891 234"],"output":true}]},{"name":"Mapping Over Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/map-sequence/parsons.xml","tests":[{"name":"map should return another sequence","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map2messagemsg
"},{"name":"new sequence should contain transformed values","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map
by threes3i110true
"}]},{"name":"Minesweeper","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/minesweeper/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","*",""],["*","",""],["","*","*"]]],"output":[[2,"*",1],["*",4,3],[2,"*","*"]],"name":"board w/ mine counts on square board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*"],["*",""],["","*"]]],"output":[["*","*"],["*",4],[2,"*"]],"name":"board w/ mine counts on rectangle board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*","*"],["*","","*"],["","*",""]]],"output":[["*","*","*"],["*",6,"*"],[2,"*",2]],"name":"board w/ mine counts on dense board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","","",""],["","","","*"],["","","",""]]],"output":[[0,0,1,1],[0,0,1,"*"],[0,0,1,1]],"name":"board w/ mine counts on sparse board"}]},{"name":"Moving Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/moving-average/parsons.xml","tests":[{"name":"moving average block should return a list","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn1112"},{"name":"moving average should be computed correctly","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn-104176311.666666666666666744.666666666666667"}]},{"name":"Pangram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/pangram/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","inputs":[""],"output":false},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"lowercase pangram","inputs":["abcdefghijklmnopqrstuvwxyz"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"mixed case pangram","inputs":["abcdefghijkLMNOPQRSTUVWXYZ"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"pangram with extra symbols","inputs":["the quick brown fox jumps over a lazy dog!"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"missing a letter","inputs":["abcdefghijkLMNOPQRSTUVWYZ"],"output":false}]},{"name":"Sieve of Eratosthenes","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sieve/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should not consider 1 prime","inputs":[1],"output":[]},{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should find the all primes up to 5","inputs":[5],"output":[2,3,5]},{"type":"CustomBlockTest","name":"should find the all primes up to 30","spec":"factorial %'num'","inputs":[30],"output":[2,3,5,7,11,13,17,19,23,29]}]},{"name":"Sliding Windows","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sliding-windows/template.xml","tests":[]},{"name":"Transposing Music","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/transpose-music/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["78","1"],"output":"79","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["84","-2"],"output":"82","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["36","5"],"output":"41","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["C2","5"],"output":"41","name":"should accept note names (e.g., \"C4\")"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["50","0"],"output":"50","name":"should return original note when transposing by 0"}]},{"name":"Vigenere Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/vigenere/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["how are you?",["1","2","3","4"]],"output":"iqz$bth$zqxC"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["cba",["1","2","3"]],"output":"ddd"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["wow, negative keys?",["-2","-5","-3"]],"output":"ujt*\u001bkcb^rdsc\u001bhctp="},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["what large keys!",["100","200","300"]],"output":"[0\rXh\u0018E:\u0013Ih\u0017IA\u001f\u0005"}]}]}; + const config = {"name":"NetsBlox Exercises","assignments":[{"name":"Acronym","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/acronym/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["I Don't Know"],"output":"IDK"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["President Of The United States"],"output":"POTUS"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Shaking My Head"],"output":"SMH"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Agnetha, Bjorn, Benny, Anni-Frid"],"output":"ABBA"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Zone Improvement Plan"],"output":"ZIP"}]},{"name":"Actor's Birthday","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/actor-birthday/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Keanu Reeves"],"output":"1964-09-02"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Meryl Streep"],"output":"1949-06-22"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Denzel Washington"],"output":"1954-12-28"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Lin-Manuel Miranda"],"output":"1980-01-16"}]},{"name":"Anagram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/anagram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["shepherd","spider"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","ccat"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["olive","ilove"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","CAT"],"output":true}]},{"name":"Atbash Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/atbash/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["abc"],"output":"zyx"},{"name":"should preserve letter case","type":"CustomBlockTest","spec":"encrypt %'message'","function":"iterator fnXYZCBA"},{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["$?! +@"],"output":"$?! +@","name":"should preserve non-letters such as punctuation"}]},{"name":"Between","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/between/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[1,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[3,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,3,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[-6,-5,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[20,-5,5],"output":false}]},{"name":"Bigram Autocomplete","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/bigram-autocomplete/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list","function":"fncatcab"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list with 26 rows","function":"fncatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should contain rows that sum to 100","function":"fn100.5rowcatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return correct probabilities","function":"fn5013catcabchechi"}]},{"name":"Caesar Shift","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/caesar-shift/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["abc",2],"output":"cde"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",100],"output":"()*"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",-50],"output":"\u0012\u0013\u0014"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["with spaces",10],"output":"\u0001s~r*}zkmo}"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["no shift!",0],"output":"no shift!"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["negative wrapping!",-200],"output":"&\u001d\u001f\u0019,!.\u001dX/*\u0019((!&\u001fY"}]},{"name":"Compute the Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average/parsons.xml","tests":[]},{"name":"Compute the Average of a List","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average-list/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","1"]],"output":"1"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","2"]],"output":"1.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["-1","2","4","-3"]],"output":"0.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32"]],"output":-7.4},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32","54"]],"output":2.8333333333333335}]},{"name":"Counting Letter Frequency","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","function":"countabcc11200000000000000000000000"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","function":"counta b ! c26"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","function":"countaAbBcCzZ22200000000000000000000002"}]},{"name":"Counting Letter Frequency as Dictionary","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency-dictionary/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","inputs":["abcc"],"output":[["a",1],["b",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","inputs":["a4cc"],"output":[["a",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","inputs":["xyzZ"],"output":[["x",1],["y",1],["z",2]]}]},{"name":"Cracking the Caesar Shift with Brute Force","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-brute-force/parsons.xml","tests":[{"type":"CustomBlockTest","name":"it should find key when starts with a search word","spec":"find key where %'msg' contains %'words'","function":"code breakerhello world2messagemsg
hello2
"},{"name":"it should find key when using multiple search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces15messagemsg
hellowith15
"},{"name":"it should find key when ends with one of many search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces33messagemsg
hellospaces33
"},{"name":"it should return -1 if cannot decode message","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerno hidden words3messagemsg
hellospaces-1
"}]},{"name":"Cracking the Caesar Shift with a Partial Solution","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-partial-soln/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","c"],"output":2},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["A","a"],"output":32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","A"],"output":-32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["5","0"],"output":-5},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":[".","?"],"output":17}]},{"name":"Cyclic Iterator","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/cyclic-iterator/parsons.xml","tests":[{"name":"block should return a function","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1"},{"name":"sequence should start with the first value in the list","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1messagemsg
1
2424
"},{"name":"sequence should remember position","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn797"},{"name":"sequence should restart after reaching the end","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn777"}]},{"name":"Factorial","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/factorial/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[5],"output":120},{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[0],"output":1},{"type":"CustomBlockTest","name":"should compute the factorial of an unknown input","spec":"factorial %'num'","inputs":[7],"output":5040}]},{"name":"FizzBuzz","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/fizz-buzz/template.xml","tests":[{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[1],"output":1},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-39],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[3],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-50],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[5],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-150],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[15],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[0],"output":"fizzbuzz"}]},{"name":"From Infinite Sequences to Finite Lists","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/take-collect-sequences/parsons.xml","tests":[]},{"name":"Greet","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/greet/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"greet %'person'","name":"greet %'person' should start with \"Hello,\"","function":"blockBrian15Hello"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Bob"],"output":"Hello, Bob!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Alice"],"output":"Hello, Alice!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Cliff"],"output":"Hello, Cliff!"}]},{"name":"Intro to Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/intro-infinite-sequences/parsons.xml","tests":[{"name":"sequence should start with 1","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fnmessagemsg
1
"},{"name":"sequence should remember current position","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"},{"name":"sequence should produce counting numbers","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fntrue"},{"name":"two sequences should iterate independently","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"}]},{"name":"Isogram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/isogram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["letter"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["a"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["arraigning"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect first-order isogram","function":"blocksunflower"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect second-order isogram","function":"blockhorseshoer"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect third-order isogram","function":"blockgeggee"}]},{"name":"Leap Year","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/leap-year/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2015],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1970],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1996],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1960],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2100],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1900],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2000],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2400],"output":true}]},{"name":"Luhn Formula","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/luhn-formula/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"single digits cannot be valid","inputs":["8"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid credit card","inputs":["8273 1232 7352 0569"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"text with non digit is invalid","inputs":["059a"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid long number with even remainder","inputs":["1 2345 6789 1234 5678 9012"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with even digits","inputs":["095 245 88"],"output":true},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with odd number of spaces","inputs":["234 567 891 234"],"output":true}]},{"name":"Mapping Over Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/map-sequence/parsons.xml","tests":[{"name":"map should return another sequence","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map2messagemsg
"},{"name":"new sequence should contain transformed values","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map
by threes3i110true
"}]},{"name":"Minesweeper","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/minesweeper/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","*",""],["*","",""],["","*","*"]]],"output":[[2,"*",1],["*",4,3],[2,"*","*"]],"name":"board w/ mine counts on square board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*"],["*",""],["","*"]]],"output":[["*","*"],["*",4],[2,"*"]],"name":"board w/ mine counts on rectangle board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*","*"],["*","","*"],["","*",""]]],"output":[["*","*","*"],["*",6,"*"],[2,"*",2]],"name":"board w/ mine counts on dense board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","","",""],["","","","*"],["","","",""]]],"output":[[0,0,1,1],[0,0,1,"*"],[0,0,1,1]],"name":"board w/ mine counts on sparse board"}]},{"name":"Moving Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/moving-average/parsons.xml","tests":[{"name":"moving average block should return a list","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn1112"},{"name":"moving average should be computed correctly","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn-104176311.666666666666666744.666666666666667"}]},{"name":"Pangram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/pangram/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","inputs":[""],"output":false},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"lowercase pangram","inputs":["abcdefghijklmnopqrstuvwxyz"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"mixed case pangram","inputs":["abcdefghijkLMNOPQRSTUVWXYZ"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"pangram with extra symbols","inputs":["the quick brown fox jumps over a lazy dog!"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"missing a letter","inputs":["abcdefghijkLMNOPQRSTUVWYZ"],"output":false}]},{"name":"Sieve of Eratosthenes","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sieve/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should not consider 1 prime","inputs":[1],"output":[]},{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should find the all primes up to 5","inputs":[5],"output":[2,3,5]},{"type":"CustomBlockTest","name":"should find the all primes up to 30","spec":"factorial %'num'","inputs":[30],"output":[2,3,5,7,11,13,17,19,23,29]}]},{"name":"Sliding Windows","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sliding-windows/template.xml","tests":[]},{"name":"Transposing Music","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/transpose-music/template.xml","tests":[{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["78","1"],"output":"79","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["84","-2"],"output":"82","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["36","5"],"output":"41","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["C2","5"],"output":"41","name":"should accept note names (e.g., \"C4\")"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["50","0"],"output":"50","name":"should return original note when transposing by 0"}]},{"name":"Vigenere Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/vigenere/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["how are you?",["1","2","3","4"]],"output":"iqz$bth$zqxC"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["cba",["1","2","3"]],"output":"ddd"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["wow, negative keys?",["-2","-5","-3"]],"output":"ujt*\u001bkcb^rdsc\u001bhctp="},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["what large keys!",["100","200","300"]],"output":"[0\rXh\u0018E:\u0013Ih\u0017IA\u001f\u0005"}]}]}; const [ide] = world.children; class CustomBlockAutograder extends Extension { diff --git a/docs/autograders/moving-average.js b/docs/autograders/moving-average.js index f7ce1b5..0f9992f 100644 --- a/docs/autograders/moving-average.js +++ b/docs/autograders/moving-average.js @@ -2,7 +2,7 @@ ScrollFrameMorph, nop, HandleMorph, List, Extension, ToggleMorph, BlockMorph, Color, SpriteMorph, localize, TextMorph, MorphicPreferences, WHITE*/ (function() { - const config = {"name":"NetsBlox Exercises","assignments":[{"name":"Acronym","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/acronym/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["I Don't Know"],"output":"IDK"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["President Of The United States"],"output":"POTUS"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Shaking My Head"],"output":"SMH"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Agnetha, Bjorn, Benny, Anni-Frid"],"output":"ABBA"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Zone Improvement Plan"],"output":"ZIP"}]},{"name":"Actor's Birthday","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/actor-birthday/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Keanu Reeves"],"output":"1964-09-02"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Meryl Streep"],"output":"1949-06-22"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Denzel Washington"],"output":"1954-12-28"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Lin-Manuel Miranda"],"output":"1980-01-16"}]},{"name":"Anagram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/anagram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["shepherd","spider"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","ccat"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["olive","ilove"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","CAT"],"output":true}]},{"name":"Atbash Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/atbash/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["abc"],"output":"zyx"},{"name":"should preserve letter case","type":"CustomBlockTest","spec":"encrypt %'message'","function":"iterator fnXYZCBA"},{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["$?! +@"],"output":"$?! +@","name":"should preserve non-letters such as punctuation"}]},{"name":"Between","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/between/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[1,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[3,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,3,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[-6,-5,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[20,-5,5],"output":false}]},{"name":"Bigram Autocomplete","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/bigram-autocomplete/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list","function":"fncatcab"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list with 26 rows","function":"fncatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should contain rows that sum to 100","function":"fn100.5rowcatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return correct probabilities","function":"fn5013catcabchechi"}]},{"name":"Caesar Shift","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/caesar-shift/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["abc",2],"output":"cde"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",100],"output":"()*"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",-50],"output":"\u0012\u0013\u0014"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["with spaces",10],"output":"\u0001s~r*}zkmo}"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["no shift!",0],"output":"no shift!"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["negative wrapping!",-200],"output":"&\u001d\u001f\u0019,!.\u001dX/*\u0019((!&\u001fY"}]},{"name":"Compute the Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average/parsons.xml","tests":[]},{"name":"Compute the Average of a List","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average-list/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","1"]],"output":"1"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","2"]],"output":"1.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["-1","2","4","-3"]],"output":"0.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32"]],"output":-7.4},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32","54"]],"output":2.8333333333333335}]},{"name":"Counting Letter Frequency","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","function":"countabcc11200000000000000000000000"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","function":"counta b ! c26"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","function":"countaAbBcCzZ22200000000000000000000002"}]},{"name":"Counting Letter Frequency as Dictionary","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency-dictionary/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","inputs":["abcc"],"output":[["a",1],["b",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","inputs":["a4cc"],"output":[["a",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","inputs":["xyzZ"],"output":[["x",1],["y",1],["z",2]]}]},{"name":"Cracking the Caesar Shift with Brute Force","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-brute-force/parsons.xml","tests":[{"type":"CustomBlockTest","name":"it should find key when starts with a search word","spec":"find key where %'msg' contains %'words'","function":"code breakerhello world2messagemsg
hello2
"},{"name":"it should find key when using multiple search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces15messagemsg
hellowith15
"},{"name":"it should find key when ends with one of many search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces33messagemsg
hellospaces33
"},{"name":"it should return -1 if cannot decode message","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerno hidden words3messagemsg
hellospaces-1
"}]},{"name":"Cracking the Caesar Shift with a Partial Solution","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-partial-soln/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","c"],"output":2},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["A","a"],"output":32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","A"],"output":-32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["5","0"],"output":-5},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":[".","?"],"output":17}]},{"name":"Cyclic Iterator","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/cyclic-iterator/parsons.xml","tests":[{"name":"block should return a function","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1"},{"name":"sequence should start with the first value in the list","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1messagemsg
1
2424
"},{"name":"sequence should remember position","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn797"},{"name":"sequence should restart after reaching the end","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn777"}]},{"name":"Factorial","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/factorial/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[5],"output":120},{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[0],"output":1},{"type":"CustomBlockTest","name":"should compute the factorial of an unknown input","spec":"factorial %'num'","inputs":[7],"output":5040}]},{"name":"FizzBuzz","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/fizz-buzz/template.xml","tests":[{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[1],"output":1},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-39],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[3],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-50],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[5],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-150],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[15],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[0],"output":"fizzbuzz"}]},{"name":"From Infinite Sequences to Finite Lists","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/take-collect-sequences/parsons.xml","tests":[]},{"name":"Greet","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/greet/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"greet %'person'","name":"greet %'person' should start with \"Hello,\"","function":"blockBrian15Hello"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Bob"],"output":"Hello, Bob!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Alice"],"output":"Hello, Alice!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Cliff"],"output":"Hello, Cliff!"}]},{"name":"Intro to Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/intro-infinite-sequences/parsons.xml","tests":[{"name":"sequence should start with 1","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fnmessagemsg
1
"},{"name":"sequence should remember current position","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"},{"name":"sequence should produce counting numbers","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fntrue"},{"name":"two sequences should iterate independently","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"}]},{"name":"Isogram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/isogram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["letter"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["a"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["arraigning"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect first-order isogram","function":"blocksunflower"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect second-order isogram","function":"blockhorseshoer"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect third-order isogram","function":"blockgeggee"}]},{"name":"Leap Year","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/leap-year/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2015],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1970],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1996],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1960],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2100],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1900],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2000],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2400],"output":true}]},{"name":"Luhn Formula","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/luhn-formula/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"single digits cannot be valid","inputs":["8"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid credit card","inputs":["8273 1232 7352 0569"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"text with non digit is invalid","inputs":["059a"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid long number with even remainder","inputs":["1 2345 6789 1234 5678 9012"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with even digits","inputs":["095 245 88"],"output":true},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with odd number of spaces","inputs":["234 567 891 234"],"output":true}]},{"name":"Mapping Over Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/map-sequence/parsons.xml","tests":[{"name":"map should return another sequence","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map2messagemsg
"},{"name":"new sequence should contain transformed values","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map
by threes3i110true
"}]},{"name":"Minesweeper","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/minesweeper/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","*",""],["*","",""],["","*","*"]]],"output":[[2,"*",1],["*",4,3],[2,"*","*"]],"name":"board w/ mine counts on square board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*"],["*",""],["","*"]]],"output":[["*","*"],["*",4],[2,"*"]],"name":"board w/ mine counts on rectangle board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*","*"],["*","","*"],["","*",""]]],"output":[["*","*","*"],["*",6,"*"],[2,"*",2]],"name":"board w/ mine counts on dense board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","","",""],["","","","*"],["","","",""]]],"output":[[0,0,1,1],[0,0,1,"*"],[0,0,1,1]],"name":"board w/ mine counts on sparse board"}]},{"name":"Moving Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/moving-average/parsons.xml","tests":[{"name":"moving average block should return a list","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn1112"},{"name":"moving average should be computed correctly","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn-104176311.666666666666666744.666666666666667"}]},{"name":"Pangram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/pangram/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","inputs":[""],"output":false},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"lowercase pangram","inputs":["abcdefghijklmnopqrstuvwxyz"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"mixed case pangram","inputs":["abcdefghijkLMNOPQRSTUVWXYZ"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"pangram with extra symbols","inputs":["the quick brown fox jumps over a lazy dog!"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"missing a letter","inputs":["abcdefghijkLMNOPQRSTUVWYZ"],"output":false}]},{"name":"Sieve of Eratosthenes","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sieve/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should not consider 1 prime","inputs":[1],"output":[]},{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should find the all primes up to 5","inputs":[5],"output":[2,3,5]},{"type":"CustomBlockTest","name":"should find the all primes up to 30","spec":"factorial %'num'","inputs":[30],"output":[2,3,5,7,11,13,17,19,23,29]}]},{"name":"Sliding Windows","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sliding-windows/template.xml","tests":[]},{"name":"Transposing Music","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/transpose-music/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["78","1"],"output":"79","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["84","-2"],"output":"82","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["36","5"],"output":"41","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["C2","5"],"output":"41","name":"should accept note names (e.g., \"C4\")"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["50","0"],"output":"50","name":"should return original note when transposing by 0"}]},{"name":"Vigenere Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/vigenere/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["how are you?",["1","2","3","4"]],"output":"iqz$bth$zqxC"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["cba",["1","2","3"]],"output":"ddd"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["wow, negative keys?",["-2","-5","-3"]],"output":"ujt*\u001bkcb^rdsc\u001bhctp="},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["what large keys!",["100","200","300"]],"output":"[0\rXh\u0018E:\u0013Ih\u0017IA\u001f\u0005"}]}]}; + const config = {"name":"NetsBlox Exercises","assignments":[{"name":"Acronym","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/acronym/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["I Don't Know"],"output":"IDK"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["President Of The United States"],"output":"POTUS"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Shaking My Head"],"output":"SMH"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Agnetha, Bjorn, Benny, Anni-Frid"],"output":"ABBA"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Zone Improvement Plan"],"output":"ZIP"}]},{"name":"Actor's Birthday","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/actor-birthday/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Keanu Reeves"],"output":"1964-09-02"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Meryl Streep"],"output":"1949-06-22"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Denzel Washington"],"output":"1954-12-28"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Lin-Manuel Miranda"],"output":"1980-01-16"}]},{"name":"Anagram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/anagram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["shepherd","spider"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","ccat"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["olive","ilove"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","CAT"],"output":true}]},{"name":"Atbash Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/atbash/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["abc"],"output":"zyx"},{"name":"should preserve letter case","type":"CustomBlockTest","spec":"encrypt %'message'","function":"iterator fnXYZCBA"},{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["$?! +@"],"output":"$?! +@","name":"should preserve non-letters such as punctuation"}]},{"name":"Between","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/between/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[1,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[3,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,3,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[-6,-5,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[20,-5,5],"output":false}]},{"name":"Bigram Autocomplete","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/bigram-autocomplete/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list","function":"fncatcab"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list with 26 rows","function":"fncatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should contain rows that sum to 100","function":"fn100.5rowcatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return correct probabilities","function":"fn5013catcabchechi"}]},{"name":"Caesar Shift","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/caesar-shift/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["abc",2],"output":"cde"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",100],"output":"()*"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",-50],"output":"\u0012\u0013\u0014"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["with spaces",10],"output":"\u0001s~r*}zkmo}"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["no shift!",0],"output":"no shift!"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["negative wrapping!",-200],"output":"&\u001d\u001f\u0019,!.\u001dX/*\u0019((!&\u001fY"}]},{"name":"Compute the Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average/parsons.xml","tests":[]},{"name":"Compute the Average of a List","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average-list/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","1"]],"output":"1"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","2"]],"output":"1.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["-1","2","4","-3"]],"output":"0.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32"]],"output":-7.4},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32","54"]],"output":2.8333333333333335}]},{"name":"Counting Letter Frequency","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","function":"countabcc11200000000000000000000000"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","function":"counta b ! c26"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","function":"countaAbBcCzZ22200000000000000000000002"}]},{"name":"Counting Letter Frequency as Dictionary","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency-dictionary/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","inputs":["abcc"],"output":[["a",1],["b",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","inputs":["a4cc"],"output":[["a",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","inputs":["xyzZ"],"output":[["x",1],["y",1],["z",2]]}]},{"name":"Cracking the Caesar Shift with Brute Force","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-brute-force/parsons.xml","tests":[{"type":"CustomBlockTest","name":"it should find key when starts with a search word","spec":"find key where %'msg' contains %'words'","function":"code breakerhello world2messagemsg
hello2
"},{"name":"it should find key when using multiple search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces15messagemsg
hellowith15
"},{"name":"it should find key when ends with one of many search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces33messagemsg
hellospaces33
"},{"name":"it should return -1 if cannot decode message","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerno hidden words3messagemsg
hellospaces-1
"}]},{"name":"Cracking the Caesar Shift with a Partial Solution","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-partial-soln/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","c"],"output":2},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["A","a"],"output":32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","A"],"output":-32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["5","0"],"output":-5},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":[".","?"],"output":17}]},{"name":"Cyclic Iterator","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/cyclic-iterator/parsons.xml","tests":[{"name":"block should return a function","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1"},{"name":"sequence should start with the first value in the list","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1messagemsg
1
2424
"},{"name":"sequence should remember position","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn797"},{"name":"sequence should restart after reaching the end","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn777"}]},{"name":"Factorial","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/factorial/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[5],"output":120},{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[0],"output":1},{"type":"CustomBlockTest","name":"should compute the factorial of an unknown input","spec":"factorial %'num'","inputs":[7],"output":5040}]},{"name":"FizzBuzz","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/fizz-buzz/template.xml","tests":[{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[1],"output":1},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-39],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[3],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-50],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[5],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-150],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[15],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[0],"output":"fizzbuzz"}]},{"name":"From Infinite Sequences to Finite Lists","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/take-collect-sequences/parsons.xml","tests":[]},{"name":"Greet","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/greet/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"greet %'person'","name":"greet %'person' should start with \"Hello,\"","function":"blockBrian15Hello"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Bob"],"output":"Hello, Bob!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Alice"],"output":"Hello, Alice!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Cliff"],"output":"Hello, Cliff!"}]},{"name":"Intro to Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/intro-infinite-sequences/parsons.xml","tests":[{"name":"sequence should start with 1","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fnmessagemsg
1
"},{"name":"sequence should remember current position","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"},{"name":"sequence should produce counting numbers","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fntrue"},{"name":"two sequences should iterate independently","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"}]},{"name":"Isogram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/isogram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["letter"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["a"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["arraigning"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect first-order isogram","function":"blocksunflower"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect second-order isogram","function":"blockhorseshoer"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect third-order isogram","function":"blockgeggee"}]},{"name":"Leap Year","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/leap-year/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2015],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1970],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1996],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1960],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2100],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1900],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2000],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2400],"output":true}]},{"name":"Luhn Formula","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/luhn-formula/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"single digits cannot be valid","inputs":["8"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid credit card","inputs":["8273 1232 7352 0569"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"text with non digit is invalid","inputs":["059a"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid long number with even remainder","inputs":["1 2345 6789 1234 5678 9012"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with even digits","inputs":["095 245 88"],"output":true},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with odd number of spaces","inputs":["234 567 891 234"],"output":true}]},{"name":"Mapping Over Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/map-sequence/parsons.xml","tests":[{"name":"map should return another sequence","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map2messagemsg
"},{"name":"new sequence should contain transformed values","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map
by threes3i110true
"}]},{"name":"Minesweeper","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/minesweeper/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","*",""],["*","",""],["","*","*"]]],"output":[[2,"*",1],["*",4,3],[2,"*","*"]],"name":"board w/ mine counts on square board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*"],["*",""],["","*"]]],"output":[["*","*"],["*",4],[2,"*"]],"name":"board w/ mine counts on rectangle board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*","*"],["*","","*"],["","*",""]]],"output":[["*","*","*"],["*",6,"*"],[2,"*",2]],"name":"board w/ mine counts on dense board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","","",""],["","","","*"],["","","",""]]],"output":[[0,0,1,1],[0,0,1,"*"],[0,0,1,1]],"name":"board w/ mine counts on sparse board"}]},{"name":"Moving Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/moving-average/parsons.xml","tests":[{"name":"moving average block should return a list","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn1112"},{"name":"moving average should be computed correctly","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn-104176311.666666666666666744.666666666666667"}]},{"name":"Pangram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/pangram/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","inputs":[""],"output":false},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"lowercase pangram","inputs":["abcdefghijklmnopqrstuvwxyz"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"mixed case pangram","inputs":["abcdefghijkLMNOPQRSTUVWXYZ"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"pangram with extra symbols","inputs":["the quick brown fox jumps over a lazy dog!"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"missing a letter","inputs":["abcdefghijkLMNOPQRSTUVWYZ"],"output":false}]},{"name":"Sieve of Eratosthenes","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sieve/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should not consider 1 prime","inputs":[1],"output":[]},{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should find the all primes up to 5","inputs":[5],"output":[2,3,5]},{"type":"CustomBlockTest","name":"should find the all primes up to 30","spec":"factorial %'num'","inputs":[30],"output":[2,3,5,7,11,13,17,19,23,29]}]},{"name":"Sliding Windows","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sliding-windows/template.xml","tests":[]},{"name":"Transposing Music","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/transpose-music/template.xml","tests":[{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["78","1"],"output":"79","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["84","-2"],"output":"82","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["36","5"],"output":"41","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["C2","5"],"output":"41","name":"should accept note names (e.g., \"C4\")"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["50","0"],"output":"50","name":"should return original note when transposing by 0"}]},{"name":"Vigenere Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/vigenere/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["how are you?",["1","2","3","4"]],"output":"iqz$bth$zqxC"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["cba",["1","2","3"]],"output":"ddd"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["wow, negative keys?",["-2","-5","-3"]],"output":"ujt*\u001bkcb^rdsc\u001bhctp="},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["what large keys!",["100","200","300"]],"output":"[0\rXh\u0018E:\u0013Ih\u0017IA\u001f\u0005"}]}]}; const [ide] = world.children; class CustomBlockAutograder extends Extension { diff --git a/docs/autograders/pangram.js b/docs/autograders/pangram.js index 50d69a2..3ce5ce6 100644 --- a/docs/autograders/pangram.js +++ b/docs/autograders/pangram.js @@ -2,7 +2,7 @@ ScrollFrameMorph, nop, HandleMorph, List, Extension, ToggleMorph, BlockMorph, Color, SpriteMorph, localize, TextMorph, MorphicPreferences, WHITE*/ (function() { - const config = {"name":"NetsBlox Exercises","assignments":[{"name":"Acronym","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/acronym/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["I Don't Know"],"output":"IDK"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["President Of The United States"],"output":"POTUS"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Shaking My Head"],"output":"SMH"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Agnetha, Bjorn, Benny, Anni-Frid"],"output":"ABBA"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Zone Improvement Plan"],"output":"ZIP"}]},{"name":"Actor's Birthday","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/actor-birthday/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Keanu Reeves"],"output":"1964-09-02"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Meryl Streep"],"output":"1949-06-22"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Denzel Washington"],"output":"1954-12-28"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Lin-Manuel Miranda"],"output":"1980-01-16"}]},{"name":"Anagram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/anagram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["shepherd","spider"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","ccat"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["olive","ilove"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","CAT"],"output":true}]},{"name":"Atbash Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/atbash/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["abc"],"output":"zyx"},{"name":"should preserve letter case","type":"CustomBlockTest","spec":"encrypt %'message'","function":"iterator fnXYZCBA"},{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["$?! +@"],"output":"$?! +@","name":"should preserve non-letters such as punctuation"}]},{"name":"Between","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/between/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[1,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[3,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,3,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[-6,-5,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[20,-5,5],"output":false}]},{"name":"Bigram Autocomplete","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/bigram-autocomplete/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list","function":"fncatcab"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list with 26 rows","function":"fncatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should contain rows that sum to 100","function":"fn100.5rowcatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return correct probabilities","function":"fn5013catcabchechi"}]},{"name":"Caesar Shift","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/caesar-shift/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["abc",2],"output":"cde"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",100],"output":"()*"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",-50],"output":"\u0012\u0013\u0014"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["with spaces",10],"output":"\u0001s~r*}zkmo}"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["no shift!",0],"output":"no shift!"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["negative wrapping!",-200],"output":"&\u001d\u001f\u0019,!.\u001dX/*\u0019((!&\u001fY"}]},{"name":"Compute the Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average/parsons.xml","tests":[]},{"name":"Compute the Average of a List","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average-list/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","1"]],"output":"1"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","2"]],"output":"1.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["-1","2","4","-3"]],"output":"0.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32"]],"output":-7.4},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32","54"]],"output":2.8333333333333335}]},{"name":"Counting Letter Frequency","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","function":"countabcc11200000000000000000000000"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","function":"counta b ! c26"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","function":"countaAbBcCzZ22200000000000000000000002"}]},{"name":"Counting Letter Frequency as Dictionary","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency-dictionary/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","inputs":["abcc"],"output":[["a",1],["b",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","inputs":["a4cc"],"output":[["a",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","inputs":["xyzZ"],"output":[["x",1],["y",1],["z",2]]}]},{"name":"Cracking the Caesar Shift with Brute Force","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-brute-force/parsons.xml","tests":[{"type":"CustomBlockTest","name":"it should find key when starts with a search word","spec":"find key where %'msg' contains %'words'","function":"code breakerhello world2messagemsg
hello2
"},{"name":"it should find key when using multiple search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces15messagemsg
hellowith15
"},{"name":"it should find key when ends with one of many search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces33messagemsg
hellospaces33
"},{"name":"it should return -1 if cannot decode message","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerno hidden words3messagemsg
hellospaces-1
"}]},{"name":"Cracking the Caesar Shift with a Partial Solution","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-partial-soln/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","c"],"output":2},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["A","a"],"output":32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","A"],"output":-32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["5","0"],"output":-5},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":[".","?"],"output":17}]},{"name":"Cyclic Iterator","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/cyclic-iterator/parsons.xml","tests":[{"name":"block should return a function","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1"},{"name":"sequence should start with the first value in the list","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1messagemsg
1
2424
"},{"name":"sequence should remember position","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn797"},{"name":"sequence should restart after reaching the end","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn777"}]},{"name":"Factorial","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/factorial/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[5],"output":120},{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[0],"output":1},{"type":"CustomBlockTest","name":"should compute the factorial of an unknown input","spec":"factorial %'num'","inputs":[7],"output":5040}]},{"name":"FizzBuzz","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/fizz-buzz/template.xml","tests":[{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[1],"output":1},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-39],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[3],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-50],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[5],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-150],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[15],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[0],"output":"fizzbuzz"}]},{"name":"From Infinite Sequences to Finite Lists","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/take-collect-sequences/parsons.xml","tests":[]},{"name":"Greet","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/greet/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"greet %'person'","name":"greet %'person' should start with \"Hello,\"","function":"blockBrian15Hello"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Bob"],"output":"Hello, Bob!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Alice"],"output":"Hello, Alice!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Cliff"],"output":"Hello, Cliff!"}]},{"name":"Intro to Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/intro-infinite-sequences/parsons.xml","tests":[{"name":"sequence should start with 1","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fnmessagemsg
1
"},{"name":"sequence should remember current position","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"},{"name":"sequence should produce counting numbers","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fntrue"},{"name":"two sequences should iterate independently","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"}]},{"name":"Isogram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/isogram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["letter"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["a"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["arraigning"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect first-order isogram","function":"blocksunflower"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect second-order isogram","function":"blockhorseshoer"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect third-order isogram","function":"blockgeggee"}]},{"name":"Leap Year","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/leap-year/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2015],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1970],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1996],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1960],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2100],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1900],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2000],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2400],"output":true}]},{"name":"Luhn Formula","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/luhn-formula/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"single digits cannot be valid","inputs":["8"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid credit card","inputs":["8273 1232 7352 0569"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"text with non digit is invalid","inputs":["059a"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid long number with even remainder","inputs":["1 2345 6789 1234 5678 9012"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with even digits","inputs":["095 245 88"],"output":true},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with odd number of spaces","inputs":["234 567 891 234"],"output":true}]},{"name":"Mapping Over Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/map-sequence/parsons.xml","tests":[{"name":"map should return another sequence","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map2messagemsg
"},{"name":"new sequence should contain transformed values","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map
by threes3i110true
"}]},{"name":"Minesweeper","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/minesweeper/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","*",""],["*","",""],["","*","*"]]],"output":[[2,"*",1],["*",4,3],[2,"*","*"]],"name":"board w/ mine counts on square board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*"],["*",""],["","*"]]],"output":[["*","*"],["*",4],[2,"*"]],"name":"board w/ mine counts on rectangle board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*","*"],["*","","*"],["","*",""]]],"output":[["*","*","*"],["*",6,"*"],[2,"*",2]],"name":"board w/ mine counts on dense board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","","",""],["","","","*"],["","","",""]]],"output":[[0,0,1,1],[0,0,1,"*"],[0,0,1,1]],"name":"board w/ mine counts on sparse board"}]},{"name":"Moving Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/moving-average/parsons.xml","tests":[{"name":"moving average block should return a list","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn1112"},{"name":"moving average should be computed correctly","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn-104176311.666666666666666744.666666666666667"}]},{"name":"Pangram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/pangram/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","inputs":[""],"output":false},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"lowercase pangram","inputs":["abcdefghijklmnopqrstuvwxyz"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"mixed case pangram","inputs":["abcdefghijkLMNOPQRSTUVWXYZ"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"pangram with extra symbols","inputs":["the quick brown fox jumps over a lazy dog!"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"missing a letter","inputs":["abcdefghijkLMNOPQRSTUVWYZ"],"output":false}]},{"name":"Sieve of Eratosthenes","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sieve/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should not consider 1 prime","inputs":[1],"output":[]},{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should find the all primes up to 5","inputs":[5],"output":[2,3,5]},{"type":"CustomBlockTest","name":"should find the all primes up to 30","spec":"factorial %'num'","inputs":[30],"output":[2,3,5,7,11,13,17,19,23,29]}]},{"name":"Sliding Windows","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sliding-windows/template.xml","tests":[]},{"name":"Transposing Music","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/transpose-music/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["78","1"],"output":"79","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["84","-2"],"output":"82","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["36","5"],"output":"41","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["C2","5"],"output":"41","name":"should accept note names (e.g., \"C4\")"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["50","0"],"output":"50","name":"should return original note when transposing by 0"}]},{"name":"Vigenere Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/vigenere/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["how are you?",["1","2","3","4"]],"output":"iqz$bth$zqxC"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["cba",["1","2","3"]],"output":"ddd"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["wow, negative keys?",["-2","-5","-3"]],"output":"ujt*\u001bkcb^rdsc\u001bhctp="},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["what large keys!",["100","200","300"]],"output":"[0\rXh\u0018E:\u0013Ih\u0017IA\u001f\u0005"}]}]}; + const config = {"name":"NetsBlox Exercises","assignments":[{"name":"Acronym","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/acronym/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["I Don't Know"],"output":"IDK"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["President Of The United States"],"output":"POTUS"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Shaking My Head"],"output":"SMH"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Agnetha, Bjorn, Benny, Anni-Frid"],"output":"ABBA"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Zone Improvement Plan"],"output":"ZIP"}]},{"name":"Actor's Birthday","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/actor-birthday/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Keanu Reeves"],"output":"1964-09-02"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Meryl Streep"],"output":"1949-06-22"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Denzel Washington"],"output":"1954-12-28"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Lin-Manuel Miranda"],"output":"1980-01-16"}]},{"name":"Anagram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/anagram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["shepherd","spider"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","ccat"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["olive","ilove"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","CAT"],"output":true}]},{"name":"Atbash Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/atbash/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["abc"],"output":"zyx"},{"name":"should preserve letter case","type":"CustomBlockTest","spec":"encrypt %'message'","function":"iterator fnXYZCBA"},{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["$?! +@"],"output":"$?! +@","name":"should preserve non-letters such as punctuation"}]},{"name":"Between","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/between/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[1,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[3,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,3,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[-6,-5,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[20,-5,5],"output":false}]},{"name":"Bigram Autocomplete","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/bigram-autocomplete/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list","function":"fncatcab"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list with 26 rows","function":"fncatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should contain rows that sum to 100","function":"fn100.5rowcatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return correct probabilities","function":"fn5013catcabchechi"}]},{"name":"Caesar Shift","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/caesar-shift/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["abc",2],"output":"cde"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",100],"output":"()*"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",-50],"output":"\u0012\u0013\u0014"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["with spaces",10],"output":"\u0001s~r*}zkmo}"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["no shift!",0],"output":"no shift!"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["negative wrapping!",-200],"output":"&\u001d\u001f\u0019,!.\u001dX/*\u0019((!&\u001fY"}]},{"name":"Compute the Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average/parsons.xml","tests":[]},{"name":"Compute the Average of a List","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average-list/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","1"]],"output":"1"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","2"]],"output":"1.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["-1","2","4","-3"]],"output":"0.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32"]],"output":-7.4},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32","54"]],"output":2.8333333333333335}]},{"name":"Counting Letter Frequency","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","function":"countabcc11200000000000000000000000"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","function":"counta b ! c26"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","function":"countaAbBcCzZ22200000000000000000000002"}]},{"name":"Counting Letter Frequency as Dictionary","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency-dictionary/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","inputs":["abcc"],"output":[["a",1],["b",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","inputs":["a4cc"],"output":[["a",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","inputs":["xyzZ"],"output":[["x",1],["y",1],["z",2]]}]},{"name":"Cracking the Caesar Shift with Brute Force","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-brute-force/parsons.xml","tests":[{"type":"CustomBlockTest","name":"it should find key when starts with a search word","spec":"find key where %'msg' contains %'words'","function":"code breakerhello world2messagemsg
hello2
"},{"name":"it should find key when using multiple search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces15messagemsg
hellowith15
"},{"name":"it should find key when ends with one of many search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces33messagemsg
hellospaces33
"},{"name":"it should return -1 if cannot decode message","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerno hidden words3messagemsg
hellospaces-1
"}]},{"name":"Cracking the Caesar Shift with a Partial Solution","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-partial-soln/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","c"],"output":2},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["A","a"],"output":32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","A"],"output":-32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["5","0"],"output":-5},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":[".","?"],"output":17}]},{"name":"Cyclic Iterator","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/cyclic-iterator/parsons.xml","tests":[{"name":"block should return a function","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1"},{"name":"sequence should start with the first value in the list","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1messagemsg
1
2424
"},{"name":"sequence should remember position","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn797"},{"name":"sequence should restart after reaching the end","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn777"}]},{"name":"Factorial","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/factorial/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[5],"output":120},{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[0],"output":1},{"type":"CustomBlockTest","name":"should compute the factorial of an unknown input","spec":"factorial %'num'","inputs":[7],"output":5040}]},{"name":"FizzBuzz","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/fizz-buzz/template.xml","tests":[{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[1],"output":1},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-39],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[3],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-50],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[5],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-150],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[15],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[0],"output":"fizzbuzz"}]},{"name":"From Infinite Sequences to Finite Lists","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/take-collect-sequences/parsons.xml","tests":[]},{"name":"Greet","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/greet/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"greet %'person'","name":"greet %'person' should start with \"Hello,\"","function":"blockBrian15Hello"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Bob"],"output":"Hello, Bob!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Alice"],"output":"Hello, Alice!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Cliff"],"output":"Hello, Cliff!"}]},{"name":"Intro to Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/intro-infinite-sequences/parsons.xml","tests":[{"name":"sequence should start with 1","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fnmessagemsg
1
"},{"name":"sequence should remember current position","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"},{"name":"sequence should produce counting numbers","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fntrue"},{"name":"two sequences should iterate independently","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"}]},{"name":"Isogram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/isogram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["letter"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["a"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["arraigning"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect first-order isogram","function":"blocksunflower"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect second-order isogram","function":"blockhorseshoer"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect third-order isogram","function":"blockgeggee"}]},{"name":"Leap Year","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/leap-year/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2015],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1970],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1996],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1960],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2100],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1900],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2000],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2400],"output":true}]},{"name":"Luhn Formula","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/luhn-formula/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"single digits cannot be valid","inputs":["8"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid credit card","inputs":["8273 1232 7352 0569"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"text with non digit is invalid","inputs":["059a"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid long number with even remainder","inputs":["1 2345 6789 1234 5678 9012"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with even digits","inputs":["095 245 88"],"output":true},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with odd number of spaces","inputs":["234 567 891 234"],"output":true}]},{"name":"Mapping Over Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/map-sequence/parsons.xml","tests":[{"name":"map should return another sequence","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map2messagemsg
"},{"name":"new sequence should contain transformed values","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map
by threes3i110true
"}]},{"name":"Minesweeper","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/minesweeper/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","*",""],["*","",""],["","*","*"]]],"output":[[2,"*",1],["*",4,3],[2,"*","*"]],"name":"board w/ mine counts on square board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*"],["*",""],["","*"]]],"output":[["*","*"],["*",4],[2,"*"]],"name":"board w/ mine counts on rectangle board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*","*"],["*","","*"],["","*",""]]],"output":[["*","*","*"],["*",6,"*"],[2,"*",2]],"name":"board w/ mine counts on dense board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","","",""],["","","","*"],["","","",""]]],"output":[[0,0,1,1],[0,0,1,"*"],[0,0,1,1]],"name":"board w/ mine counts on sparse board"}]},{"name":"Moving Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/moving-average/parsons.xml","tests":[{"name":"moving average block should return a list","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn1112"},{"name":"moving average should be computed correctly","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn-104176311.666666666666666744.666666666666667"}]},{"name":"Pangram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/pangram/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","inputs":[""],"output":false},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"lowercase pangram","inputs":["abcdefghijklmnopqrstuvwxyz"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"mixed case pangram","inputs":["abcdefghijkLMNOPQRSTUVWXYZ"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"pangram with extra symbols","inputs":["the quick brown fox jumps over a lazy dog!"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"missing a letter","inputs":["abcdefghijkLMNOPQRSTUVWYZ"],"output":false}]},{"name":"Sieve of Eratosthenes","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sieve/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should not consider 1 prime","inputs":[1],"output":[]},{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should find the all primes up to 5","inputs":[5],"output":[2,3,5]},{"type":"CustomBlockTest","name":"should find the all primes up to 30","spec":"factorial %'num'","inputs":[30],"output":[2,3,5,7,11,13,17,19,23,29]}]},{"name":"Sliding Windows","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sliding-windows/template.xml","tests":[]},{"name":"Transposing Music","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/transpose-music/template.xml","tests":[{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["78","1"],"output":"79","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["84","-2"],"output":"82","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["36","5"],"output":"41","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["C2","5"],"output":"41","name":"should accept note names (e.g., \"C4\")"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["50","0"],"output":"50","name":"should return original note when transposing by 0"}]},{"name":"Vigenere Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/vigenere/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["how are you?",["1","2","3","4"]],"output":"iqz$bth$zqxC"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["cba",["1","2","3"]],"output":"ddd"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["wow, negative keys?",["-2","-5","-3"]],"output":"ujt*\u001bkcb^rdsc\u001bhctp="},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["what large keys!",["100","200","300"]],"output":"[0\rXh\u0018E:\u0013Ih\u0017IA\u001f\u0005"}]}]}; const [ide] = world.children; class CustomBlockAutograder extends Extension { diff --git a/docs/autograders/sieve.js b/docs/autograders/sieve.js index 78ff46a..1ead321 100644 --- a/docs/autograders/sieve.js +++ b/docs/autograders/sieve.js @@ -2,7 +2,7 @@ ScrollFrameMorph, nop, HandleMorph, List, Extension, ToggleMorph, BlockMorph, Color, SpriteMorph, localize, TextMorph, MorphicPreferences, WHITE*/ (function() { - const config = {"name":"NetsBlox Exercises","assignments":[{"name":"Acronym","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/acronym/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["I Don't Know"],"output":"IDK"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["President Of The United States"],"output":"POTUS"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Shaking My Head"],"output":"SMH"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Agnetha, Bjorn, Benny, Anni-Frid"],"output":"ABBA"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Zone Improvement Plan"],"output":"ZIP"}]},{"name":"Actor's Birthday","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/actor-birthday/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Keanu Reeves"],"output":"1964-09-02"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Meryl Streep"],"output":"1949-06-22"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Denzel Washington"],"output":"1954-12-28"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Lin-Manuel Miranda"],"output":"1980-01-16"}]},{"name":"Anagram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/anagram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["shepherd","spider"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","ccat"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["olive","ilove"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","CAT"],"output":true}]},{"name":"Atbash Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/atbash/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["abc"],"output":"zyx"},{"name":"should preserve letter case","type":"CustomBlockTest","spec":"encrypt %'message'","function":"iterator fnXYZCBA"},{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["$?! +@"],"output":"$?! +@","name":"should preserve non-letters such as punctuation"}]},{"name":"Between","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/between/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[1,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[3,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,3,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[-6,-5,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[20,-5,5],"output":false}]},{"name":"Bigram Autocomplete","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/bigram-autocomplete/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list","function":"fncatcab"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list with 26 rows","function":"fncatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should contain rows that sum to 100","function":"fn100.5rowcatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return correct probabilities","function":"fn5013catcabchechi"}]},{"name":"Caesar Shift","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/caesar-shift/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["abc",2],"output":"cde"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",100],"output":"()*"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",-50],"output":"\u0012\u0013\u0014"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["with spaces",10],"output":"\u0001s~r*}zkmo}"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["no shift!",0],"output":"no shift!"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["negative wrapping!",-200],"output":"&\u001d\u001f\u0019,!.\u001dX/*\u0019((!&\u001fY"}]},{"name":"Compute the Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average/parsons.xml","tests":[]},{"name":"Compute the Average of a List","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average-list/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","1"]],"output":"1"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","2"]],"output":"1.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["-1","2","4","-3"]],"output":"0.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32"]],"output":-7.4},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32","54"]],"output":2.8333333333333335}]},{"name":"Counting Letter Frequency","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","function":"countabcc11200000000000000000000000"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","function":"counta b ! c26"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","function":"countaAbBcCzZ22200000000000000000000002"}]},{"name":"Counting Letter Frequency as Dictionary","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency-dictionary/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","inputs":["abcc"],"output":[["a",1],["b",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","inputs":["a4cc"],"output":[["a",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","inputs":["xyzZ"],"output":[["x",1],["y",1],["z",2]]}]},{"name":"Cracking the Caesar Shift with Brute Force","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-brute-force/parsons.xml","tests":[{"type":"CustomBlockTest","name":"it should find key when starts with a search word","spec":"find key where %'msg' contains %'words'","function":"code breakerhello world2messagemsg
hello2
"},{"name":"it should find key when using multiple search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces15messagemsg
hellowith15
"},{"name":"it should find key when ends with one of many search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces33messagemsg
hellospaces33
"},{"name":"it should return -1 if cannot decode message","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerno hidden words3messagemsg
hellospaces-1
"}]},{"name":"Cracking the Caesar Shift with a Partial Solution","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-partial-soln/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","c"],"output":2},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["A","a"],"output":32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","A"],"output":-32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["5","0"],"output":-5},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":[".","?"],"output":17}]},{"name":"Cyclic Iterator","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/cyclic-iterator/parsons.xml","tests":[{"name":"block should return a function","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1"},{"name":"sequence should start with the first value in the list","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1messagemsg
1
2424
"},{"name":"sequence should remember position","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn797"},{"name":"sequence should restart after reaching the end","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn777"}]},{"name":"Factorial","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/factorial/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[5],"output":120},{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[0],"output":1},{"type":"CustomBlockTest","name":"should compute the factorial of an unknown input","spec":"factorial %'num'","inputs":[7],"output":5040}]},{"name":"FizzBuzz","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/fizz-buzz/template.xml","tests":[{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[1],"output":1},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-39],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[3],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-50],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[5],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-150],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[15],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[0],"output":"fizzbuzz"}]},{"name":"From Infinite Sequences to Finite Lists","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/take-collect-sequences/parsons.xml","tests":[]},{"name":"Greet","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/greet/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"greet %'person'","name":"greet %'person' should start with \"Hello,\"","function":"blockBrian15Hello"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Bob"],"output":"Hello, Bob!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Alice"],"output":"Hello, Alice!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Cliff"],"output":"Hello, Cliff!"}]},{"name":"Intro to Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/intro-infinite-sequences/parsons.xml","tests":[{"name":"sequence should start with 1","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fnmessagemsg
1
"},{"name":"sequence should remember current position","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"},{"name":"sequence should produce counting numbers","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fntrue"},{"name":"two sequences should iterate independently","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"}]},{"name":"Isogram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/isogram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["letter"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["a"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["arraigning"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect first-order isogram","function":"blocksunflower"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect second-order isogram","function":"blockhorseshoer"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect third-order isogram","function":"blockgeggee"}]},{"name":"Leap Year","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/leap-year/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2015],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1970],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1996],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1960],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2100],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1900],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2000],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2400],"output":true}]},{"name":"Luhn Formula","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/luhn-formula/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"single digits cannot be valid","inputs":["8"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid credit card","inputs":["8273 1232 7352 0569"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"text with non digit is invalid","inputs":["059a"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid long number with even remainder","inputs":["1 2345 6789 1234 5678 9012"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with even digits","inputs":["095 245 88"],"output":true},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with odd number of spaces","inputs":["234 567 891 234"],"output":true}]},{"name":"Mapping Over Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/map-sequence/parsons.xml","tests":[{"name":"map should return another sequence","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map2messagemsg
"},{"name":"new sequence should contain transformed values","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map
by threes3i110true
"}]},{"name":"Minesweeper","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/minesweeper/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","*",""],["*","",""],["","*","*"]]],"output":[[2,"*",1],["*",4,3],[2,"*","*"]],"name":"board w/ mine counts on square board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*"],["*",""],["","*"]]],"output":[["*","*"],["*",4],[2,"*"]],"name":"board w/ mine counts on rectangle board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*","*"],["*","","*"],["","*",""]]],"output":[["*","*","*"],["*",6,"*"],[2,"*",2]],"name":"board w/ mine counts on dense board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","","",""],["","","","*"],["","","",""]]],"output":[[0,0,1,1],[0,0,1,"*"],[0,0,1,1]],"name":"board w/ mine counts on sparse board"}]},{"name":"Moving Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/moving-average/parsons.xml","tests":[{"name":"moving average block should return a list","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn1112"},{"name":"moving average should be computed correctly","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn-104176311.666666666666666744.666666666666667"}]},{"name":"Pangram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/pangram/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","inputs":[""],"output":false},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"lowercase pangram","inputs":["abcdefghijklmnopqrstuvwxyz"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"mixed case pangram","inputs":["abcdefghijkLMNOPQRSTUVWXYZ"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"pangram with extra symbols","inputs":["the quick brown fox jumps over a lazy dog!"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"missing a letter","inputs":["abcdefghijkLMNOPQRSTUVWYZ"],"output":false}]},{"name":"Sieve of Eratosthenes","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sieve/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should not consider 1 prime","inputs":[1],"output":[]},{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should find the all primes up to 5","inputs":[5],"output":[2,3,5]},{"type":"CustomBlockTest","name":"should find the all primes up to 30","spec":"factorial %'num'","inputs":[30],"output":[2,3,5,7,11,13,17,19,23,29]}]},{"name":"Sliding Windows","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sliding-windows/template.xml","tests":[]},{"name":"Transposing Music","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/transpose-music/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["78","1"],"output":"79","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["84","-2"],"output":"82","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["36","5"],"output":"41","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["C2","5"],"output":"41","name":"should accept note names (e.g., \"C4\")"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["50","0"],"output":"50","name":"should return original note when transposing by 0"}]},{"name":"Vigenere Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/vigenere/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["how are you?",["1","2","3","4"]],"output":"iqz$bth$zqxC"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["cba",["1","2","3"]],"output":"ddd"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["wow, negative keys?",["-2","-5","-3"]],"output":"ujt*\u001bkcb^rdsc\u001bhctp="},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["what large keys!",["100","200","300"]],"output":"[0\rXh\u0018E:\u0013Ih\u0017IA\u001f\u0005"}]}]}; + const config = {"name":"NetsBlox Exercises","assignments":[{"name":"Acronym","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/acronym/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["I Don't Know"],"output":"IDK"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["President Of The United States"],"output":"POTUS"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Shaking My Head"],"output":"SMH"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Agnetha, Bjorn, Benny, Anni-Frid"],"output":"ABBA"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Zone Improvement Plan"],"output":"ZIP"}]},{"name":"Actor's Birthday","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/actor-birthday/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Keanu Reeves"],"output":"1964-09-02"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Meryl Streep"],"output":"1949-06-22"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Denzel Washington"],"output":"1954-12-28"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Lin-Manuel Miranda"],"output":"1980-01-16"}]},{"name":"Anagram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/anagram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["shepherd","spider"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","ccat"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["olive","ilove"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","CAT"],"output":true}]},{"name":"Atbash Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/atbash/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["abc"],"output":"zyx"},{"name":"should preserve letter case","type":"CustomBlockTest","spec":"encrypt %'message'","function":"iterator fnXYZCBA"},{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["$?! +@"],"output":"$?! +@","name":"should preserve non-letters such as punctuation"}]},{"name":"Between","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/between/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[1,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[3,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,3,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[-6,-5,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[20,-5,5],"output":false}]},{"name":"Bigram Autocomplete","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/bigram-autocomplete/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list","function":"fncatcab"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list with 26 rows","function":"fncatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should contain rows that sum to 100","function":"fn100.5rowcatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return correct probabilities","function":"fn5013catcabchechi"}]},{"name":"Caesar Shift","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/caesar-shift/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["abc",2],"output":"cde"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",100],"output":"()*"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",-50],"output":"\u0012\u0013\u0014"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["with spaces",10],"output":"\u0001s~r*}zkmo}"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["no shift!",0],"output":"no shift!"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["negative wrapping!",-200],"output":"&\u001d\u001f\u0019,!.\u001dX/*\u0019((!&\u001fY"}]},{"name":"Compute the Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average/parsons.xml","tests":[]},{"name":"Compute the Average of a List","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average-list/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","1"]],"output":"1"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","2"]],"output":"1.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["-1","2","4","-3"]],"output":"0.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32"]],"output":-7.4},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32","54"]],"output":2.8333333333333335}]},{"name":"Counting Letter Frequency","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","function":"countabcc11200000000000000000000000"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","function":"counta b ! c26"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","function":"countaAbBcCzZ22200000000000000000000002"}]},{"name":"Counting Letter Frequency as Dictionary","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency-dictionary/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","inputs":["abcc"],"output":[["a",1],["b",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","inputs":["a4cc"],"output":[["a",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","inputs":["xyzZ"],"output":[["x",1],["y",1],["z",2]]}]},{"name":"Cracking the Caesar Shift with Brute Force","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-brute-force/parsons.xml","tests":[{"type":"CustomBlockTest","name":"it should find key when starts with a search word","spec":"find key where %'msg' contains %'words'","function":"code breakerhello world2messagemsg
hello2
"},{"name":"it should find key when using multiple search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces15messagemsg
hellowith15
"},{"name":"it should find key when ends with one of many search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces33messagemsg
hellospaces33
"},{"name":"it should return -1 if cannot decode message","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerno hidden words3messagemsg
hellospaces-1
"}]},{"name":"Cracking the Caesar Shift with a Partial Solution","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-partial-soln/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","c"],"output":2},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["A","a"],"output":32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","A"],"output":-32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["5","0"],"output":-5},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":[".","?"],"output":17}]},{"name":"Cyclic Iterator","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/cyclic-iterator/parsons.xml","tests":[{"name":"block should return a function","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1"},{"name":"sequence should start with the first value in the list","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1messagemsg
1
2424
"},{"name":"sequence should remember position","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn797"},{"name":"sequence should restart after reaching the end","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn777"}]},{"name":"Factorial","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/factorial/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[5],"output":120},{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[0],"output":1},{"type":"CustomBlockTest","name":"should compute the factorial of an unknown input","spec":"factorial %'num'","inputs":[7],"output":5040}]},{"name":"FizzBuzz","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/fizz-buzz/template.xml","tests":[{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[1],"output":1},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-39],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[3],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-50],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[5],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-150],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[15],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[0],"output":"fizzbuzz"}]},{"name":"From Infinite Sequences to Finite Lists","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/take-collect-sequences/parsons.xml","tests":[]},{"name":"Greet","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/greet/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"greet %'person'","name":"greet %'person' should start with \"Hello,\"","function":"blockBrian15Hello"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Bob"],"output":"Hello, Bob!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Alice"],"output":"Hello, Alice!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Cliff"],"output":"Hello, Cliff!"}]},{"name":"Intro to Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/intro-infinite-sequences/parsons.xml","tests":[{"name":"sequence should start with 1","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fnmessagemsg
1
"},{"name":"sequence should remember current position","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"},{"name":"sequence should produce counting numbers","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fntrue"},{"name":"two sequences should iterate independently","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"}]},{"name":"Isogram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/isogram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["letter"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["a"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["arraigning"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect first-order isogram","function":"blocksunflower"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect second-order isogram","function":"blockhorseshoer"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect third-order isogram","function":"blockgeggee"}]},{"name":"Leap Year","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/leap-year/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2015],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1970],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1996],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1960],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2100],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1900],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2000],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2400],"output":true}]},{"name":"Luhn Formula","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/luhn-formula/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"single digits cannot be valid","inputs":["8"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid credit card","inputs":["8273 1232 7352 0569"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"text with non digit is invalid","inputs":["059a"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid long number with even remainder","inputs":["1 2345 6789 1234 5678 9012"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with even digits","inputs":["095 245 88"],"output":true},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with odd number of spaces","inputs":["234 567 891 234"],"output":true}]},{"name":"Mapping Over Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/map-sequence/parsons.xml","tests":[{"name":"map should return another sequence","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map2messagemsg
"},{"name":"new sequence should contain transformed values","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map
by threes3i110true
"}]},{"name":"Minesweeper","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/minesweeper/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","*",""],["*","",""],["","*","*"]]],"output":[[2,"*",1],["*",4,3],[2,"*","*"]],"name":"board w/ mine counts on square board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*"],["*",""],["","*"]]],"output":[["*","*"],["*",4],[2,"*"]],"name":"board w/ mine counts on rectangle board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*","*"],["*","","*"],["","*",""]]],"output":[["*","*","*"],["*",6,"*"],[2,"*",2]],"name":"board w/ mine counts on dense board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","","",""],["","","","*"],["","","",""]]],"output":[[0,0,1,1],[0,0,1,"*"],[0,0,1,1]],"name":"board w/ mine counts on sparse board"}]},{"name":"Moving Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/moving-average/parsons.xml","tests":[{"name":"moving average block should return a list","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn1112"},{"name":"moving average should be computed correctly","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn-104176311.666666666666666744.666666666666667"}]},{"name":"Pangram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/pangram/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","inputs":[""],"output":false},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"lowercase pangram","inputs":["abcdefghijklmnopqrstuvwxyz"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"mixed case pangram","inputs":["abcdefghijkLMNOPQRSTUVWXYZ"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"pangram with extra symbols","inputs":["the quick brown fox jumps over a lazy dog!"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"missing a letter","inputs":["abcdefghijkLMNOPQRSTUVWYZ"],"output":false}]},{"name":"Sieve of Eratosthenes","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sieve/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should not consider 1 prime","inputs":[1],"output":[]},{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should find the all primes up to 5","inputs":[5],"output":[2,3,5]},{"type":"CustomBlockTest","name":"should find the all primes up to 30","spec":"factorial %'num'","inputs":[30],"output":[2,3,5,7,11,13,17,19,23,29]}]},{"name":"Sliding Windows","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sliding-windows/template.xml","tests":[]},{"name":"Transposing Music","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/transpose-music/template.xml","tests":[{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["78","1"],"output":"79","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["84","-2"],"output":"82","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["36","5"],"output":"41","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["C2","5"],"output":"41","name":"should accept note names (e.g., \"C4\")"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["50","0"],"output":"50","name":"should return original note when transposing by 0"}]},{"name":"Vigenere Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/vigenere/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["how are you?",["1","2","3","4"]],"output":"iqz$bth$zqxC"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["cba",["1","2","3"]],"output":"ddd"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["wow, negative keys?",["-2","-5","-3"]],"output":"ujt*\u001bkcb^rdsc\u001bhctp="},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["what large keys!",["100","200","300"]],"output":"[0\rXh\u0018E:\u0013Ih\u0017IA\u001f\u0005"}]}]}; const [ide] = world.children; class CustomBlockAutograder extends Extension { diff --git a/docs/autograders/sliding-windows.js b/docs/autograders/sliding-windows.js index 5956428..28367e9 100644 --- a/docs/autograders/sliding-windows.js +++ b/docs/autograders/sliding-windows.js @@ -2,7 +2,7 @@ ScrollFrameMorph, nop, HandleMorph, List, Extension, ToggleMorph, BlockMorph, Color, SpriteMorph, localize, TextMorph, MorphicPreferences, WHITE*/ (function() { - const config = {"name":"NetsBlox Exercises","assignments":[{"name":"Acronym","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/acronym/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["I Don't Know"],"output":"IDK"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["President Of The United States"],"output":"POTUS"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Shaking My Head"],"output":"SMH"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Agnetha, Bjorn, Benny, Anni-Frid"],"output":"ABBA"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Zone Improvement Plan"],"output":"ZIP"}]},{"name":"Actor's Birthday","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/actor-birthday/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Keanu Reeves"],"output":"1964-09-02"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Meryl Streep"],"output":"1949-06-22"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Denzel Washington"],"output":"1954-12-28"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Lin-Manuel Miranda"],"output":"1980-01-16"}]},{"name":"Anagram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/anagram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["shepherd","spider"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","ccat"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["olive","ilove"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","CAT"],"output":true}]},{"name":"Atbash Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/atbash/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["abc"],"output":"zyx"},{"name":"should preserve letter case","type":"CustomBlockTest","spec":"encrypt %'message'","function":"iterator fnXYZCBA"},{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["$?! +@"],"output":"$?! +@","name":"should preserve non-letters such as punctuation"}]},{"name":"Between","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/between/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[1,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[3,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,3,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[-6,-5,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[20,-5,5],"output":false}]},{"name":"Bigram Autocomplete","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/bigram-autocomplete/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list","function":"fncatcab"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list with 26 rows","function":"fncatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should contain rows that sum to 100","function":"fn100.5rowcatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return correct probabilities","function":"fn5013catcabchechi"}]},{"name":"Caesar Shift","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/caesar-shift/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["abc",2],"output":"cde"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",100],"output":"()*"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",-50],"output":"\u0012\u0013\u0014"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["with spaces",10],"output":"\u0001s~r*}zkmo}"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["no shift!",0],"output":"no shift!"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["negative wrapping!",-200],"output":"&\u001d\u001f\u0019,!.\u001dX/*\u0019((!&\u001fY"}]},{"name":"Compute the Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average/parsons.xml","tests":[]},{"name":"Compute the Average of a List","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average-list/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","1"]],"output":"1"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","2"]],"output":"1.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["-1","2","4","-3"]],"output":"0.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32"]],"output":-7.4},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32","54"]],"output":2.8333333333333335}]},{"name":"Counting Letter Frequency","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","function":"countabcc11200000000000000000000000"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","function":"counta b ! c26"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","function":"countaAbBcCzZ22200000000000000000000002"}]},{"name":"Counting Letter Frequency as Dictionary","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency-dictionary/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","inputs":["abcc"],"output":[["a",1],["b",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","inputs":["a4cc"],"output":[["a",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","inputs":["xyzZ"],"output":[["x",1],["y",1],["z",2]]}]},{"name":"Cracking the Caesar Shift with Brute Force","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-brute-force/parsons.xml","tests":[{"type":"CustomBlockTest","name":"it should find key when starts with a search word","spec":"find key where %'msg' contains %'words'","function":"code breakerhello world2messagemsg
hello2
"},{"name":"it should find key when using multiple search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces15messagemsg
hellowith15
"},{"name":"it should find key when ends with one of many search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces33messagemsg
hellospaces33
"},{"name":"it should return -1 if cannot decode message","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerno hidden words3messagemsg
hellospaces-1
"}]},{"name":"Cracking the Caesar Shift with a Partial Solution","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-partial-soln/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","c"],"output":2},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["A","a"],"output":32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","A"],"output":-32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["5","0"],"output":-5},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":[".","?"],"output":17}]},{"name":"Cyclic Iterator","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/cyclic-iterator/parsons.xml","tests":[{"name":"block should return a function","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1"},{"name":"sequence should start with the first value in the list","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1messagemsg
1
2424
"},{"name":"sequence should remember position","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn797"},{"name":"sequence should restart after reaching the end","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn777"}]},{"name":"Factorial","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/factorial/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[5],"output":120},{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[0],"output":1},{"type":"CustomBlockTest","name":"should compute the factorial of an unknown input","spec":"factorial %'num'","inputs":[7],"output":5040}]},{"name":"FizzBuzz","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/fizz-buzz/template.xml","tests":[{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[1],"output":1},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-39],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[3],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-50],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[5],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-150],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[15],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[0],"output":"fizzbuzz"}]},{"name":"From Infinite Sequences to Finite Lists","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/take-collect-sequences/parsons.xml","tests":[]},{"name":"Greet","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/greet/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"greet %'person'","name":"greet %'person' should start with \"Hello,\"","function":"blockBrian15Hello"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Bob"],"output":"Hello, Bob!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Alice"],"output":"Hello, Alice!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Cliff"],"output":"Hello, Cliff!"}]},{"name":"Intro to Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/intro-infinite-sequences/parsons.xml","tests":[{"name":"sequence should start with 1","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fnmessagemsg
1
"},{"name":"sequence should remember current position","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"},{"name":"sequence should produce counting numbers","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fntrue"},{"name":"two sequences should iterate independently","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"}]},{"name":"Isogram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/isogram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["letter"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["a"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["arraigning"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect first-order isogram","function":"blocksunflower"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect second-order isogram","function":"blockhorseshoer"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect third-order isogram","function":"blockgeggee"}]},{"name":"Leap Year","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/leap-year/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2015],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1970],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1996],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1960],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2100],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1900],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2000],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2400],"output":true}]},{"name":"Luhn Formula","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/luhn-formula/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"single digits cannot be valid","inputs":["8"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid credit card","inputs":["8273 1232 7352 0569"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"text with non digit is invalid","inputs":["059a"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid long number with even remainder","inputs":["1 2345 6789 1234 5678 9012"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with even digits","inputs":["095 245 88"],"output":true},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with odd number of spaces","inputs":["234 567 891 234"],"output":true}]},{"name":"Mapping Over Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/map-sequence/parsons.xml","tests":[{"name":"map should return another sequence","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map2messagemsg
"},{"name":"new sequence should contain transformed values","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map
by threes3i110true
"}]},{"name":"Minesweeper","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/minesweeper/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","*",""],["*","",""],["","*","*"]]],"output":[[2,"*",1],["*",4,3],[2,"*","*"]],"name":"board w/ mine counts on square board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*"],["*",""],["","*"]]],"output":[["*","*"],["*",4],[2,"*"]],"name":"board w/ mine counts on rectangle board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*","*"],["*","","*"],["","*",""]]],"output":[["*","*","*"],["*",6,"*"],[2,"*",2]],"name":"board w/ mine counts on dense board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","","",""],["","","","*"],["","","",""]]],"output":[[0,0,1,1],[0,0,1,"*"],[0,0,1,1]],"name":"board w/ mine counts on sparse board"}]},{"name":"Moving Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/moving-average/parsons.xml","tests":[{"name":"moving average block should return a list","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn1112"},{"name":"moving average should be computed correctly","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn-104176311.666666666666666744.666666666666667"}]},{"name":"Pangram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/pangram/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","inputs":[""],"output":false},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"lowercase pangram","inputs":["abcdefghijklmnopqrstuvwxyz"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"mixed case pangram","inputs":["abcdefghijkLMNOPQRSTUVWXYZ"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"pangram with extra symbols","inputs":["the quick brown fox jumps over a lazy dog!"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"missing a letter","inputs":["abcdefghijkLMNOPQRSTUVWYZ"],"output":false}]},{"name":"Sieve of Eratosthenes","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sieve/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should not consider 1 prime","inputs":[1],"output":[]},{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should find the all primes up to 5","inputs":[5],"output":[2,3,5]},{"type":"CustomBlockTest","name":"should find the all primes up to 30","spec":"factorial %'num'","inputs":[30],"output":[2,3,5,7,11,13,17,19,23,29]}]},{"name":"Sliding Windows","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sliding-windows/template.xml","tests":[]},{"name":"Transposing Music","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/transpose-music/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["78","1"],"output":"79","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["84","-2"],"output":"82","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["36","5"],"output":"41","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["C2","5"],"output":"41","name":"should accept note names (e.g., \"C4\")"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["50","0"],"output":"50","name":"should return original note when transposing by 0"}]},{"name":"Vigenere Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/vigenere/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["how are you?",["1","2","3","4"]],"output":"iqz$bth$zqxC"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["cba",["1","2","3"]],"output":"ddd"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["wow, negative keys?",["-2","-5","-3"]],"output":"ujt*\u001bkcb^rdsc\u001bhctp="},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["what large keys!",["100","200","300"]],"output":"[0\rXh\u0018E:\u0013Ih\u0017IA\u001f\u0005"}]}]}; + const config = {"name":"NetsBlox Exercises","assignments":[{"name":"Acronym","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/acronym/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["I Don't Know"],"output":"IDK"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["President Of The United States"],"output":"POTUS"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Shaking My Head"],"output":"SMH"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Agnetha, Bjorn, Benny, Anni-Frid"],"output":"ABBA"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Zone Improvement Plan"],"output":"ZIP"}]},{"name":"Actor's Birthday","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/actor-birthday/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Keanu Reeves"],"output":"1964-09-02"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Meryl Streep"],"output":"1949-06-22"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Denzel Washington"],"output":"1954-12-28"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Lin-Manuel Miranda"],"output":"1980-01-16"}]},{"name":"Anagram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/anagram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["shepherd","spider"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","ccat"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["olive","ilove"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","CAT"],"output":true}]},{"name":"Atbash Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/atbash/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["abc"],"output":"zyx"},{"name":"should preserve letter case","type":"CustomBlockTest","spec":"encrypt %'message'","function":"iterator fnXYZCBA"},{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["$?! +@"],"output":"$?! +@","name":"should preserve non-letters such as punctuation"}]},{"name":"Between","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/between/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[1,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[3,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,3,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[-6,-5,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[20,-5,5],"output":false}]},{"name":"Bigram Autocomplete","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/bigram-autocomplete/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list","function":"fncatcab"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list with 26 rows","function":"fncatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should contain rows that sum to 100","function":"fn100.5rowcatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return correct probabilities","function":"fn5013catcabchechi"}]},{"name":"Caesar Shift","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/caesar-shift/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["abc",2],"output":"cde"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",100],"output":"()*"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",-50],"output":"\u0012\u0013\u0014"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["with spaces",10],"output":"\u0001s~r*}zkmo}"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["no shift!",0],"output":"no shift!"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["negative wrapping!",-200],"output":"&\u001d\u001f\u0019,!.\u001dX/*\u0019((!&\u001fY"}]},{"name":"Compute the Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average/parsons.xml","tests":[]},{"name":"Compute the Average of a List","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average-list/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","1"]],"output":"1"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","2"]],"output":"1.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["-1","2","4","-3"]],"output":"0.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32"]],"output":-7.4},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32","54"]],"output":2.8333333333333335}]},{"name":"Counting Letter Frequency","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","function":"countabcc11200000000000000000000000"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","function":"counta b ! c26"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","function":"countaAbBcCzZ22200000000000000000000002"}]},{"name":"Counting Letter Frequency as Dictionary","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency-dictionary/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","inputs":["abcc"],"output":[["a",1],["b",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","inputs":["a4cc"],"output":[["a",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","inputs":["xyzZ"],"output":[["x",1],["y",1],["z",2]]}]},{"name":"Cracking the Caesar Shift with Brute Force","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-brute-force/parsons.xml","tests":[{"type":"CustomBlockTest","name":"it should find key when starts with a search word","spec":"find key where %'msg' contains %'words'","function":"code breakerhello world2messagemsg
hello2
"},{"name":"it should find key when using multiple search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces15messagemsg
hellowith15
"},{"name":"it should find key when ends with one of many search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces33messagemsg
hellospaces33
"},{"name":"it should return -1 if cannot decode message","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerno hidden words3messagemsg
hellospaces-1
"}]},{"name":"Cracking the Caesar Shift with a Partial Solution","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-partial-soln/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","c"],"output":2},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["A","a"],"output":32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","A"],"output":-32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["5","0"],"output":-5},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":[".","?"],"output":17}]},{"name":"Cyclic Iterator","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/cyclic-iterator/parsons.xml","tests":[{"name":"block should return a function","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1"},{"name":"sequence should start with the first value in the list","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1messagemsg
1
2424
"},{"name":"sequence should remember position","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn797"},{"name":"sequence should restart after reaching the end","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn777"}]},{"name":"Factorial","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/factorial/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[5],"output":120},{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[0],"output":1},{"type":"CustomBlockTest","name":"should compute the factorial of an unknown input","spec":"factorial %'num'","inputs":[7],"output":5040}]},{"name":"FizzBuzz","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/fizz-buzz/template.xml","tests":[{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[1],"output":1},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-39],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[3],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-50],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[5],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-150],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[15],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[0],"output":"fizzbuzz"}]},{"name":"From Infinite Sequences to Finite Lists","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/take-collect-sequences/parsons.xml","tests":[]},{"name":"Greet","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/greet/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"greet %'person'","name":"greet %'person' should start with \"Hello,\"","function":"blockBrian15Hello"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Bob"],"output":"Hello, Bob!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Alice"],"output":"Hello, Alice!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Cliff"],"output":"Hello, Cliff!"}]},{"name":"Intro to Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/intro-infinite-sequences/parsons.xml","tests":[{"name":"sequence should start with 1","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fnmessagemsg
1
"},{"name":"sequence should remember current position","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"},{"name":"sequence should produce counting numbers","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fntrue"},{"name":"two sequences should iterate independently","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"}]},{"name":"Isogram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/isogram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["letter"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["a"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["arraigning"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect first-order isogram","function":"blocksunflower"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect second-order isogram","function":"blockhorseshoer"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect third-order isogram","function":"blockgeggee"}]},{"name":"Leap Year","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/leap-year/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2015],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1970],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1996],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1960],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2100],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1900],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2000],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2400],"output":true}]},{"name":"Luhn Formula","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/luhn-formula/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"single digits cannot be valid","inputs":["8"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid credit card","inputs":["8273 1232 7352 0569"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"text with non digit is invalid","inputs":["059a"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid long number with even remainder","inputs":["1 2345 6789 1234 5678 9012"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with even digits","inputs":["095 245 88"],"output":true},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with odd number of spaces","inputs":["234 567 891 234"],"output":true}]},{"name":"Mapping Over Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/map-sequence/parsons.xml","tests":[{"name":"map should return another sequence","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map2messagemsg
"},{"name":"new sequence should contain transformed values","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map
by threes3i110true
"}]},{"name":"Minesweeper","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/minesweeper/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","*",""],["*","",""],["","*","*"]]],"output":[[2,"*",1],["*",4,3],[2,"*","*"]],"name":"board w/ mine counts on square board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*"],["*",""],["","*"]]],"output":[["*","*"],["*",4],[2,"*"]],"name":"board w/ mine counts on rectangle board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*","*"],["*","","*"],["","*",""]]],"output":[["*","*","*"],["*",6,"*"],[2,"*",2]],"name":"board w/ mine counts on dense board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","","",""],["","","","*"],["","","",""]]],"output":[[0,0,1,1],[0,0,1,"*"],[0,0,1,1]],"name":"board w/ mine counts on sparse board"}]},{"name":"Moving Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/moving-average/parsons.xml","tests":[{"name":"moving average block should return a list","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn1112"},{"name":"moving average should be computed correctly","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn-104176311.666666666666666744.666666666666667"}]},{"name":"Pangram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/pangram/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","inputs":[""],"output":false},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"lowercase pangram","inputs":["abcdefghijklmnopqrstuvwxyz"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"mixed case pangram","inputs":["abcdefghijkLMNOPQRSTUVWXYZ"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"pangram with extra symbols","inputs":["the quick brown fox jumps over a lazy dog!"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"missing a letter","inputs":["abcdefghijkLMNOPQRSTUVWYZ"],"output":false}]},{"name":"Sieve of Eratosthenes","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sieve/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should not consider 1 prime","inputs":[1],"output":[]},{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should find the all primes up to 5","inputs":[5],"output":[2,3,5]},{"type":"CustomBlockTest","name":"should find the all primes up to 30","spec":"factorial %'num'","inputs":[30],"output":[2,3,5,7,11,13,17,19,23,29]}]},{"name":"Sliding Windows","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sliding-windows/template.xml","tests":[]},{"name":"Transposing Music","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/transpose-music/template.xml","tests":[{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["78","1"],"output":"79","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["84","-2"],"output":"82","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["36","5"],"output":"41","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["C2","5"],"output":"41","name":"should accept note names (e.g., \"C4\")"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["50","0"],"output":"50","name":"should return original note when transposing by 0"}]},{"name":"Vigenere Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/vigenere/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["how are you?",["1","2","3","4"]],"output":"iqz$bth$zqxC"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["cba",["1","2","3"]],"output":"ddd"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["wow, negative keys?",["-2","-5","-3"]],"output":"ujt*\u001bkcb^rdsc\u001bhctp="},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["what large keys!",["100","200","300"]],"output":"[0\rXh\u0018E:\u0013Ih\u0017IA\u001f\u0005"}]}]}; const [ide] = world.children; class CustomBlockAutograder extends Extension { diff --git a/docs/autograders/take-collect-sequences.js b/docs/autograders/take-collect-sequences.js index 339377f..6a09fb5 100644 --- a/docs/autograders/take-collect-sequences.js +++ b/docs/autograders/take-collect-sequences.js @@ -2,7 +2,7 @@ ScrollFrameMorph, nop, HandleMorph, List, Extension, ToggleMorph, BlockMorph, Color, SpriteMorph, localize, TextMorph, MorphicPreferences, WHITE*/ (function() { - const config = {"name":"NetsBlox Exercises","assignments":[{"name":"Acronym","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/acronym/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["I Don't Know"],"output":"IDK"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["President Of The United States"],"output":"POTUS"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Shaking My Head"],"output":"SMH"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Agnetha, Bjorn, Benny, Anni-Frid"],"output":"ABBA"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Zone Improvement Plan"],"output":"ZIP"}]},{"name":"Actor's Birthday","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/actor-birthday/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Keanu Reeves"],"output":"1964-09-02"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Meryl Streep"],"output":"1949-06-22"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Denzel Washington"],"output":"1954-12-28"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Lin-Manuel Miranda"],"output":"1980-01-16"}]},{"name":"Anagram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/anagram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["shepherd","spider"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","ccat"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["olive","ilove"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","CAT"],"output":true}]},{"name":"Atbash Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/atbash/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["abc"],"output":"zyx"},{"name":"should preserve letter case","type":"CustomBlockTest","spec":"encrypt %'message'","function":"iterator fnXYZCBA"},{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["$?! +@"],"output":"$?! +@","name":"should preserve non-letters such as punctuation"}]},{"name":"Between","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/between/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[1,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[3,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,3,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[-6,-5,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[20,-5,5],"output":false}]},{"name":"Bigram Autocomplete","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/bigram-autocomplete/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list","function":"fncatcab"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list with 26 rows","function":"fncatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should contain rows that sum to 100","function":"fn100.5rowcatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return correct probabilities","function":"fn5013catcabchechi"}]},{"name":"Caesar Shift","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/caesar-shift/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["abc",2],"output":"cde"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",100],"output":"()*"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",-50],"output":"\u0012\u0013\u0014"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["with spaces",10],"output":"\u0001s~r*}zkmo}"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["no shift!",0],"output":"no shift!"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["negative wrapping!",-200],"output":"&\u001d\u001f\u0019,!.\u001dX/*\u0019((!&\u001fY"}]},{"name":"Compute the Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average/parsons.xml","tests":[]},{"name":"Compute the Average of a List","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average-list/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","1"]],"output":"1"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","2"]],"output":"1.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["-1","2","4","-3"]],"output":"0.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32"]],"output":-7.4},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32","54"]],"output":2.8333333333333335}]},{"name":"Counting Letter Frequency","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","function":"countabcc11200000000000000000000000"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","function":"counta b ! c26"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","function":"countaAbBcCzZ22200000000000000000000002"}]},{"name":"Counting Letter Frequency as Dictionary","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency-dictionary/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","inputs":["abcc"],"output":[["a",1],["b",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","inputs":["a4cc"],"output":[["a",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","inputs":["xyzZ"],"output":[["x",1],["y",1],["z",2]]}]},{"name":"Cracking the Caesar Shift with Brute Force","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-brute-force/parsons.xml","tests":[{"type":"CustomBlockTest","name":"it should find key when starts with a search word","spec":"find key where %'msg' contains %'words'","function":"code breakerhello world2messagemsg
hello2
"},{"name":"it should find key when using multiple search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces15messagemsg
hellowith15
"},{"name":"it should find key when ends with one of many search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces33messagemsg
hellospaces33
"},{"name":"it should return -1 if cannot decode message","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerno hidden words3messagemsg
hellospaces-1
"}]},{"name":"Cracking the Caesar Shift with a Partial Solution","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-partial-soln/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","c"],"output":2},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["A","a"],"output":32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","A"],"output":-32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["5","0"],"output":-5},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":[".","?"],"output":17}]},{"name":"Cyclic Iterator","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/cyclic-iterator/parsons.xml","tests":[{"name":"block should return a function","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1"},{"name":"sequence should start with the first value in the list","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1messagemsg
1
2424
"},{"name":"sequence should remember position","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn797"},{"name":"sequence should restart after reaching the end","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn777"}]},{"name":"Factorial","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/factorial/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[5],"output":120},{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[0],"output":1},{"type":"CustomBlockTest","name":"should compute the factorial of an unknown input","spec":"factorial %'num'","inputs":[7],"output":5040}]},{"name":"FizzBuzz","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/fizz-buzz/template.xml","tests":[{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[1],"output":1},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-39],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[3],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-50],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[5],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-150],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[15],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[0],"output":"fizzbuzz"}]},{"name":"From Infinite Sequences to Finite Lists","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/take-collect-sequences/parsons.xml","tests":[]},{"name":"Greet","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/greet/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"greet %'person'","name":"greet %'person' should start with \"Hello,\"","function":"blockBrian15Hello"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Bob"],"output":"Hello, Bob!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Alice"],"output":"Hello, Alice!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Cliff"],"output":"Hello, Cliff!"}]},{"name":"Intro to Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/intro-infinite-sequences/parsons.xml","tests":[{"name":"sequence should start with 1","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fnmessagemsg
1
"},{"name":"sequence should remember current position","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"},{"name":"sequence should produce counting numbers","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fntrue"},{"name":"two sequences should iterate independently","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"}]},{"name":"Isogram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/isogram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["letter"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["a"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["arraigning"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect first-order isogram","function":"blocksunflower"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect second-order isogram","function":"blockhorseshoer"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect third-order isogram","function":"blockgeggee"}]},{"name":"Leap Year","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/leap-year/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2015],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1970],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1996],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1960],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2100],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1900],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2000],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2400],"output":true}]},{"name":"Luhn Formula","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/luhn-formula/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"single digits cannot be valid","inputs":["8"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid credit card","inputs":["8273 1232 7352 0569"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"text with non digit is invalid","inputs":["059a"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid long number with even remainder","inputs":["1 2345 6789 1234 5678 9012"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with even digits","inputs":["095 245 88"],"output":true},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with odd number of spaces","inputs":["234 567 891 234"],"output":true}]},{"name":"Mapping Over Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/map-sequence/parsons.xml","tests":[{"name":"map should return another sequence","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map2messagemsg
"},{"name":"new sequence should contain transformed values","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map
by threes3i110true
"}]},{"name":"Minesweeper","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/minesweeper/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","*",""],["*","",""],["","*","*"]]],"output":[[2,"*",1],["*",4,3],[2,"*","*"]],"name":"board w/ mine counts on square board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*"],["*",""],["","*"]]],"output":[["*","*"],["*",4],[2,"*"]],"name":"board w/ mine counts on rectangle board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*","*"],["*","","*"],["","*",""]]],"output":[["*","*","*"],["*",6,"*"],[2,"*",2]],"name":"board w/ mine counts on dense board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","","",""],["","","","*"],["","","",""]]],"output":[[0,0,1,1],[0,0,1,"*"],[0,0,1,1]],"name":"board w/ mine counts on sparse board"}]},{"name":"Moving Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/moving-average/parsons.xml","tests":[{"name":"moving average block should return a list","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn1112"},{"name":"moving average should be computed correctly","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn-104176311.666666666666666744.666666666666667"}]},{"name":"Pangram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/pangram/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","inputs":[""],"output":false},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"lowercase pangram","inputs":["abcdefghijklmnopqrstuvwxyz"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"mixed case pangram","inputs":["abcdefghijkLMNOPQRSTUVWXYZ"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"pangram with extra symbols","inputs":["the quick brown fox jumps over a lazy dog!"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"missing a letter","inputs":["abcdefghijkLMNOPQRSTUVWYZ"],"output":false}]},{"name":"Sieve of Eratosthenes","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sieve/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should not consider 1 prime","inputs":[1],"output":[]},{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should find the all primes up to 5","inputs":[5],"output":[2,3,5]},{"type":"CustomBlockTest","name":"should find the all primes up to 30","spec":"factorial %'num'","inputs":[30],"output":[2,3,5,7,11,13,17,19,23,29]}]},{"name":"Sliding Windows","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sliding-windows/template.xml","tests":[]},{"name":"Transposing Music","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/transpose-music/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["78","1"],"output":"79","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["84","-2"],"output":"82","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["36","5"],"output":"41","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["C2","5"],"output":"41","name":"should accept note names (e.g., \"C4\")"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["50","0"],"output":"50","name":"should return original note when transposing by 0"}]},{"name":"Vigenere Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/vigenere/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["how are you?",["1","2","3","4"]],"output":"iqz$bth$zqxC"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["cba",["1","2","3"]],"output":"ddd"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["wow, negative keys?",["-2","-5","-3"]],"output":"ujt*\u001bkcb^rdsc\u001bhctp="},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["what large keys!",["100","200","300"]],"output":"[0\rXh\u0018E:\u0013Ih\u0017IA\u001f\u0005"}]}]}; + const config = {"name":"NetsBlox Exercises","assignments":[{"name":"Acronym","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/acronym/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["I Don't Know"],"output":"IDK"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["President Of The United States"],"output":"POTUS"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Shaking My Head"],"output":"SMH"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Agnetha, Bjorn, Benny, Anni-Frid"],"output":"ABBA"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Zone Improvement Plan"],"output":"ZIP"}]},{"name":"Actor's Birthday","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/actor-birthday/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Keanu Reeves"],"output":"1964-09-02"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Meryl Streep"],"output":"1949-06-22"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Denzel Washington"],"output":"1954-12-28"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Lin-Manuel Miranda"],"output":"1980-01-16"}]},{"name":"Anagram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/anagram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["shepherd","spider"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","ccat"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["olive","ilove"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","CAT"],"output":true}]},{"name":"Atbash Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/atbash/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["abc"],"output":"zyx"},{"name":"should preserve letter case","type":"CustomBlockTest","spec":"encrypt %'message'","function":"iterator fnXYZCBA"},{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["$?! +@"],"output":"$?! +@","name":"should preserve non-letters such as punctuation"}]},{"name":"Between","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/between/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[1,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[3,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,3,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[-6,-5,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[20,-5,5],"output":false}]},{"name":"Bigram Autocomplete","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/bigram-autocomplete/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list","function":"fncatcab"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list with 26 rows","function":"fncatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should contain rows that sum to 100","function":"fn100.5rowcatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return correct probabilities","function":"fn5013catcabchechi"}]},{"name":"Caesar Shift","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/caesar-shift/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["abc",2],"output":"cde"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",100],"output":"()*"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",-50],"output":"\u0012\u0013\u0014"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["with spaces",10],"output":"\u0001s~r*}zkmo}"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["no shift!",0],"output":"no shift!"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["negative wrapping!",-200],"output":"&\u001d\u001f\u0019,!.\u001dX/*\u0019((!&\u001fY"}]},{"name":"Compute the Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average/parsons.xml","tests":[]},{"name":"Compute the Average of a List","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average-list/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","1"]],"output":"1"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","2"]],"output":"1.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["-1","2","4","-3"]],"output":"0.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32"]],"output":-7.4},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32","54"]],"output":2.8333333333333335}]},{"name":"Counting Letter Frequency","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","function":"countabcc11200000000000000000000000"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","function":"counta b ! c26"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","function":"countaAbBcCzZ22200000000000000000000002"}]},{"name":"Counting Letter Frequency as Dictionary","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency-dictionary/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","inputs":["abcc"],"output":[["a",1],["b",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","inputs":["a4cc"],"output":[["a",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","inputs":["xyzZ"],"output":[["x",1],["y",1],["z",2]]}]},{"name":"Cracking the Caesar Shift with Brute Force","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-brute-force/parsons.xml","tests":[{"type":"CustomBlockTest","name":"it should find key when starts with a search word","spec":"find key where %'msg' contains %'words'","function":"code breakerhello world2messagemsg
hello2
"},{"name":"it should find key when using multiple search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces15messagemsg
hellowith15
"},{"name":"it should find key when ends with one of many search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces33messagemsg
hellospaces33
"},{"name":"it should return -1 if cannot decode message","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerno hidden words3messagemsg
hellospaces-1
"}]},{"name":"Cracking the Caesar Shift with a Partial Solution","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-partial-soln/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","c"],"output":2},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["A","a"],"output":32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","A"],"output":-32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["5","0"],"output":-5},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":[".","?"],"output":17}]},{"name":"Cyclic Iterator","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/cyclic-iterator/parsons.xml","tests":[{"name":"block should return a function","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1"},{"name":"sequence should start with the first value in the list","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1messagemsg
1
2424
"},{"name":"sequence should remember position","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn797"},{"name":"sequence should restart after reaching the end","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn777"}]},{"name":"Factorial","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/factorial/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[5],"output":120},{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[0],"output":1},{"type":"CustomBlockTest","name":"should compute the factorial of an unknown input","spec":"factorial %'num'","inputs":[7],"output":5040}]},{"name":"FizzBuzz","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/fizz-buzz/template.xml","tests":[{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[1],"output":1},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-39],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[3],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-50],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[5],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-150],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[15],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[0],"output":"fizzbuzz"}]},{"name":"From Infinite Sequences to Finite Lists","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/take-collect-sequences/parsons.xml","tests":[]},{"name":"Greet","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/greet/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"greet %'person'","name":"greet %'person' should start with \"Hello,\"","function":"blockBrian15Hello"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Bob"],"output":"Hello, Bob!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Alice"],"output":"Hello, Alice!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Cliff"],"output":"Hello, Cliff!"}]},{"name":"Intro to Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/intro-infinite-sequences/parsons.xml","tests":[{"name":"sequence should start with 1","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fnmessagemsg
1
"},{"name":"sequence should remember current position","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"},{"name":"sequence should produce counting numbers","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fntrue"},{"name":"two sequences should iterate independently","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"}]},{"name":"Isogram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/isogram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["letter"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["a"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["arraigning"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect first-order isogram","function":"blocksunflower"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect second-order isogram","function":"blockhorseshoer"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect third-order isogram","function":"blockgeggee"}]},{"name":"Leap Year","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/leap-year/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2015],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1970],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1996],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1960],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2100],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1900],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2000],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2400],"output":true}]},{"name":"Luhn Formula","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/luhn-formula/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"single digits cannot be valid","inputs":["8"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid credit card","inputs":["8273 1232 7352 0569"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"text with non digit is invalid","inputs":["059a"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid long number with even remainder","inputs":["1 2345 6789 1234 5678 9012"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with even digits","inputs":["095 245 88"],"output":true},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with odd number of spaces","inputs":["234 567 891 234"],"output":true}]},{"name":"Mapping Over Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/map-sequence/parsons.xml","tests":[{"name":"map should return another sequence","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map2messagemsg
"},{"name":"new sequence should contain transformed values","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map
by threes3i110true
"}]},{"name":"Minesweeper","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/minesweeper/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","*",""],["*","",""],["","*","*"]]],"output":[[2,"*",1],["*",4,3],[2,"*","*"]],"name":"board w/ mine counts on square board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*"],["*",""],["","*"]]],"output":[["*","*"],["*",4],[2,"*"]],"name":"board w/ mine counts on rectangle board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*","*"],["*","","*"],["","*",""]]],"output":[["*","*","*"],["*",6,"*"],[2,"*",2]],"name":"board w/ mine counts on dense board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","","",""],["","","","*"],["","","",""]]],"output":[[0,0,1,1],[0,0,1,"*"],[0,0,1,1]],"name":"board w/ mine counts on sparse board"}]},{"name":"Moving Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/moving-average/parsons.xml","tests":[{"name":"moving average block should return a list","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn1112"},{"name":"moving average should be computed correctly","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn-104176311.666666666666666744.666666666666667"}]},{"name":"Pangram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/pangram/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","inputs":[""],"output":false},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"lowercase pangram","inputs":["abcdefghijklmnopqrstuvwxyz"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"mixed case pangram","inputs":["abcdefghijkLMNOPQRSTUVWXYZ"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"pangram with extra symbols","inputs":["the quick brown fox jumps over a lazy dog!"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"missing a letter","inputs":["abcdefghijkLMNOPQRSTUVWYZ"],"output":false}]},{"name":"Sieve of Eratosthenes","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sieve/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should not consider 1 prime","inputs":[1],"output":[]},{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should find the all primes up to 5","inputs":[5],"output":[2,3,5]},{"type":"CustomBlockTest","name":"should find the all primes up to 30","spec":"factorial %'num'","inputs":[30],"output":[2,3,5,7,11,13,17,19,23,29]}]},{"name":"Sliding Windows","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sliding-windows/template.xml","tests":[]},{"name":"Transposing Music","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/transpose-music/template.xml","tests":[{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["78","1"],"output":"79","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["84","-2"],"output":"82","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["36","5"],"output":"41","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["C2","5"],"output":"41","name":"should accept note names (e.g., \"C4\")"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["50","0"],"output":"50","name":"should return original note when transposing by 0"}]},{"name":"Vigenere Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/vigenere/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["how are you?",["1","2","3","4"]],"output":"iqz$bth$zqxC"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["cba",["1","2","3"]],"output":"ddd"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["wow, negative keys?",["-2","-5","-3"]],"output":"ujt*\u001bkcb^rdsc\u001bhctp="},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["what large keys!",["100","200","300"]],"output":"[0\rXh\u0018E:\u0013Ih\u0017IA\u001f\u0005"}]}]}; const [ide] = world.children; class CustomBlockAutograder extends Extension { diff --git a/docs/autograders/transpose-music.js b/docs/autograders/transpose-music.js index 174f966..58b28e0 100644 --- a/docs/autograders/transpose-music.js +++ b/docs/autograders/transpose-music.js @@ -2,7 +2,7 @@ ScrollFrameMorph, nop, HandleMorph, List, Extension, ToggleMorph, BlockMorph, Color, SpriteMorph, localize, TextMorph, MorphicPreferences, WHITE*/ (function() { - const config = {"name":"NetsBlox Exercises","assignments":[{"name":"Acronym","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/acronym/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["I Don't Know"],"output":"IDK"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["President Of The United States"],"output":"POTUS"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Shaking My Head"],"output":"SMH"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Agnetha, Bjorn, Benny, Anni-Frid"],"output":"ABBA"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Zone Improvement Plan"],"output":"ZIP"}]},{"name":"Actor's Birthday","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/actor-birthday/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Keanu Reeves"],"output":"1964-09-02"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Meryl Streep"],"output":"1949-06-22"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Denzel Washington"],"output":"1954-12-28"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Lin-Manuel Miranda"],"output":"1980-01-16"}]},{"name":"Anagram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/anagram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["shepherd","spider"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","ccat"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["olive","ilove"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","CAT"],"output":true}]},{"name":"Atbash Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/atbash/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["abc"],"output":"zyx"},{"name":"should preserve letter case","type":"CustomBlockTest","spec":"encrypt %'message'","function":"iterator fnXYZCBA"},{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["$?! +@"],"output":"$?! +@","name":"should preserve non-letters such as punctuation"}]},{"name":"Between","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/between/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[1,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[3,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,3,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[-6,-5,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[20,-5,5],"output":false}]},{"name":"Bigram Autocomplete","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/bigram-autocomplete/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list","function":"fncatcab"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list with 26 rows","function":"fncatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should contain rows that sum to 100","function":"fn100.5rowcatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return correct probabilities","function":"fn5013catcabchechi"}]},{"name":"Caesar Shift","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/caesar-shift/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["abc",2],"output":"cde"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",100],"output":"()*"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",-50],"output":"\u0012\u0013\u0014"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["with spaces",10],"output":"\u0001s~r*}zkmo}"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["no shift!",0],"output":"no shift!"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["negative wrapping!",-200],"output":"&\u001d\u001f\u0019,!.\u001dX/*\u0019((!&\u001fY"}]},{"name":"Compute the Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average/parsons.xml","tests":[]},{"name":"Compute the Average of a List","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average-list/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","1"]],"output":"1"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","2"]],"output":"1.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["-1","2","4","-3"]],"output":"0.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32"]],"output":-7.4},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32","54"]],"output":2.8333333333333335}]},{"name":"Counting Letter Frequency","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","function":"countabcc11200000000000000000000000"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","function":"counta b ! c26"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","function":"countaAbBcCzZ22200000000000000000000002"}]},{"name":"Counting Letter Frequency as Dictionary","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency-dictionary/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","inputs":["abcc"],"output":[["a",1],["b",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","inputs":["a4cc"],"output":[["a",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","inputs":["xyzZ"],"output":[["x",1],["y",1],["z",2]]}]},{"name":"Cracking the Caesar Shift with Brute Force","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-brute-force/parsons.xml","tests":[{"type":"CustomBlockTest","name":"it should find key when starts with a search word","spec":"find key where %'msg' contains %'words'","function":"code breakerhello world2messagemsg
hello2
"},{"name":"it should find key when using multiple search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces15messagemsg
hellowith15
"},{"name":"it should find key when ends with one of many search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces33messagemsg
hellospaces33
"},{"name":"it should return -1 if cannot decode message","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerno hidden words3messagemsg
hellospaces-1
"}]},{"name":"Cracking the Caesar Shift with a Partial Solution","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-partial-soln/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","c"],"output":2},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["A","a"],"output":32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","A"],"output":-32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["5","0"],"output":-5},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":[".","?"],"output":17}]},{"name":"Cyclic Iterator","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/cyclic-iterator/parsons.xml","tests":[{"name":"block should return a function","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1"},{"name":"sequence should start with the first value in the list","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1messagemsg
1
2424
"},{"name":"sequence should remember position","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn797"},{"name":"sequence should restart after reaching the end","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn777"}]},{"name":"Factorial","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/factorial/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[5],"output":120},{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[0],"output":1},{"type":"CustomBlockTest","name":"should compute the factorial of an unknown input","spec":"factorial %'num'","inputs":[7],"output":5040}]},{"name":"FizzBuzz","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/fizz-buzz/template.xml","tests":[{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[1],"output":1},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-39],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[3],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-50],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[5],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-150],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[15],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[0],"output":"fizzbuzz"}]},{"name":"From Infinite Sequences to Finite Lists","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/take-collect-sequences/parsons.xml","tests":[]},{"name":"Greet","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/greet/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"greet %'person'","name":"greet %'person' should start with \"Hello,\"","function":"blockBrian15Hello"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Bob"],"output":"Hello, Bob!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Alice"],"output":"Hello, Alice!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Cliff"],"output":"Hello, Cliff!"}]},{"name":"Intro to Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/intro-infinite-sequences/parsons.xml","tests":[{"name":"sequence should start with 1","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fnmessagemsg
1
"},{"name":"sequence should remember current position","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"},{"name":"sequence should produce counting numbers","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fntrue"},{"name":"two sequences should iterate independently","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"}]},{"name":"Isogram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/isogram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["letter"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["a"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["arraigning"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect first-order isogram","function":"blocksunflower"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect second-order isogram","function":"blockhorseshoer"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect third-order isogram","function":"blockgeggee"}]},{"name":"Leap Year","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/leap-year/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2015],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1970],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1996],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1960],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2100],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1900],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2000],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2400],"output":true}]},{"name":"Luhn Formula","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/luhn-formula/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"single digits cannot be valid","inputs":["8"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid credit card","inputs":["8273 1232 7352 0569"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"text with non digit is invalid","inputs":["059a"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid long number with even remainder","inputs":["1 2345 6789 1234 5678 9012"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with even digits","inputs":["095 245 88"],"output":true},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with odd number of spaces","inputs":["234 567 891 234"],"output":true}]},{"name":"Mapping Over Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/map-sequence/parsons.xml","tests":[{"name":"map should return another sequence","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map2messagemsg
"},{"name":"new sequence should contain transformed values","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map
by threes3i110true
"}]},{"name":"Minesweeper","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/minesweeper/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","*",""],["*","",""],["","*","*"]]],"output":[[2,"*",1],["*",4,3],[2,"*","*"]],"name":"board w/ mine counts on square board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*"],["*",""],["","*"]]],"output":[["*","*"],["*",4],[2,"*"]],"name":"board w/ mine counts on rectangle board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*","*"],["*","","*"],["","*",""]]],"output":[["*","*","*"],["*",6,"*"],[2,"*",2]],"name":"board w/ mine counts on dense board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","","",""],["","","","*"],["","","",""]]],"output":[[0,0,1,1],[0,0,1,"*"],[0,0,1,1]],"name":"board w/ mine counts on sparse board"}]},{"name":"Moving Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/moving-average/parsons.xml","tests":[{"name":"moving average block should return a list","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn1112"},{"name":"moving average should be computed correctly","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn-104176311.666666666666666744.666666666666667"}]},{"name":"Pangram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/pangram/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","inputs":[""],"output":false},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"lowercase pangram","inputs":["abcdefghijklmnopqrstuvwxyz"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"mixed case pangram","inputs":["abcdefghijkLMNOPQRSTUVWXYZ"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"pangram with extra symbols","inputs":["the quick brown fox jumps over a lazy dog!"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"missing a letter","inputs":["abcdefghijkLMNOPQRSTUVWYZ"],"output":false}]},{"name":"Sieve of Eratosthenes","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sieve/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should not consider 1 prime","inputs":[1],"output":[]},{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should find the all primes up to 5","inputs":[5],"output":[2,3,5]},{"type":"CustomBlockTest","name":"should find the all primes up to 30","spec":"factorial %'num'","inputs":[30],"output":[2,3,5,7,11,13,17,19,23,29]}]},{"name":"Sliding Windows","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sliding-windows/template.xml","tests":[]},{"name":"Transposing Music","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/transpose-music/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["78","1"],"output":"79","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["84","-2"],"output":"82","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["36","5"],"output":"41","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["C2","5"],"output":"41","name":"should accept note names (e.g., \"C4\")"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["50","0"],"output":"50","name":"should return original note when transposing by 0"}]},{"name":"Vigenere Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/vigenere/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["how are you?",["1","2","3","4"]],"output":"iqz$bth$zqxC"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["cba",["1","2","3"]],"output":"ddd"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["wow, negative keys?",["-2","-5","-3"]],"output":"ujt*\u001bkcb^rdsc\u001bhctp="},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["what large keys!",["100","200","300"]],"output":"[0\rXh\u0018E:\u0013Ih\u0017IA\u001f\u0005"}]}]}; + const config = {"name":"NetsBlox Exercises","assignments":[{"name":"Acronym","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/acronym/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["I Don't Know"],"output":"IDK"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["President Of The United States"],"output":"POTUS"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Shaking My Head"],"output":"SMH"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Agnetha, Bjorn, Benny, Anni-Frid"],"output":"ABBA"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Zone Improvement Plan"],"output":"ZIP"}]},{"name":"Actor's Birthday","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/actor-birthday/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Keanu Reeves"],"output":"1964-09-02"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Meryl Streep"],"output":"1949-06-22"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Denzel Washington"],"output":"1954-12-28"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Lin-Manuel Miranda"],"output":"1980-01-16"}]},{"name":"Anagram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/anagram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["shepherd","spider"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","ccat"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["olive","ilove"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","CAT"],"output":true}]},{"name":"Atbash Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/atbash/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["abc"],"output":"zyx"},{"name":"should preserve letter case","type":"CustomBlockTest","spec":"encrypt %'message'","function":"iterator fnXYZCBA"},{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["$?! +@"],"output":"$?! +@","name":"should preserve non-letters such as punctuation"}]},{"name":"Between","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/between/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[1,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[3,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,3,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[-6,-5,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[20,-5,5],"output":false}]},{"name":"Bigram Autocomplete","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/bigram-autocomplete/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list","function":"fncatcab"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list with 26 rows","function":"fncatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should contain rows that sum to 100","function":"fn100.5rowcatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return correct probabilities","function":"fn5013catcabchechi"}]},{"name":"Caesar Shift","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/caesar-shift/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["abc",2],"output":"cde"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",100],"output":"()*"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",-50],"output":"\u0012\u0013\u0014"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["with spaces",10],"output":"\u0001s~r*}zkmo}"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["no shift!",0],"output":"no shift!"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["negative wrapping!",-200],"output":"&\u001d\u001f\u0019,!.\u001dX/*\u0019((!&\u001fY"}]},{"name":"Compute the Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average/parsons.xml","tests":[]},{"name":"Compute the Average of a List","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average-list/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","1"]],"output":"1"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","2"]],"output":"1.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["-1","2","4","-3"]],"output":"0.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32"]],"output":-7.4},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32","54"]],"output":2.8333333333333335}]},{"name":"Counting Letter Frequency","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","function":"countabcc11200000000000000000000000"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","function":"counta b ! c26"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","function":"countaAbBcCzZ22200000000000000000000002"}]},{"name":"Counting Letter Frequency as Dictionary","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency-dictionary/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","inputs":["abcc"],"output":[["a",1],["b",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","inputs":["a4cc"],"output":[["a",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","inputs":["xyzZ"],"output":[["x",1],["y",1],["z",2]]}]},{"name":"Cracking the Caesar Shift with Brute Force","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-brute-force/parsons.xml","tests":[{"type":"CustomBlockTest","name":"it should find key when starts with a search word","spec":"find key where %'msg' contains %'words'","function":"code breakerhello world2messagemsg
hello2
"},{"name":"it should find key when using multiple search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces15messagemsg
hellowith15
"},{"name":"it should find key when ends with one of many search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces33messagemsg
hellospaces33
"},{"name":"it should return -1 if cannot decode message","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerno hidden words3messagemsg
hellospaces-1
"}]},{"name":"Cracking the Caesar Shift with a Partial Solution","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-partial-soln/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","c"],"output":2},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["A","a"],"output":32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","A"],"output":-32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["5","0"],"output":-5},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":[".","?"],"output":17}]},{"name":"Cyclic Iterator","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/cyclic-iterator/parsons.xml","tests":[{"name":"block should return a function","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1"},{"name":"sequence should start with the first value in the list","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1messagemsg
1
2424
"},{"name":"sequence should remember position","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn797"},{"name":"sequence should restart after reaching the end","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn777"}]},{"name":"Factorial","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/factorial/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[5],"output":120},{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[0],"output":1},{"type":"CustomBlockTest","name":"should compute the factorial of an unknown input","spec":"factorial %'num'","inputs":[7],"output":5040}]},{"name":"FizzBuzz","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/fizz-buzz/template.xml","tests":[{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[1],"output":1},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-39],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[3],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-50],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[5],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-150],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[15],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[0],"output":"fizzbuzz"}]},{"name":"From Infinite Sequences to Finite Lists","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/take-collect-sequences/parsons.xml","tests":[]},{"name":"Greet","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/greet/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"greet %'person'","name":"greet %'person' should start with \"Hello,\"","function":"blockBrian15Hello"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Bob"],"output":"Hello, Bob!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Alice"],"output":"Hello, Alice!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Cliff"],"output":"Hello, Cliff!"}]},{"name":"Intro to Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/intro-infinite-sequences/parsons.xml","tests":[{"name":"sequence should start with 1","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fnmessagemsg
1
"},{"name":"sequence should remember current position","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"},{"name":"sequence should produce counting numbers","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fntrue"},{"name":"two sequences should iterate independently","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"}]},{"name":"Isogram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/isogram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["letter"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["a"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["arraigning"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect first-order isogram","function":"blocksunflower"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect second-order isogram","function":"blockhorseshoer"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect third-order isogram","function":"blockgeggee"}]},{"name":"Leap Year","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/leap-year/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2015],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1970],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1996],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1960],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2100],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1900],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2000],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2400],"output":true}]},{"name":"Luhn Formula","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/luhn-formula/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"single digits cannot be valid","inputs":["8"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid credit card","inputs":["8273 1232 7352 0569"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"text with non digit is invalid","inputs":["059a"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid long number with even remainder","inputs":["1 2345 6789 1234 5678 9012"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with even digits","inputs":["095 245 88"],"output":true},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with odd number of spaces","inputs":["234 567 891 234"],"output":true}]},{"name":"Mapping Over Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/map-sequence/parsons.xml","tests":[{"name":"map should return another sequence","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map2messagemsg
"},{"name":"new sequence should contain transformed values","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map
by threes3i110true
"}]},{"name":"Minesweeper","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/minesweeper/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","*",""],["*","",""],["","*","*"]]],"output":[[2,"*",1],["*",4,3],[2,"*","*"]],"name":"board w/ mine counts on square board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*"],["*",""],["","*"]]],"output":[["*","*"],["*",4],[2,"*"]],"name":"board w/ mine counts on rectangle board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*","*"],["*","","*"],["","*",""]]],"output":[["*","*","*"],["*",6,"*"],[2,"*",2]],"name":"board w/ mine counts on dense board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","","",""],["","","","*"],["","","",""]]],"output":[[0,0,1,1],[0,0,1,"*"],[0,0,1,1]],"name":"board w/ mine counts on sparse board"}]},{"name":"Moving Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/moving-average/parsons.xml","tests":[{"name":"moving average block should return a list","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn1112"},{"name":"moving average should be computed correctly","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn-104176311.666666666666666744.666666666666667"}]},{"name":"Pangram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/pangram/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","inputs":[""],"output":false},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"lowercase pangram","inputs":["abcdefghijklmnopqrstuvwxyz"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"mixed case pangram","inputs":["abcdefghijkLMNOPQRSTUVWXYZ"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"pangram with extra symbols","inputs":["the quick brown fox jumps over a lazy dog!"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"missing a letter","inputs":["abcdefghijkLMNOPQRSTUVWYZ"],"output":false}]},{"name":"Sieve of Eratosthenes","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sieve/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should not consider 1 prime","inputs":[1],"output":[]},{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should find the all primes up to 5","inputs":[5],"output":[2,3,5]},{"type":"CustomBlockTest","name":"should find the all primes up to 30","spec":"factorial %'num'","inputs":[30],"output":[2,3,5,7,11,13,17,19,23,29]}]},{"name":"Sliding Windows","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sliding-windows/template.xml","tests":[]},{"name":"Transposing Music","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/transpose-music/template.xml","tests":[{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["78","1"],"output":"79","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["84","-2"],"output":"82","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["36","5"],"output":"41","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["C2","5"],"output":"41","name":"should accept note names (e.g., \"C4\")"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["50","0"],"output":"50","name":"should return original note when transposing by 0"}]},{"name":"Vigenere Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/vigenere/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["how are you?",["1","2","3","4"]],"output":"iqz$bth$zqxC"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["cba",["1","2","3"]],"output":"ddd"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["wow, negative keys?",["-2","-5","-3"]],"output":"ujt*\u001bkcb^rdsc\u001bhctp="},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["what large keys!",["100","200","300"]],"output":"[0\rXh\u0018E:\u0013Ih\u0017IA\u001f\u0005"}]}]}; const [ide] = world.children; class CustomBlockAutograder extends Extension { diff --git a/docs/autograders/vigenere.js b/docs/autograders/vigenere.js index 6b8ddb3..31d252d 100644 --- a/docs/autograders/vigenere.js +++ b/docs/autograders/vigenere.js @@ -2,7 +2,7 @@ ScrollFrameMorph, nop, HandleMorph, List, Extension, ToggleMorph, BlockMorph, Color, SpriteMorph, localize, TextMorph, MorphicPreferences, WHITE*/ (function() { - const config = {"name":"NetsBlox Exercises","assignments":[{"name":"Acronym","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/acronym/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["I Don't Know"],"output":"IDK"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["President Of The United States"],"output":"POTUS"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Shaking My Head"],"output":"SMH"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Agnetha, Bjorn, Benny, Anni-Frid"],"output":"ABBA"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Zone Improvement Plan"],"output":"ZIP"}]},{"name":"Actor's Birthday","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/actor-birthday/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Keanu Reeves"],"output":"1964-09-02"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Meryl Streep"],"output":"1949-06-22"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Denzel Washington"],"output":"1954-12-28"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Lin-Manuel Miranda"],"output":"1980-01-16"}]},{"name":"Anagram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/anagram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["shepherd","spider"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","ccat"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["olive","ilove"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","CAT"],"output":true}]},{"name":"Atbash Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/atbash/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["abc"],"output":"zyx"},{"name":"should preserve letter case","type":"CustomBlockTest","spec":"encrypt %'message'","function":"iterator fnXYZCBA"},{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["$?! +@"],"output":"$?! +@","name":"should preserve non-letters such as punctuation"}]},{"name":"Between","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/between/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[1,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[3,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,3,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[-6,-5,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[20,-5,5],"output":false}]},{"name":"Bigram Autocomplete","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/bigram-autocomplete/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list","function":"fncatcab"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list with 26 rows","function":"fncatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should contain rows that sum to 100","function":"fn100.5rowcatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return correct probabilities","function":"fn5013catcabchechi"}]},{"name":"Caesar Shift","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/caesar-shift/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["abc",2],"output":"cde"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",100],"output":"()*"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",-50],"output":"\u0012\u0013\u0014"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["with spaces",10],"output":"\u0001s~r*}zkmo}"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["no shift!",0],"output":"no shift!"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["negative wrapping!",-200],"output":"&\u001d\u001f\u0019,!.\u001dX/*\u0019((!&\u001fY"}]},{"name":"Compute the Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average/parsons.xml","tests":[]},{"name":"Compute the Average of a List","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average-list/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","1"]],"output":"1"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","2"]],"output":"1.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["-1","2","4","-3"]],"output":"0.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32"]],"output":-7.4},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32","54"]],"output":2.8333333333333335}]},{"name":"Counting Letter Frequency","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","function":"countabcc11200000000000000000000000"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","function":"counta b ! c26"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","function":"countaAbBcCzZ22200000000000000000000002"}]},{"name":"Counting Letter Frequency as Dictionary","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency-dictionary/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","inputs":["abcc"],"output":[["a",1],["b",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","inputs":["a4cc"],"output":[["a",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","inputs":["xyzZ"],"output":[["x",1],["y",1],["z",2]]}]},{"name":"Cracking the Caesar Shift with Brute Force","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-brute-force/parsons.xml","tests":[{"type":"CustomBlockTest","name":"it should find key when starts with a search word","spec":"find key where %'msg' contains %'words'","function":"code breakerhello world2messagemsg
hello2
"},{"name":"it should find key when using multiple search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces15messagemsg
hellowith15
"},{"name":"it should find key when ends with one of many search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces33messagemsg
hellospaces33
"},{"name":"it should return -1 if cannot decode message","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerno hidden words3messagemsg
hellospaces-1
"}]},{"name":"Cracking the Caesar Shift with a Partial Solution","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-partial-soln/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","c"],"output":2},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["A","a"],"output":32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","A"],"output":-32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["5","0"],"output":-5},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":[".","?"],"output":17}]},{"name":"Cyclic Iterator","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/cyclic-iterator/parsons.xml","tests":[{"name":"block should return a function","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1"},{"name":"sequence should start with the first value in the list","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1messagemsg
1
2424
"},{"name":"sequence should remember position","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn797"},{"name":"sequence should restart after reaching the end","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn777"}]},{"name":"Factorial","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/factorial/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[5],"output":120},{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[0],"output":1},{"type":"CustomBlockTest","name":"should compute the factorial of an unknown input","spec":"factorial %'num'","inputs":[7],"output":5040}]},{"name":"FizzBuzz","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/fizz-buzz/template.xml","tests":[{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[1],"output":1},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-39],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[3],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-50],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[5],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-150],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[15],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[0],"output":"fizzbuzz"}]},{"name":"From Infinite Sequences to Finite Lists","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/take-collect-sequences/parsons.xml","tests":[]},{"name":"Greet","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/greet/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"greet %'person'","name":"greet %'person' should start with \"Hello,\"","function":"blockBrian15Hello"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Bob"],"output":"Hello, Bob!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Alice"],"output":"Hello, Alice!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Cliff"],"output":"Hello, Cliff!"}]},{"name":"Intro to Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/intro-infinite-sequences/parsons.xml","tests":[{"name":"sequence should start with 1","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fnmessagemsg
1
"},{"name":"sequence should remember current position","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"},{"name":"sequence should produce counting numbers","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fntrue"},{"name":"two sequences should iterate independently","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"}]},{"name":"Isogram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/isogram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["letter"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["a"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["arraigning"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect first-order isogram","function":"blocksunflower"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect second-order isogram","function":"blockhorseshoer"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect third-order isogram","function":"blockgeggee"}]},{"name":"Leap Year","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/leap-year/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2015],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1970],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1996],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1960],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2100],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1900],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2000],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2400],"output":true}]},{"name":"Luhn Formula","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/luhn-formula/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"single digits cannot be valid","inputs":["8"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid credit card","inputs":["8273 1232 7352 0569"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"text with non digit is invalid","inputs":["059a"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid long number with even remainder","inputs":["1 2345 6789 1234 5678 9012"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with even digits","inputs":["095 245 88"],"output":true},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with odd number of spaces","inputs":["234 567 891 234"],"output":true}]},{"name":"Mapping Over Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/map-sequence/parsons.xml","tests":[{"name":"map should return another sequence","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map2messagemsg
"},{"name":"new sequence should contain transformed values","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map
by threes3i110true
"}]},{"name":"Minesweeper","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/minesweeper/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","*",""],["*","",""],["","*","*"]]],"output":[[2,"*",1],["*",4,3],[2,"*","*"]],"name":"board w/ mine counts on square board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*"],["*",""],["","*"]]],"output":[["*","*"],["*",4],[2,"*"]],"name":"board w/ mine counts on rectangle board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*","*"],["*","","*"],["","*",""]]],"output":[["*","*","*"],["*",6,"*"],[2,"*",2]],"name":"board w/ mine counts on dense board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","","",""],["","","","*"],["","","",""]]],"output":[[0,0,1,1],[0,0,1,"*"],[0,0,1,1]],"name":"board w/ mine counts on sparse board"}]},{"name":"Moving Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/moving-average/parsons.xml","tests":[{"name":"moving average block should return a list","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn1112"},{"name":"moving average should be computed correctly","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn-104176311.666666666666666744.666666666666667"}]},{"name":"Pangram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/pangram/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","inputs":[""],"output":false},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"lowercase pangram","inputs":["abcdefghijklmnopqrstuvwxyz"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"mixed case pangram","inputs":["abcdefghijkLMNOPQRSTUVWXYZ"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"pangram with extra symbols","inputs":["the quick brown fox jumps over a lazy dog!"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"missing a letter","inputs":["abcdefghijkLMNOPQRSTUVWYZ"],"output":false}]},{"name":"Sieve of Eratosthenes","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sieve/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should not consider 1 prime","inputs":[1],"output":[]},{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should find the all primes up to 5","inputs":[5],"output":[2,3,5]},{"type":"CustomBlockTest","name":"should find the all primes up to 30","spec":"factorial %'num'","inputs":[30],"output":[2,3,5,7,11,13,17,19,23,29]}]},{"name":"Sliding Windows","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sliding-windows/template.xml","tests":[]},{"name":"Transposing Music","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/transpose-music/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["78","1"],"output":"79","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["84","-2"],"output":"82","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["36","5"],"output":"41","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["C2","5"],"output":"41","name":"should accept note names (e.g., \"C4\")"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["50","0"],"output":"50","name":"should return original note when transposing by 0"}]},{"name":"Vigenere Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/vigenere/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["how are you?",["1","2","3","4"]],"output":"iqz$bth$zqxC"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["cba",["1","2","3"]],"output":"ddd"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["wow, negative keys?",["-2","-5","-3"]],"output":"ujt*\u001bkcb^rdsc\u001bhctp="},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["what large keys!",["100","200","300"]],"output":"[0\rXh\u0018E:\u0013Ih\u0017IA\u001f\u0005"}]}]}; + const config = {"name":"NetsBlox Exercises","assignments":[{"name":"Acronym","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/acronym/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["I Don't Know"],"output":"IDK"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["President Of The United States"],"output":"POTUS"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Shaking My Head"],"output":"SMH"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Agnetha, Bjorn, Benny, Anni-Frid"],"output":"ABBA"},{"type":"CustomBlockTest","spec":"acronym for %'phrase'","inputs":["Zone Improvement Plan"],"output":"ZIP"}]},{"name":"Actor's Birthday","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/actor-birthday/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Keanu Reeves"],"output":"1964-09-02"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Meryl Streep"],"output":"1949-06-22"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Denzel Washington"],"output":"1954-12-28"},{"type":"CustomBlockTest","spec":"birthday of %'actor'","inputs":["Lin-Manuel Miranda"],"output":"1980-01-16"}]},{"name":"Anagram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/anagram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["shepherd","spider"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","ccat"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["olive","ilove"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an anagram of %'other'","inputs":["cat","CAT"],"output":true}]},{"name":"Atbash Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/atbash/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["abc"],"output":"zyx"},{"name":"should preserve letter case","type":"CustomBlockTest","spec":"encrypt %'message'","function":"iterator fnXYZCBA"},{"type":"CustomBlockTest","spec":"encrypt %'message'","inputs":["$?! +@"],"output":"$?! +@","name":"should preserve non-letters such as punctuation"}]},{"name":"Between","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/between/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[1,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[3,1,3],"output":true},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[2,3,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[-6,-5,5],"output":false},{"type":"CustomBlockTest","spec":"is %'number' between %'lower' and %'upper'","inputs":[20,-5,5],"output":false}]},{"name":"Bigram Autocomplete","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/bigram-autocomplete/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list","function":"fncatcab"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return a list with 26 rows","function":"fncatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should contain rows that sum to 100","function":"fn100.5rowcatcab26"},{"type":"CustomBlockTest","spec":"build bigram model from %'words'","name":"build bigram model from %'words' should return correct probabilities","function":"fn5013catcabchechi"}]},{"name":"Caesar Shift","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/caesar-shift/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["abc",2],"output":"cde"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",100],"output":"()*"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["DEF",-50],"output":"\u0012\u0013\u0014"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["with spaces",10],"output":"\u0001s~r*}zkmo}"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["no shift!",0],"output":"no shift!"},{"type":"CustomBlockTest","spec":"shift %'text' by %'amount'","inputs":["negative wrapping!",-200],"output":"&\u001d\u001f\u0019,!.\u001dX/*\u0019((!&\u001fY"}]},{"name":"Compute the Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average/parsons.xml","tests":[]},{"name":"Compute the Average of a List","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/average-list/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","1"]],"output":"1"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["1","2"]],"output":"1.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["-1","2","4","-3"]],"output":"0.5"},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32"]],"output":-7.4},{"type":"CustomBlockTest","spec":"average %'list'","inputs":[["35","-97","12","-19","32","54"]],"output":2.8333333333333335}]},{"name":"Counting Letter Frequency","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","function":"countabcc11200000000000000000000000"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","function":"counta b ! c26"},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","function":"countaAbBcCzZ22200000000000000000000002"}]},{"name":"Counting Letter Frequency as Dictionary","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/letter-frequency-dictionary/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should count letters in \"abcc\"","inputs":["abcc"],"output":[["a",1],["b",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should skip non-alphabetic characters","inputs":["a4cc"],"output":[["a",1],["c",2]]},{"type":"CustomBlockTest","spec":"count letters in %'doc'","name":"count letters in %'doc' should treat upper and lowercase as the same","inputs":["xyzZ"],"output":[["x",1],["y",1],["z",2]]}]},{"name":"Cracking the Caesar Shift with Brute Force","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-brute-force/parsons.xml","tests":[{"type":"CustomBlockTest","name":"it should find key when starts with a search word","spec":"find key where %'msg' contains %'words'","function":"code breakerhello world2messagemsg
hello2
"},{"name":"it should find key when using multiple search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces15messagemsg
hellowith15
"},{"name":"it should find key when ends with one of many search words","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerwith spaces33messagemsg
hellospaces33
"},{"name":"it should return -1 if cannot decode message","type":"CustomBlockTest","spec":"find key where %'msg' contains %'words'","function":"code breakerno hidden words3messagemsg
hellospaces-1
"}]},{"name":"Cracking the Caesar Shift with a Partial Solution","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/crack-caesar-partial-soln/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","c"],"output":2},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["A","a"],"output":32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["a","A"],"output":-32},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":["5","0"],"output":-5},{"type":"CustomBlockTest","spec":"shift amount from %'letter' to %'encrypted letter'","inputs":[".","?"],"output":17}]},{"name":"Cyclic Iterator","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/cyclic-iterator/parsons.xml","tests":[{"name":"block should return a function","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1"},{"name":"sequence should start with the first value in the list","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn1messagemsg
1
2424
"},{"name":"sequence should remember position","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn797"},{"name":"sequence should restart after reaching the end","type":"CustomBlockTest","spec":"cycle %'list'","function":"iterator fn777"}]},{"name":"Factorial","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/factorial/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[5],"output":120},{"type":"CustomBlockTest","spec":"factorial %'num'","inputs":[0],"output":1},{"type":"CustomBlockTest","name":"should compute the factorial of an unknown input","spec":"factorial %'num'","inputs":[7],"output":5040}]},{"name":"FizzBuzz","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/fizz-buzz/template.xml","tests":[{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[1],"output":1},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-39],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[3],"output":"fizz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-50],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[5],"output":"buzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[-150],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[15],"output":"fizzbuzz"},{"type":"CustomBlockTest","spec":"fizz buzz %'number'","inputs":[0],"output":"fizzbuzz"}]},{"name":"From Infinite Sequences to Finite Lists","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/take-collect-sequences/parsons.xml","tests":[]},{"name":"Greet","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/greet/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"greet %'person'","name":"greet %'person' should start with \"Hello,\"","function":"blockBrian15Hello"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Bob"],"output":"Hello, Bob!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Alice"],"output":"Hello, Alice!"},{"type":"CustomBlockTest","spec":"greet %'person'","inputs":["Cliff"],"output":"Hello, Cliff!"}]},{"name":"Intro to Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/intro-infinite-sequences/parsons.xml","tests":[{"name":"sequence should start with 1","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fnmessagemsg
1
"},{"name":"sequence should remember current position","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"},{"name":"sequence should produce counting numbers","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fntrue"},{"name":"two sequences should iterate independently","type":"CustomBlockTest","spec":"counting numbers","function":"iterator fn"}]},{"name":"Isogram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/isogram/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["letter"],"output":false},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["a"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","inputs":["arraigning"],"output":true},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect first-order isogram","function":"blocksunflower"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect second-order isogram","function":"blockhorseshoer"},{"type":"CustomBlockTest","spec":"is %'word' an isogram?","name":"is %'word' an isogram? should detect third-order isogram","function":"blockgeggee"}]},{"name":"Leap Year","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/leap-year/template.xml","tests":[{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2015],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1970],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1996],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1960],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2100],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[1900],"output":false},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2000],"output":true},{"type":"CustomBlockTest","spec":"is %'year' a leap year?","inputs":[2400],"output":true}]},{"name":"Luhn Formula","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/luhn-formula/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"single digits cannot be valid","inputs":["8"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid credit card","inputs":["8273 1232 7352 0569"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"text with non digit is invalid","inputs":["059a"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"invalid long number with even remainder","inputs":["1 2345 6789 1234 5678 9012"],"output":false},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with even digits","inputs":["095 245 88"],"output":true},{"type":"CustomBlockTest","spec":"is %'text' valid?","name":"valid number with odd number of spaces","inputs":["234 567 891 234"],"output":true}]},{"name":"Mapping Over Infinite Sequences","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/map-sequence/parsons.xml","tests":[{"name":"map should return another sequence","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map2messagemsg
"},{"name":"new sequence should contain transformed values","type":"CustomBlockTest","spec":"map %'fn' over sequence %'iter'","function":"map
by threes3i110true
"}]},{"name":"Minesweeper","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/minesweeper/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","*",""],["*","",""],["","*","*"]]],"output":[[2,"*",1],["*",4,3],[2,"*","*"]],"name":"board w/ mine counts on square board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*"],["*",""],["","*"]]],"output":[["*","*"],["*",4],[2,"*"]],"name":"board w/ mine counts on rectangle board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["*","*","*"],["*","","*"],["","*",""]]],"output":[["*","*","*"],["*",6,"*"],[2,"*",2]],"name":"board w/ mine counts on dense board"},{"type":"CustomBlockTest","spec":"%'board' with mine counts","inputs":[[["","","",""],["","","","*"],["","","",""]]],"output":[[0,0,1,1],[0,0,1,"*"],[0,0,1,1]],"name":"board w/ mine counts on sparse board"}]},{"name":"Moving Average","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/moving-average/parsons.xml","tests":[{"name":"moving average block should return a list","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn1112"},{"name":"moving average should be computed correctly","type":"CustomBlockTest","spec":"moving average %'data' %'n'","function":"fn-104176311.666666666666666744.666666666666667"}]},{"name":"Pangram","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/pangram/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","inputs":[""],"output":false},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"lowercase pangram","inputs":["abcdefghijklmnopqrstuvwxyz"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"mixed case pangram","inputs":["abcdefghijkLMNOPQRSTUVWXYZ"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"pangram with extra symbols","inputs":["the quick brown fox jumps over a lazy dog!"],"output":true},{"type":"CustomBlockTest","spec":"is %'limit' a pangram?","name":"missing a letter","inputs":["abcdefghijkLMNOPQRSTUVWYZ"],"output":false}]},{"name":"Sieve of Eratosthenes","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sieve/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should not consider 1 prime","inputs":[1],"output":[]},{"type":"CustomBlockTest","spec":"primes up to %'limit'","name":"should find the all primes up to 5","inputs":[5],"output":[2,3,5]},{"type":"CustomBlockTest","name":"should find the all primes up to 30","spec":"factorial %'num'","inputs":[30],"output":[2,3,5,7,11,13,17,19,23,29]}]},{"name":"Sliding Windows","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/sliding-windows/template.xml","tests":[]},{"name":"Transposing Music","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/transpose-music/template.xml","tests":[{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["78","1"],"output":"79","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["84","-2"],"output":"82","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["36","5"],"output":"41","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["C2","5"],"output":"41","name":"should accept note names (e.g., \"C4\")"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["50","0"],"output":"50","name":"should return original note when transposing by 0"}]},{"name":"Vigenere Cipher","starter template":"https://raw.githubusercontent.com/NetsBlox/exercises/master/exercises/vigenere/parsons.xml","tests":[{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["how are you?",["1","2","3","4"]],"output":"iqz$bth$zqxC"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["cba",["1","2","3"]],"output":"ddd"},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["wow, negative keys?",["-2","-5","-3"]],"output":"ujt*\u001bkcb^rdsc\u001bhctp="},{"type":"CustomBlockTest","spec":"encrypt %'message' with %'keys'","inputs":["what large keys!",["100","200","300"]],"output":"[0\rXh\u0018E:\u0013Ih\u0017IA\u001f\u0005"}]}]}; const [ide] = world.children; class CustomBlockAutograder extends Extension { diff --git a/docs/create.html b/docs/create.html index 9729070..1d868c6 100644 --- a/docs/create.html +++ b/docs/create.html @@ -23,15 +23,15 @@ - + - + - - + +
@@ -63,7 +63,7 @@