From a5ffb3d4aa57992801dcd62e47a041f13a1cb2fa Mon Sep 17 00:00:00 2001 From: Build Bot Date: Wed, 24 Jan 2024 19:39:45 +0000 Subject: [PATCH] Build GitHub Pages --- docs/autograders/acronym.js | 2 +- docs/autograders/actor-birthday.js | 2 +- docs/autograders/anagram.js | 2 +- docs/autograders/atbash.js | 2 +- docs/autograders/average-list.js | 2 +- docs/autograders/average.js | 2 +- docs/autograders/between.js | 2 +- docs/autograders/bigram-autocomplete.js | 2 +- docs/autograders/caesar-shift.js | 2 +- docs/autograders/crack-caesar-brute-force.js | 2 +- docs/autograders/crack-caesar-partial-soln.js | 2 +- docs/autograders/cyclic-iterator.js | 2 +- docs/autograders/factorial.js | 2 +- docs/autograders/fizz-buzz.js | 2 +- docs/autograders/greet.js | 2 +- docs/autograders/intro-infinite-sequences.js | 2 +- docs/autograders/isogram.js | 2 +- docs/autograders/leap-year.js | 2 +- docs/autograders/letter-frequency-dictionary.js | 2 +- docs/autograders/letter-frequency.js | 2 +- docs/autograders/luhn-formula.js | 2 +- docs/autograders/map-sequence.js | 2 +- docs/autograders/minesweeper.js | 2 +- docs/autograders/moving-average.js | 2 +- docs/autograders/pangram.js | 2 +- docs/autograders/sieve.js | 2 +- docs/autograders/sliding-windows.js | 2 +- docs/autograders/take-collect-sequences.js | 2 +- docs/autograders/transpose-music.js | 2 +- docs/autograders/vigenere.js | 2 +- 30 files changed, 30 insertions(+), 30 deletions(-) diff --git a/docs/autograders/acronym.js b/docs/autograders/acronym.js index dcb6fd7..482ecf0 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":["54","1"],"output":"55","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","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/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 [ide] = world.children; class CustomBlockAutograder extends Extension { diff --git a/docs/autograders/actor-birthday.js b/docs/autograders/actor-birthday.js index 8cecc21..11e2cd7 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":["54","1"],"output":"55","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","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/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 [ide] = world.children; class CustomBlockAutograder extends Extension { diff --git a/docs/autograders/anagram.js b/docs/autograders/anagram.js index a0c38a2..396e321 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":["54","1"],"output":"55","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","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/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 [ide] = world.children; class CustomBlockAutograder extends Extension { diff --git a/docs/autograders/atbash.js b/docs/autograders/atbash.js index 01669b0..2a31539 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":["54","1"],"output":"55","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","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/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 [ide] = world.children; class CustomBlockAutograder extends Extension { diff --git a/docs/autograders/average-list.js b/docs/autograders/average-list.js index 8d97300..46e98cb 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":["54","1"],"output":"55","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","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/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 [ide] = world.children; class CustomBlockAutograder extends Extension { diff --git a/docs/autograders/average.js b/docs/autograders/average.js index e4eb9ae..7c04a01 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":["54","1"],"output":"55","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","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/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 [ide] = world.children; class CustomBlockAutograder extends Extension { diff --git a/docs/autograders/between.js b/docs/autograders/between.js index 803c1b9..40ca331 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":["54","1"],"output":"55","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","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/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 [ide] = world.children; class CustomBlockAutograder extends Extension { diff --git a/docs/autograders/bigram-autocomplete.js b/docs/autograders/bigram-autocomplete.js index 58b519a..7fa6f7d 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":["54","1"],"output":"55","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","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/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 [ide] = world.children; class CustomBlockAutograder extends Extension { diff --git a/docs/autograders/caesar-shift.js b/docs/autograders/caesar-shift.js index d1023f3..c66c606 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":["54","1"],"output":"55","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","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/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 [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 7bf88d7..3b8786e 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":["54","1"],"output":"55","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","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/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 [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 e21ed07..3b00d1f 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":["54","1"],"output":"55","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","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/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 [ide] = world.children; class CustomBlockAutograder extends Extension { diff --git a/docs/autograders/cyclic-iterator.js b/docs/autograders/cyclic-iterator.js index 1f7c3bf..550e2cb 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":["54","1"],"output":"55","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","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/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 [ide] = world.children; class CustomBlockAutograder extends Extension { diff --git a/docs/autograders/factorial.js b/docs/autograders/factorial.js index e502a82..5d48cf2 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":["54","1"],"output":"55","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","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/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 [ide] = world.children; class CustomBlockAutograder extends Extension { diff --git a/docs/autograders/fizz-buzz.js b/docs/autograders/fizz-buzz.js index 4f5f7a7..73a8d4f 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":["54","1"],"output":"55","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","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/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 [ide] = world.children; class CustomBlockAutograder extends Extension { diff --git a/docs/autograders/greet.js b/docs/autograders/greet.js index 810d047..d1ec520 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":["54","1"],"output":"55","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","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/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 [ide] = world.children; class CustomBlockAutograder extends Extension { diff --git a/docs/autograders/intro-infinite-sequences.js b/docs/autograders/intro-infinite-sequences.js index 4111b54..3b2f8e4 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":["54","1"],"output":"55","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","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/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 [ide] = world.children; class CustomBlockAutograder extends Extension { diff --git a/docs/autograders/isogram.js b/docs/autograders/isogram.js index 0a90d8b..1f7b749 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":["54","1"],"output":"55","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","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/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 [ide] = world.children; class CustomBlockAutograder extends Extension { diff --git a/docs/autograders/leap-year.js b/docs/autograders/leap-year.js index c25d95b..5b48e75 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":["54","1"],"output":"55","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","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/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 [ide] = world.children; class CustomBlockAutograder extends Extension { diff --git a/docs/autograders/letter-frequency-dictionary.js b/docs/autograders/letter-frequency-dictionary.js index cf83860..c09e7a5 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":["54","1"],"output":"55","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","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/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 [ide] = world.children; class CustomBlockAutograder extends Extension { diff --git a/docs/autograders/letter-frequency.js b/docs/autograders/letter-frequency.js index e12132f..b2420c9 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":["54","1"],"output":"55","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","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/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 [ide] = world.children; class CustomBlockAutograder extends Extension { diff --git a/docs/autograders/luhn-formula.js b/docs/autograders/luhn-formula.js index 4b03386..ce4d623 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":["54","1"],"output":"55","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","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/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 [ide] = world.children; class CustomBlockAutograder extends Extension { diff --git a/docs/autograders/map-sequence.js b/docs/autograders/map-sequence.js index 08da954..3dc01cc 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":["54","1"],"output":"55","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","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/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 [ide] = world.children; class CustomBlockAutograder extends Extension { diff --git a/docs/autograders/minesweeper.js b/docs/autograders/minesweeper.js index 8717dcf..c14024c 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":["54","1"],"output":"55","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","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/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 [ide] = world.children; class CustomBlockAutograder extends Extension { diff --git a/docs/autograders/moving-average.js b/docs/autograders/moving-average.js index f34af02..f7ce1b5 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":["54","1"],"output":"55","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","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/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 [ide] = world.children; class CustomBlockAutograder extends Extension { diff --git a/docs/autograders/pangram.js b/docs/autograders/pangram.js index f808f09..50d69a2 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":["54","1"],"output":"55","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","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/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 [ide] = world.children; class CustomBlockAutograder extends Extension { diff --git a/docs/autograders/sieve.js b/docs/autograders/sieve.js index 5cc528c..78ff46a 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":["54","1"],"output":"55","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","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/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 [ide] = world.children; class CustomBlockAutograder extends Extension { diff --git a/docs/autograders/sliding-windows.js b/docs/autograders/sliding-windows.js index d85b6fa..5956428 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":["54","1"],"output":"55","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","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/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 [ide] = world.children; class CustomBlockAutograder extends Extension { diff --git a/docs/autograders/take-collect-sequences.js b/docs/autograders/take-collect-sequences.js index fe70c16..339377f 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":["54","1"],"output":"55","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","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/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 [ide] = world.children; class CustomBlockAutograder extends Extension { diff --git a/docs/autograders/transpose-music.js b/docs/autograders/transpose-music.js index 5c93886..174f966 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":["54","1"],"output":"55","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","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/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 [ide] = world.children; class CustomBlockAutograder extends Extension { diff --git a/docs/autograders/vigenere.js b/docs/autograders/vigenere.js index 2307d6f..6b8ddb3 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":["54","1"],"output":"55","name":"should return G when transposing F# by 1"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","name":"should return A# when transposing C by -2"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","name":"should return F when transposing C by 5"},{"type":"CustomBlockTest","spec":"transpose %'note' by %'steps' steps","inputs":["54","1"],"output":"55","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/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 [ide] = world.children; class CustomBlockAutograder extends Extension {