From a0ae8a155af565f6c69a874d20dae79b53490621 Mon Sep 17 00:00:00 2001 From: colinleach Date: Thu, 12 Sep 2024 16:16:20 -0700 Subject: [PATCH 1/4] Sort practice exercises by difficulty (#785) --- config.json | 838 ++++++++++++++++++++++++++-------------------------- 1 file changed, 419 insertions(+), 419 deletions(-) diff --git a/config.json b/config.json index 8a1bee8d..6407f535 100644 --- a/config.json +++ b/config.json @@ -59,19 +59,6 @@ "strings" ] }, - { - "slug": "killer-sudoku-helper", - "name": "Killer Sudoku Helper", - "uuid": "e0142403-af9e-406e-827a-1fd37187d1ea", - "practices": [], - "prerequisites": [], - "difficulty": 5, - "topics": [ - "iterator-protocol", - "vectors", - "conditionals" - ] - }, { "slug": "leap", "name": "Leap", @@ -85,14 +72,6 @@ "integers" ] }, - { - "slug": "pig-latin", - "name": "Pig Latin", - "uuid": "3c53b207-ffcb-4111-ba3e-3aece095e268", - "practices": [], - "prerequisites": [], - "difficulty": 2 - }, { "slug": "nucleotide-count", "name": "Nucleotide Count", @@ -119,19 +98,6 @@ "strings" ] }, - { - "slug": "rotational-cipher", - "name": "Rotational Cipher", - "uuid": "79ea05f1-3f27-4b92-bc47-0cebcd8d5a6f", - "practices": [], - "prerequisites": [], - "difficulty": 2, - "topics": [ - "metaprogramming", - "string_literals", - "strings" - ] - }, { "slug": "difference-of-squares", "name": "Difference of Squares", @@ -157,44 +123,6 @@ "strings" ] }, - { - "slug": "secret-handshake", - "name": "Secret Handshake", - "uuid": "d2c85375-c0e7-4e04-88f1-08736e5afa04", - "practices": [], - "prerequisites": [], - "difficulty": 2, - "topics": [ - "arrays", - "filtering" - ] - }, - { - "slug": "clock", - "name": "Clock", - "uuid": "39bc1f1e-68e3-4d35-880b-d6b6fa174605", - "practices": [], - "prerequisites": [], - "difficulty": 5, - "topics": [ - "time", - "multiple_dispatch", - "structs" - ] - }, - { - "slug": "robot-name", - "name": "Robot Name", - "uuid": "7cb2d96a-4707-4cec-9ead-313fcb5fbb94", - "practices": [], - "prerequisites": [], - "difficulty": 5, - "topics": [ - "randomness", - "strings", - "structs" - ] - }, { "slug": "darts", "name": "Darts", @@ -274,39 +202,6 @@ "strings" ] }, - { - "slug": "etl", - "name": "ETL", - "uuid": "bccc00fa-811c-4bf9-8e55-07a0d0affb08", - "practices": [], - "prerequisites": [], - "difficulty": 2, - "topics": [ - "arrays", - "sorting", - "strings" - ] - }, - { - "slug": "reverse-string", - "name": "Reverse String", - "uuid": "e73f19f7-17bc-4d51-a00a-c2b58c1fa8e6", - "practices": [], - "prerequisites": [], - "difficulty": 3, - "topics": [ - "generics", - "loops", - "variables", - "strings", - "integers", - "lists", - "arrays", - "text_formatting", - "data_structures", - "functional_programming" - ] - }, { "slug": "allergies", "name": "Allergies", @@ -339,52 +234,6 @@ "strings" ] }, - { - "slug": "anagram", - "name": "Anagram", - "uuid": "d2cb1621-2a2e-4791-a6b6-fdbca74a5583", - "practices": [], - "prerequisites": [], - "difficulty": 2, - "topics": [ - "arrays", - "loops", - "filtering", - "sorting", - "strings" - ] - }, - { - "slug": "minesweeper", - "name": "Minesweeper", - "uuid": "9a47bffd-4dd2-48ce-b47b-753271305966", - "practices": [], - "prerequisites": [], - "difficulty": 2, - "topics": [ - "loops", - "conditionals", - "variables", - "strings", - "integers", - "lists", - "booleans", - "arrays", - "text_formatting" - ] - }, - { - "slug": "binary-search", - "name": "Binary Search", - "uuid": "325385bb-2a70-4c7a-8b4e-e6297fc69872", - "practices": [], - "prerequisites": [], - "difficulty": 3, - "topics": [ - "arrays", - "searching" - ] - }, { "slug": "atbash-cipher", "name": "Atbash Cipher", @@ -423,34 +272,6 @@ "math" ] }, - { - "slug": "collatz-conjecture", - "name": "Collatz Conjecture", - "uuid": "d1d5a74a-d488-4e2e-bd63-b74730057c98", - "practices": [], - "prerequisites": [], - "difficulty": 2, - "topics": [ - "exception_handling", - "conditionals", - "math" - ] - }, - { - "slug": "sieve", - "name": "Sieve", - "uuid": "5e3b376a-06ab-442f-8d18-710db7778db6", - "practices": [], - "prerequisites": [], - "difficulty": 2, - "topics": [ - "arrays", - "conditionals", - "loops", - "filtering", - "math" - ] - }, { "slug": "luhn", "name": "Luhn", @@ -477,205 +298,241 @@ ] }, { - "slug": "protein-translation", - "name": "Protein Translation", - "uuid": "ef95ea34-cc9e-48aa-b2f9-6226134a3644", + "slug": "acronym", + "name": "Acronym", + "uuid": "929493e2-56b2-41d7-aedc-7cc4831078ba", "practices": [], "prerequisites": [], - "difficulty": 2 + "difficulty": 1, + "topics": [ + "arrays", + "loops", + "strings" + ] }, { - "slug": "isbn-verifier", - "name": "ISBN Verifier", - "uuid": "22b64a2b-7f08-444d-be6e-8b42e5c9207c", + "slug": "armstrong-numbers", + "name": "Armstrong Numbers", + "uuid": "af4ae5d7-8d9d-4d21-b5d3-62f4fd8b4719", "practices": [], "prerequisites": [], - "difficulty": 5, + "difficulty": 1, "topics": [ "math", - "conditionals", - "metaprogramming", - "strings", - "structs" + "integers" ] }, { - "slug": "trinary", - "name": "Trinary", - "uuid": "c09ed7ec-fa7c-4f6a-994f-3d3eb7f22df4", + "slug": "gigasecond", + "name": "Gigasecond", + "uuid": "c64e03cc-1952-4b2d-9a53-25c43187a4e6", "practices": [], "prerequisites": [], - "difficulty": 2, + "difficulty": 1, "topics": [ - "arrays", - "integers", - "math", - "strings" + "dates" ] }, { - "slug": "custom-set", - "name": "Custom Set", - "uuid": "b47377f7-84af-4a10-83ef-c2444a4f8940", + "slug": "phone-number", + "name": "Phone Number", + "uuid": "f7a3f344-a9fa-4a36-ac44-12bc8673899e", "practices": [], "prerequisites": [], - "difficulty": 8, + "difficulty": 1, "topics": [ - "iterators", - "multiple_dispatch", - "structs" + "conditionals", + "pattern_matching", + "regular_expressions", + "strings" ] }, { - "slug": "rational-numbers", - "name": "Rational Numbers", - "uuid": "0caf0209-be6e-4585-a90b-e41c94c5fa40", + "slug": "prime-factors", + "name": "Prime Factors", + "uuid": "b6b7e95b-c4ca-438c-a5e7-d76cb44e5b19", "practices": [], "prerequisites": [], - "difficulty": 8, + "difficulty": 1, "topics": [ "math", - "multiple_dispatch", - "structs" + "integers" ] }, { - "slug": "complex-numbers", - "name": "Complex Numbers", - "uuid": "eca7e62c-7bbf-436c-8011-2920cb2ab1c1", + "slug": "triangle", + "name": "Triangle", + "uuid": "f5be4623-2a9a-4bf5-bb32-dd81eddf0683", "practices": [], "prerequisites": [], - "difficulty": 10, + "difficulty": 1, "topics": [ - "math", - "multiple_dispatch", - "structs" + "conditionals" ] }, { - "slug": "dnd-character", - "name": "D&D Character", - "uuid": "fcb9ef0e-ed97-4420-a38f-9bf690c23a3b", + "slug": "sum-of-multiples", + "name": "Sum of Multiples", + "uuid": "e1664ea0-647c-4667-86bc-45a670353740", "practices": [], "prerequisites": [], - "difficulty": 5, - "status": "deprecated", + "difficulty": 1, "topics": [ - "variables", - "integers", - "structs", - "games", - "randomness", - "math", - "test_driven_development" + "sets" ] }, { - "slug": "robot-simulator", - "name": "Robot Simulator", - "uuid": "e4b19962-ebc1-4f12-9ac8-45f17faeaa55", + "slug": "resistor-color", + "name": "Resistor Color", + "uuid": "ef7e22db-1f66-4d44-87f9-23d97f794628", "practices": [], "prerequisites": [], - "difficulty": 6, + "difficulty": 1 + }, + { + "slug": "eliuds-eggs", + "name": "Eliud's Eggs", + "uuid": "cc2a6031-d5fa-465b-aa28-13186d7eb202", + "practices": [], + "prerequisites": [], + "difficulty": 1 + }, + { + "slug": "two-fer", + "name": "Two-Fer", + "uuid": "91a8a9c0-041c-4e2e-97fc-dae149ef69f9", + "practices": [], + "prerequisites": [], + "difficulty": 1 + }, + { + "slug": "pig-latin", + "name": "Pig Latin", + "uuid": "3c53b207-ffcb-4111-ba3e-3aece095e268", + "practices": [], + "prerequisites": [], + "difficulty": 2 + }, + { + "slug": "rotational-cipher", + "name": "Rotational Cipher", + "uuid": "79ea05f1-3f27-4b92-bc47-0cebcd8d5a6f", + "practices": [], + "prerequisites": [], + "difficulty": 2, "topics": [ - "structs" + "metaprogramming", + "string_literals", + "strings" ] }, { - "slug": "circular-buffer", - "name": "Circular Buffer", - "uuid": "3dc9bbde-d344-4a36-a7e1-433637974dfc", + "slug": "secret-handshake", + "name": "Secret Handshake", + "uuid": "d2c85375-c0e7-4e04-88f1-08736e5afa04", "practices": [], "prerequisites": [], - "difficulty": 8, + "difficulty": 2, "topics": [ - "data_structures", - "generics", - "structs" + "arrays", + "filtering" ] }, { - "slug": "acronym", - "name": "Acronym", - "uuid": "929493e2-56b2-41d7-aedc-7cc4831078ba", + "slug": "etl", + "name": "ETL", + "uuid": "bccc00fa-811c-4bf9-8e55-07a0d0affb08", "practices": [], "prerequisites": [], - "difficulty": 1, + "difficulty": 2, "topics": [ "arrays", - "loops", + "sorting", "strings" ] }, { - "slug": "armstrong-numbers", - "name": "Armstrong Numbers", - "uuid": "af4ae5d7-8d9d-4d21-b5d3-62f4fd8b4719", + "slug": "anagram", + "name": "Anagram", + "uuid": "d2cb1621-2a2e-4791-a6b6-fdbca74a5583", "practices": [], "prerequisites": [], - "difficulty": 1, + "difficulty": 2, "topics": [ - "math", - "integers" + "arrays", + "loops", + "filtering", + "sorting", + "strings" ] }, { - "slug": "gigasecond", - "name": "Gigasecond", - "uuid": "c64e03cc-1952-4b2d-9a53-25c43187a4e6", + "slug": "minesweeper", + "name": "Minesweeper", + "uuid": "9a47bffd-4dd2-48ce-b47b-753271305966", "practices": [], "prerequisites": [], - "difficulty": 1, + "difficulty": 2, "topics": [ - "dates" + "loops", + "conditionals", + "variables", + "strings", + "integers", + "lists", + "booleans", + "arrays", + "text_formatting" ] }, { - "slug": "phone-number", - "name": "Phone Number", - "uuid": "f7a3f344-a9fa-4a36-ac44-12bc8673899e", + "slug": "collatz-conjecture", + "name": "Collatz Conjecture", + "uuid": "d1d5a74a-d488-4e2e-bd63-b74730057c98", "practices": [], "prerequisites": [], - "difficulty": 1, + "difficulty": 2, "topics": [ + "exception_handling", "conditionals", - "pattern_matching", - "regular_expressions", - "strings" + "math" ] }, { - "slug": "prime-factors", - "name": "Prime Factors", - "uuid": "b6b7e95b-c4ca-438c-a5e7-d76cb44e5b19", + "slug": "sieve", + "name": "Sieve", + "uuid": "5e3b376a-06ab-442f-8d18-710db7778db6", "practices": [], "prerequisites": [], - "difficulty": 1, + "difficulty": 2, "topics": [ - "math", - "integers" + "arrays", + "conditionals", + "loops", + "filtering", + "math" ] }, { - "slug": "triangle", - "name": "Triangle", - "uuid": "f5be4623-2a9a-4bf5-bb32-dd81eddf0683", + "slug": "protein-translation", + "name": "Protein Translation", + "uuid": "ef95ea34-cc9e-48aa-b2f9-6226134a3644", "practices": [], "prerequisites": [], - "difficulty": 1, - "topics": [ - "conditionals" - ] + "difficulty": 2 }, { - "slug": "sum-of-multiples", - "name": "Sum of Multiples", - "uuid": "e1664ea0-647c-4667-86bc-45a670353740", + "slug": "trinary", + "name": "Trinary", + "uuid": "c09ed7ec-fa7c-4f6a-994f-3d3eb7f22df4", "practices": [], "prerequisites": [], - "difficulty": 1, + "difficulty": 2, "topics": [ - "sets" + "arrays", + "integers", + "math", + "strings" ] }, { @@ -715,14 +572,6 @@ "prerequisites": [], "difficulty": 2 }, - { - "slug": "resistor-color", - "name": "Resistor Color", - "uuid": "ef7e22db-1f66-4d44-87f9-23d97f794628", - "practices": [], - "prerequisites": [], - "difficulty": 1 - }, { "slug": "resistor-color-trio", "name": "Resistor Color Trio", @@ -737,14 +586,6 @@ "strings" ] }, - { - "slug": "yacht", - "name": "Yacht", - "uuid": "32341692-02df-48a0-b696-1cfe93dc6862", - "practices": [], - "prerequisites": [], - "difficulty": 3 - }, { "slug": "transpose", "name": "Transpose", @@ -761,96 +602,159 @@ ] }, { - "slug": "perfect-numbers", - "name": "Perfect Numbers", - "uuid": "4fc89443-1c5c-492a-850f-7990869caae6", + "slug": "square-root", + "name": "Square Root", + "uuid": "587ad0fa-ea7e-4962-9c71-3a50d2877e6b", "practices": [], "prerequisites": [], - "difficulty": 3, + "difficulty": 2, "topics": [ + "algorithms", "loops", - "conditionals", - "variables", - "integers", - "lists", - "strings", - "logic", "math", - "functional_programming" + "integers", + "conditionals", + "variables" ] }, { - "slug": "spiral-matrix", - "name": "Spiral Matrix", - "uuid": "3a2facfd-5ec8-49a0-a5aa-2229f07da896", + "slug": "space-age", + "name": "Space Age", + "uuid": "f4bfe822-90cc-4183-8a50-081ff0fdb512", "practices": [], "prerequisites": [], - "difficulty": 3, - "topics": [ - "iterators", - "matrix" - ] + "difficulty": 2 }, { - "slug": "all-your-base", - "name": "All Your Base", - "uuid": "6fa91607-d772-47af-9520-de26bbb8addb", + "slug": "matrix", + "name": "Matrix", + "uuid": "9d5fb572-32cd-4657-a915-3c2822311af8", "practices": [], "prerequisites": [], - "difficulty": 4, - "topics": [ - "integers", - "math" - ] + "difficulty": 2 }, { - "slug": "matching-brackets", - "name": "Matching Brackets", - "uuid": "bf5c1f49-963a-4397-bb67-b58e1b7d45e3", + "slug": "reverse-string", + "name": "Reverse String", + "uuid": "e73f19f7-17bc-4d51-a00a-c2b58c1fa8e6", "practices": [], "prerequisites": [], - "difficulty": 5, + "difficulty": 3, "topics": [ + "generics", "loops", - "conditionals", "variables", + "strings", "integers", - "booleans", - "stacks", + "lists", "arrays", + "text_formatting", "data_structures", - "algorithms" + "functional_programming" ] }, { - "slug": "pythagorean-triplet", - "name": "Pythagorean Triplet", - "uuid": "a534b8ed-da88-4945-bb25-f6633977740b", + "slug": "binary-search", + "name": "Binary Search", + "uuid": "325385bb-2a70-4c7a-8b4e-e6297fc69872", "practices": [], "prerequisites": [], - "difficulty": 7, + "difficulty": 3, "topics": [ - "conditionals", - "type_conversion", - "loops", + "arrays", + "searching" + ] + }, + { + "slug": "yacht", + "name": "Yacht", + "uuid": "32341692-02df-48a0-b696-1cfe93dc6862", + "practices": [], + "prerequisites": [], + "difficulty": 3 + }, + { + "slug": "perfect-numbers", + "name": "Perfect Numbers", + "uuid": "4fc89443-1c5c-492a-850f-7990869caae6", + "practices": [], + "prerequisites": [], + "difficulty": 3, + "topics": [ + "loops", + "conditionals", "variables", - "tuples", "integers", "lists", - "arrays", + "strings", "logic", "math", - "algorithms", "functional_programming" ] }, { - "slug": "alphametics", - "name": "Alphametics", - "uuid": "32af807f-ba90-4a36-bf6b-5d71a0fae7ae", + "slug": "spiral-matrix", + "name": "Spiral Matrix", + "uuid": "3a2facfd-5ec8-49a0-a5aa-2229f07da896", "practices": [], "prerequisites": [], - "difficulty": 10 + "difficulty": 3, + "topics": [ + "iterators", + "matrix" + ] + }, + { + "slug": "game-of-life", + "name": "Conway's Game of Life", + "uuid": "31e83423-a0c3-4745-8fca-24125e8ef6ce", + "practices": [], + "prerequisites": [], + "difficulty": 3 + }, + { + "slug": "wordy", + "name": "Wordy", + "uuid": "1f6ffc9c-5996-4269-a9b8-cb4914e222dd", + "practices": [], + "prerequisites": [], + "difficulty": 3 + }, + { + "slug": "grade-school", + "name": "Grade School", + "uuid": "94d166eb-6201-4750-9a87-9a9031751907", + "practices": [], + "prerequisites": [], + "difficulty": 3 + }, + { + "slug": "diamond", + "name": "Diamond", + "uuid": "e082b59e-5c2a-4474-8c73-ceb623bcd858", + "practices": [], + "prerequisites": [], + "difficulty": 3 + }, + { + "slug": "kindergarten-garden", + "name": "Kindergarten Garden", + "uuid": "d196548e-ed57-43c3-b325-04c11d06397d", + "practices": [], + "prerequisites": [], + "difficulty": 3 + }, + { + "slug": "all-your-base", + "name": "All Your Base", + "uuid": "6fa91607-d772-47af-9520-de26bbb8addb", + "practices": [], + "prerequisites": [], + "difficulty": 4, + "topics": [ + "integers", + "math" + ] }, { "slug": "largest-series-product", @@ -891,68 +795,127 @@ ] }, { - "slug": "square-root", - "name": "Square Root", - "uuid": "587ad0fa-ea7e-4962-9c71-3a50d2877e6b", + "slug": "meetup", + "name": "Meetup", + "uuid": "c620a897-b054-4d8e-a2e3-17a4c0a6f6fa", "practices": [], "prerequisites": [], - "difficulty": 2, + "difficulty": 4 + }, + { + "slug": "palindrome-products", + "name": "Palindrome Products", + "uuid": "7ab2d0e6-6a39-4edf-86e9-1e49dfb8908e", + "practices": [], + "prerequisites": [], + "difficulty": 4 + }, + { + "slug": "food-chain", + "name": "Food Chain", + "uuid": "dacbf1b1-586d-4f71-9941-c0cd36090264", + "practices": [], + "prerequisites": [], + "difficulty": 4 + }, + { + "slug": "killer-sudoku-helper", + "name": "Killer Sudoku Helper", + "uuid": "e0142403-af9e-406e-827a-1fd37187d1ea", + "practices": [], + "prerequisites": [], + "difficulty": 5, "topics": [ - "algorithms", - "loops", - "math", - "integers", - "conditionals", - "variables" + "iterator-protocol", + "vectors", + "conditionals" ] }, { - "slug": "space-age", - "name": "Space Age", - "uuid": "f4bfe822-90cc-4183-8a50-081ff0fdb512", + "slug": "clock", + "name": "Clock", + "uuid": "39bc1f1e-68e3-4d35-880b-d6b6fa174605", "practices": [], "prerequisites": [], - "difficulty": 2 + "difficulty": 5, + "topics": [ + "time", + "multiple_dispatch", + "structs" + ] }, { - "slug": "eliuds-eggs", - "name": "Eliud's Eggs", - "uuid": "cc2a6031-d5fa-465b-aa28-13186d7eb202", + "slug": "robot-name", + "name": "Robot Name", + "uuid": "7cb2d96a-4707-4cec-9ead-313fcb5fbb94", "practices": [], "prerequisites": [], - "difficulty": 1 + "difficulty": 5, + "topics": [ + "randomness", + "strings", + "structs" + ] }, { - "slug": "two-fer", - "name": "Two-Fer", - "uuid": "91a8a9c0-041c-4e2e-97fc-dae149ef69f9", + "slug": "isbn-verifier", + "name": "ISBN Verifier", + "uuid": "22b64a2b-7f08-444d-be6e-8b42e5c9207c", "practices": [], "prerequisites": [], - "difficulty": 1 + "difficulty": 5, + "topics": [ + "math", + "conditionals", + "metaprogramming", + "strings", + "structs" + ] }, { - "slug": "connect", - "name": "Connect", - "uuid": "6cd9edb0-35ba-4f32-b51b-a734d98e3a88", + "slug": "dnd-character", + "name": "D&D Character", + "uuid": "fcb9ef0e-ed97-4420-a38f-9bf690c23a3b", "practices": [], "prerequisites": [], - "difficulty": 5 + "difficulty": 5, + "status": "deprecated", + "topics": [ + "variables", + "integers", + "structs", + "games", + "randomness", + "math", + "test_driven_development" + ] }, { - "slug": "binary-search-tree", - "name": "Binary Search Tree", - "uuid": "39998558-213a-4f92-953e-5764d15ddd7c", + "slug": "matching-brackets", + "name": "Matching Brackets", + "uuid": "bf5c1f49-963a-4397-bb67-b58e1b7d45e3", "practices": [], "prerequisites": [], - "difficulty": 6 + "difficulty": 5, + "topics": [ + "loops", + "conditionals", + "variables", + "integers", + "booleans", + "stacks", + "arrays", + "data_structures", + "algorithms" + ] }, { - "slug": "two-bucket", - "name": "Two Bucket", - "uuid": "1c635f59-0308-49ab-9a50-b15b3454cf65", + "slug": "connect", + "name": "Connect", + "uuid": "6cd9edb0-35ba-4f32-b51b-a734d98e3a88", "practices": [], "prerequisites": [], - "difficulty": 6 + "difficulty": 5 }, { "slug": "dominoes", @@ -979,76 +942,113 @@ "difficulty": 5 }, { - "slug": "game-of-life", - "name": "Conway's Game of Life", - "uuid": "31e83423-a0c3-4745-8fca-24125e8ef6ce", + "slug": "robot-simulator", + "name": "Robot Simulator", + "uuid": "e4b19962-ebc1-4f12-9ac8-45f17faeaa55", "practices": [], "prerequisites": [], - "difficulty": 3 + "difficulty": 6, + "topics": [ + "structs" + ] }, { - "slug": "wordy", - "name": "Wordy", - "uuid": "1f6ffc9c-5996-4269-a9b8-cb4914e222dd", + "slug": "binary-search-tree", + "name": "Binary Search Tree", + "uuid": "39998558-213a-4f92-953e-5764d15ddd7c", "practices": [], "prerequisites": [], - "difficulty": 3 + "difficulty": 6 }, { - "slug": "grade-school", - "name": "Grade School", - "uuid": "94d166eb-6201-4750-9a87-9a9031751907", + "slug": "two-bucket", + "name": "Two Bucket", + "uuid": "1c635f59-0308-49ab-9a50-b15b3454cf65", "practices": [], "prerequisites": [], - "difficulty": 3 + "difficulty": 6 }, { - "slug": "diamond", - "name": "Diamond", - "uuid": "e082b59e-5c2a-4474-8c73-ceb623bcd858", + "slug": "pythagorean-triplet", + "name": "Pythagorean Triplet", + "uuid": "a534b8ed-da88-4945-bb25-f6633977740b", "practices": [], "prerequisites": [], - "difficulty": 3 + "difficulty": 7, + "topics": [ + "conditionals", + "type_conversion", + "loops", + "variables", + "tuples", + "integers", + "lists", + "arrays", + "logic", + "math", + "algorithms", + "functional_programming" + ] }, { - "slug": "matrix", - "name": "Matrix", - "uuid": "9d5fb572-32cd-4657-a915-3c2822311af8", + "slug": "custom-set", + "name": "Custom Set", + "uuid": "b47377f7-84af-4a10-83ef-c2444a4f8940", "practices": [], "prerequisites": [], - "difficulty": 2 + "difficulty": 8, + "topics": [ + "iterators", + "multiple_dispatch", + "structs" + ] }, { - "slug": "kindergarten-garden", - "name": "Kindergarten Garden", - "uuid": "d196548e-ed57-43c3-b325-04c11d06397d", + "slug": "rational-numbers", + "name": "Rational Numbers", + "uuid": "0caf0209-be6e-4585-a90b-e41c94c5fa40", "practices": [], "prerequisites": [], - "difficulty": 3 + "difficulty": 8, + "topics": [ + "math", + "multiple_dispatch", + "structs" + ] }, { - "slug": "meetup", - "name": "Meetup", - "uuid": "c620a897-b054-4d8e-a2e3-17a4c0a6f6fa", + "slug": "circular-buffer", + "name": "Circular Buffer", + "uuid": "3dc9bbde-d344-4a36-a7e1-433637974dfc", "practices": [], "prerequisites": [], - "difficulty": 4 + "difficulty": 8, + "topics": [ + "data_structures", + "generics", + "structs" + ] }, { - "slug": "palindrome-products", - "name": "Palindrome Products", - "uuid": "7ab2d0e6-6a39-4edf-86e9-1e49dfb8908e", + "slug": "complex-numbers", + "name": "Complex Numbers", + "uuid": "eca7e62c-7bbf-436c-8011-2920cb2ab1c1", "practices": [], "prerequisites": [], - "difficulty": 4 + "difficulty": 10, + "topics": [ + "math", + "multiple_dispatch", + "structs" + ] }, { - "slug": "food-chain", - "name": "Food Chain", - "uuid": "dacbf1b1-586d-4f71-9941-c0cd36090264", + "slug": "alphametics", + "name": "Alphametics", + "uuid": "32af807f-ba90-4a36-bf6b-5d71a0fae7ae", "practices": [], "prerequisites": [], - "difficulty": 4 + "difficulty": 10 } ] }, From 8199c6483ab249ce6f3db3caf86ecae0379cfd73 Mon Sep 17 00:00:00 2001 From: colinleach Date: Sun, 15 Sep 2024 06:13:08 -0700 Subject: [PATCH 2/4] Standard scripts copied from generic-track repo (#786) --- bin/add-practice-exercise | 84 ++++++++++++++++++++++++++++++ bin/fetch-configlet.ps1 | 31 +++++++++++ bin/verify-exercises | 94 ++++++++++++++++++++++++++++++++++ bin/verify-exercises-in-docker | 92 +++++++++++++++++++++++++++++++++ 4 files changed, 301 insertions(+) create mode 100755 bin/add-practice-exercise create mode 100644 bin/fetch-configlet.ps1 create mode 100755 bin/verify-exercises create mode 100755 bin/verify-exercises-in-docker diff --git a/bin/add-practice-exercise b/bin/add-practice-exercise new file mode 100755 index 00000000..7c863068 --- /dev/null +++ b/bin/add-practice-exercise @@ -0,0 +1,84 @@ +#!/usr/bin/env bash + +# Synopsis: +# Scaffold the files for a new practice exercise. +# After creating the exercise, follow the instructions in the output. + +# Example: +# bin/add-practice-exercise two-fer + +# Example with difficulty: +# bin/add-practice-exercise -d 5 two-fer + +# Example with author and difficulty: +# bin/add-practice-exercise -a foo -d 3 two-fer + +set -euo pipefail +scriptname=$0 + +help_and_exit() { + echo >&2 "Scaffold the files for a new practice exercise." + echo >&2 "Usage: ${scriptname} [-h] [-a author] [-d difficulty] " + echo >&2 "Where: author is the GitHub username of the exercise creator." + echo >&2 "Where: difficulty is between 1 (easiest) to 10 (hardest)." + exit 1 +} + +die() { echo >&2 "$*"; exit 1; } + +required_tool() { + command -v "${1}" >/dev/null 2>&1 || + die "${1} is required but not installed. Please install it and make sure it's in your PATH." +} + +require_files_template() { + jq -e --arg key "${1}" '.files[$key] | length > 0' config.json > /dev/null || + die "The '.files.${1}' array in the 'config.json' file is empty. Please add at least one file. See https://exercism.org/docs/building/tracks/config-json#h-files for more information." +} + +required_tool jq + +require_files_template "solution" +require_files_template "test" +require_files_template "example" + +[[ -f ./bin/fetch-configlet ]] || die "Run this script from the repo's root directory." + +author='' +difficulty='1' +while getopts :ha:d: opt; do + case $opt in + h) help_and_exit ;; + a) author=$OPTARG ;; + d) difficulty=$OPTARG ;; + ?) echo >&2 "Unknown option: -$OPTARG"; help_and_exit ;; + esac +done +shift "$((OPTIND - 1))" + +(( $# >= 1 )) || help_and_exit + +slug="${1}" + +if [[ -z "${author}" ]]; then + read -rp 'Your GitHub username: ' author +fi + +./bin/fetch-configlet +./bin/configlet create --practice-exercise "${slug}" --author "${author}" --difficulty "${difficulty}" + +exercise_dir="exercises/practice/${slug}" +files=$(jq -r --arg dir "${exercise_dir}" '.files | to_entries | map({key: .key, value: (.value | map("'"'"'" + $dir + "/" + . + "'"'"'") | join(" and "))}) | from_entries' "${exercise_dir}/.meta/config.json") + +cat << NEXT_STEPS + +Your next steps are: +- Create the test suite in $(jq -r '.test' <<< "${files}") + - The tests should be based on the canonical data at 'https://github.com/exercism/problem-specifications/blob/main/exercises/${slug}/canonical-data.json' + - Any test cases you don't implement, mark them in 'exercises/practice/${slug}/.meta/tests.toml' with "include = false" +- Create the example solution in $(jq -r '.example' <<< "${files}") +- Verify the example solution passes the tests by running 'bin/verify-exercises ${slug}' +- Create the stub solution in $(jq -r '.solution' <<< "${files}") +- Update the 'difficulty' value for the exercise's entry in the 'config.json' file in the repo's root +- Validate CI using 'bin/configlet lint' and 'bin/configlet fmt' +NEXT_STEPS diff --git a/bin/fetch-configlet.ps1 b/bin/fetch-configlet.ps1 new file mode 100644 index 00000000..ab8f1036 --- /dev/null +++ b/bin/fetch-configlet.ps1 @@ -0,0 +1,31 @@ +# This file is a copy of the +# https://github.com/exercism/configlet/blob/main/scripts/fetch-configlet.ps1 file. +# Please submit bugfixes/improvements to the above file to ensure that all tracks +# benefit from the changes. + +$ErrorActionPreference = "Stop" +$ProgressPreference = "SilentlyContinue" + +$requestOpts = @{ + Headers = If ($env:GITHUB_TOKEN) { @{ Authorization = "Bearer ${env:GITHUB_TOKEN}" } } Else { @{ } } + MaximumRetryCount = 3 + RetryIntervalSec = 1 +} + +$arch = If ([Environment]::Is64BitOperatingSystem) { "x86-64" } Else { "i386" } +$fileName = "configlet_.+_windows_$arch.zip" + +Function Get-DownloadUrl { + $latestUrl = "https://api.github.com/repos/exercism/configlet/releases/latest" + Invoke-RestMethod -Uri $latestUrl -PreserveAuthorizationOnRedirect @requestOpts + | Select-Object -ExpandProperty assets + | Where-Object { $_.browser_download_url -match $FileName } + | Select-Object -ExpandProperty browser_download_url +} + +$downloadUrl = Get-DownloadUrl +$outputDirectory = "bin" +$outputFile = Join-Path -Path $outputDirectory -ChildPath $fileName +Invoke-WebRequest -Uri $downloadUrl -OutFile $outputFile @requestOpts +Expand-Archive $outputFile -DestinationPath $outputDirectory -Force +Remove-Item -Path $outputFile diff --git a/bin/verify-exercises b/bin/verify-exercises new file mode 100755 index 00000000..3355f55f --- /dev/null +++ b/bin/verify-exercises @@ -0,0 +1,94 @@ +#!/usr/bin/env bash + +# Synopsis: +# Verify that each exercise's example/exemplar solution passes the tests. +# You can either verify all exercises or a single exercise. + +# Example: verify all exercises +# bin/verify-exercises + +# Example: verify single exercise +# bin/verify-exercises two-fer + +set -eo pipefail + +die() { echo "$*" >&2; exit 1; } + +required_tool() { + command -v "${1}" >/dev/null 2>&1 || + die "${1} is required but not installed. Please install it and make sure it's in your PATH." +} + +required_tool jq + +copy_example_or_examplar_to_solution() { + jq -c '[.files.solution, .files.exemplar // .files.example] | transpose | map({src: .[1], dst: .[0]}) | .[]' .meta/config.json \ + | while read -r src_and_dst; do + cp "$(jq -r '.src' <<< "${src_and_dst}")" "$(jq -r '.dst' <<< "${src_and_dst}")" + done +} + +unskip_tests() { + # shellcheck disable=SC2034 + jq -r '.files.test[]' .meta/config.json | while read -r test_file; do + noop # TODO: replace this with the command to unskip the tests. + # Note: this function runs from within an exercise directory. + # Note: the exercise directory is a temporary directory, so feel + # free to modify its (test) files as needed. + # Note: ignore this function if either: + # - skipping tests is not supported, or + # - skipping tests does not require modifying the test files. + # Example: sed -i 's/test.skip/test/g' "${test_file}" + done +} + +run_tests() { + noop # TODO: replace this with the command to run the tests for the exercise. + # Note: this function runs from within an exercise directory. + # Note: the exercise directory is a temporary directory, so feel + # free to modify its files as needed. + # Note: return a zero exit code if all tests pass, otherwise non-zero. + # Example: `npm test` + # Example: `python3 -m pytest two_fer_test.py` +} + +verify_exercise() { + local dir + local slug + local tmp_dir + + dir=$(realpath "${1}") + slug=$(basename "${dir}") + tmp_dir=$(mktemp -d -t "exercism-verify-${slug}-XXXXX") + + echo "Verifying ${slug} exercise..." + + ( + trap 'rm -rf "$tmp_dir"' EXIT # remove tempdir when subshell ends + cp -r "${dir}/." "${tmp_dir}" + cd "${tmp_dir}" + + copy_example_or_examplar_to_solution + unskip_tests + run_tests + ) +} + +verify_exercises() { + local exercise_slug + + exercise_slug="${1}" + + shopt -s nullglob + count=0 + for exercise_dir in ./exercises/{concept,practice}/${exercise_slug}/; do + if [[ -d "${exercise_dir}" ]]; then + verify_exercise "${exercise_dir}" + ((++count)) + fi + done + ((count > 0)) || die 'no matching exercises found!' +} + +exercise_slug="${1:-*}" +verify_exercises "${exercise_slug}" diff --git a/bin/verify-exercises-in-docker b/bin/verify-exercises-in-docker new file mode 100755 index 00000000..d4c20338 --- /dev/null +++ b/bin/verify-exercises-in-docker @@ -0,0 +1,92 @@ +#!/usr/bin/env bash + +# Synopsis: +# Verify that each exercise's example/exemplar solution passes the tests +# using the track's test runner Docker image. +# You can either verify all exercises or a single exercise. + +# Example: verify all exercises in Docker +# bin/verify-exercises-in-docker + +# Example: verify single exercise in Docker +# bin/verify-exercises-in-docker two-fer + +set -eo pipefail + +die() { echo "$*" >&2; exit 1; } + +required_tool() { + command -v "${1}" >/dev/null 2>&1 || + die "${1} is required but not installed. Please install it and make sure it's in your PATH." +} + +required_tool docker + +copy_example_or_examplar_to_solution() { + jq -c '[.files.solution, .files.exemplar // .files.example] | transpose | map({src: .[1], dst: .[0]}) | .[]' .meta/config.json \ + | while read -r src_and_dst; do + cp "$(jq -r '.src' <<< "${src_and_dst}")" "$(jq -r '.dst' <<< "${src_and_dst}")" + done +} + +pull_docker_image() { + # shellcheck disable=SC1083 + docker pull exercism/{{SLUG}}-test-runner || + die $'Could not find the `exercism/{{SLUG}}-test-runner` Docker image.\nCheck the test runner docs at https://exercism.org/docs/building/tooling/test-runners for more information.' +} + +run_tests() { + local slug + slug="${1}" + + # shellcheck disable=SC1083 + docker run \ + --rm \ + --network none \ + --read-only \ + --mount type=bind,src="${PWD}",dst=/solution \ + --mount type=bind,src="${PWD}",dst=/output \ + --mount type=tmpfs,dst=/tmp \ + exercism/{{SLUG}}-test-runner "${slug}" /solution /output + jq -e '.status == "pass"' "${PWD}/results.json" >/dev/null 2>&1 +} + +verify_exercise() { + local dir + local slug + local tmp_dir + dir=$(realpath "${1}") + slug=$(basename "${dir}") + tmp_dir=$(mktemp -d -t "exercism-verify-${slug}-XXXXX") + + echo "Verifying ${slug} exercise..." + + ( + trap 'rm -rf "$tmp_dir"' EXIT # remove tempdir when subshell ends + cp -r "${dir}/." "${tmp_dir}" + cd "${tmp_dir}" + + copy_example_or_examplar_to_solution + run_tests "${slug}" + ) +} + +verify_exercises() { + local exercise_slug + exercise_slug="${1}" + + shopt -s nullglob + count=0 + for exercise_dir in ./exercises/{concept,practice}/${exercise_slug}/; do + if [[ -d "${exercise_dir}" ]]; then + verify_exercise "${exercise_dir}" + ((++count)) + fi + done + ((count > 0)) || die 'no matching exercises found!' +} + +pull_docker_image + +exercise_slug="${1:-*}" +verify_exercises "${exercise_slug}" From ed6947ce8e312868c3ae86622cfe13840dfcbeff Mon Sep 17 00:00:00 2001 From: depial <91621102+depial@users.noreply.github.com> Date: Wed, 18 Sep 2024 17:19:06 -0400 Subject: [PATCH 3/4] update runtests.jl (#788) [no important files changed] --- exercises/practice/knapsack/runtests.jl | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/exercises/practice/knapsack/runtests.jl b/exercises/practice/knapsack/runtests.jl index a279c56f..fb0dc81b 100644 --- a/exercises/practice/knapsack/runtests.jl +++ b/exercises/practice/knapsack/runtests.jl @@ -2,10 +2,7 @@ using Test include("knapsack.jl") -struct Item - weight - value -end +Item = NamedTuple{(:weight, :value), Tuple{Int, Int}} @testset verbose = true "tests" begin @testset "no items" begin @@ -13,35 +10,35 @@ end end @testset "one item, too heavy" begin - @test maximum_value(10, [Item(100, 1),]) == 0 + @test maximum_value(10, [Item((100, 1)),]) == 0 end @testset "five items (cannot be greedy by weight)" begin - items = [Item(2, 5), Item(2, 5), Item(2, 5), Item(2, 5), Item(10, 21)] + items = [Item((2, 5)), Item((2, 5)), Item((2, 5)), Item((2, 5)), Item((10, 21))] @test maximum_value(10, items) == 21 end @testset "five items (cannot be greedy by value)" begin - items = [Item(2, 20), Item(2, 20), Item(2, 20), Item(2, 20), Item(10, 50)] + items = [Item((2, 20)), Item((2, 20)), Item((2, 20)), Item((2, 20)), Item((10, 50))] @test maximum_value(10, items) == 80 end @testset "example knapsack" begin - items = [Item(5, 10), Item(4, 40), Item(6, 30), Item(4, 50)] + items = [Item((5, 10)), Item((4, 40)), Item((6, 30)), Item((4, 50))] @test maximum_value(10, items) == 90 end @testset "8 items" begin - items = [Item(25, 350), Item(35, 400), Item(45, 450), Item(5, 20), - Item(25, 70), Item(3, 8), Item(2, 5), Item(2, 5)] + items = [Item((25, 350)), Item((35, 400)), Item((45, 450)), Item((5, 20)), + Item((25, 70)), Item((3, 8)), Item((2, 5)), Item((2, 5))] @test maximum_value(104, items) == 900 end @testset "15 items" begin - items = [Item(70, 135), Item(73, 139), Item(77, 149), Item(80, 150), - Item(82, 156), Item(87, 163), Item(90, 173), Item(94, 184), - Item(98, 192), Item(106, 201), Item(110, 210), Item(113, 214), - Item(115, 221), Item(118, 229), Item(120, 240)] + items = [Item((70, 135)), Item((73, 139)), Item((77, 149)), Item((80, 150)), + Item((82, 156)), Item((87, 163)), Item((90, 173)), Item((94, 184)), + Item((98, 192)), Item((106, 201)), Item((110, 210)), Item((113, 214)), + Item((115, 221)), Item((118, 229)), Item((120, 240))] @test maximum_value(750, items) == 1458 end end From 637601644c6421c5bf9f31e9ab7f56cff8f5c4df Mon Sep 17 00:00:00 2001 From: depial <91621102+depial@users.noreply.github.com> Date: Thu, 19 Sep 2024 20:09:39 -0400 Subject: [PATCH 4/4] Delete exercises/concept.wip/leap directory (#790) --- exercises/concept.wip/leap/.docs/hints.md | 22 ---------- .../concept.wip/leap/.docs/instructions.md | 23 ---------- .../concept.wip/leap/.docs/introduction.md | 43 ------------------- exercises/concept.wip/leap/.docs/source.md | 4 -- exercises/concept.wip/leap/.meta/config.json | 21 --------- exercises/concept.wip/leap/.meta/design.md | 11 ----- exercises/concept.wip/leap/.meta/exemplar.jl | 6 --- exercises/concept.wip/leap/leap.jl | 0 exercises/concept.wip/leap/runtests.jl | 41 ------------------ 9 files changed, 171 deletions(-) delete mode 100644 exercises/concept.wip/leap/.docs/hints.md delete mode 100644 exercises/concept.wip/leap/.docs/instructions.md delete mode 100644 exercises/concept.wip/leap/.docs/introduction.md delete mode 100644 exercises/concept.wip/leap/.docs/source.md delete mode 100644 exercises/concept.wip/leap/.meta/config.json delete mode 100644 exercises/concept.wip/leap/.meta/design.md delete mode 100644 exercises/concept.wip/leap/.meta/exemplar.jl delete mode 100644 exercises/concept.wip/leap/leap.jl delete mode 100644 exercises/concept.wip/leap/runtests.jl diff --git a/exercises/concept.wip/leap/.docs/hints.md b/exercises/concept.wip/leap/.docs/hints.md deleted file mode 100644 index 0c4b1c89..00000000 --- a/exercises/concept.wip/leap/.docs/hints.md +++ /dev/null @@ -1,22 +0,0 @@ -# Hints - -## 2. Write a boolean expression that describes whether a given year `y` is a leap year - -- Consider writing a [truth table](https://en.wikipedia.org/wiki/Truth_table) for this exercise and see if you can work out what the simplest predicates are and how they could be combined with `&&` and `||`. A predicate is a statement or a function that is either true or false, depending on its inputs. `isodd(number)` is an example of a predicate function in Julia. - -## 3. Wrap it in the `isleapyear` function - -- You can return a boolean expression directly: - - ```julia - julia> function equalstwo(x) - return x == 2 - end - equalstwo (generic function with 1 method) - - julia> equalstwo(3) - false - - julia> equalstwo(2) - true - ``` diff --git a/exercises/concept.wip/leap/.docs/instructions.md b/exercises/concept.wip/leap/.docs/instructions.md deleted file mode 100644 index 7e0b64f8..00000000 --- a/exercises/concept.wip/leap/.docs/instructions.md +++ /dev/null @@ -1,23 +0,0 @@ -# Instructions - -A leap year in the Gregorian calendar occurs - -- on every year that is evenly divisible by 4, -- except every year that is evenly divisible by 100, -- unless the year is also evenly divisible by 400. - -For example, 1997 is not a leap year, but 1996 is. 1900 is not a leap -year, but 2000 is. - -## 1. Write boolean expressions to determine divisibility for the rules given above - -## 2. Combine these expressions to a single boolean expression that describes whether a given year `y` is a leap year - - - -## 3. Wrap it in the `isleapyear` function - -```julia-repl -julia> isleapyear(2000) -true -``` diff --git a/exercises/concept.wip/leap/.docs/introduction.md b/exercises/concept.wip/leap/.docs/introduction.md deleted file mode 100644 index 69435860..00000000 --- a/exercises/concept.wip/leap/.docs/introduction.md +++ /dev/null @@ -1,43 +0,0 @@ -# Introduction - -Given a year, report if it is a leap year in the Gregorian calendar. - -## Arithmetic Operators: Remainder & Equality - -Julia provides a number of [arithmetic operators](https://en.wikipedia.org/wiki/Arithmetic#Arithmetic_operations) for numeric types[^1]. - -In this exercise you will only need the `%` operator that calculates the [remainder](https://en.wikipedia.org/wiki/Remainder) of the division of two numbers - -```julia-repl -julia> 10 % 5 -0 - -julia> 8 % 5 -3 -``` - -and the equality operator `==` - -```julia-repl -julia> 2 + 2 == 4 -true - -julia> 2 + 2 == 5 -false -``` - -~~~~exercism/note -It is conventional to have one space either side of each operator: - -```julia -x % y == 3 -``` - -instead of - -```julia -x%y==3 -``` -~~~~ - -[^1]: You can find a list of them in the [Julia Manual](https://docs.julialang.org/en/v1/manual/mathematical-operations/#Arithmetic-Operators). diff --git a/exercises/concept.wip/leap/.docs/source.md b/exercises/concept.wip/leap/.docs/source.md deleted file mode 100644 index 941fd9c8..00000000 --- a/exercises/concept.wip/leap/.docs/source.md +++ /dev/null @@ -1,4 +0,0 @@ -# Source - -- C. Caine, Exercism Mentoring Notes on `leap` exercise, GitHub. (n.d.). https://github.com/exercism/website-copy/blob/ede72a420a96906360cb3aeed0ba51c4692723cc/tracks/julia/exercises/leap/mentoring.md (accessed October 28, 2020). -- Exercism Problem Specification for `leap` exercise, GitHub. (n.d.). https://github.com/exercism/problem-specifications/tree/42dd0cea20498fd544b152c4e2c0a419bb7e266a/exercises/leap (accessed October 28, 2020). diff --git a/exercises/concept.wip/leap/.meta/config.json b/exercises/concept.wip/leap/.meta/config.json deleted file mode 100644 index f5cb7841..00000000 --- a/exercises/concept.wip/leap/.meta/config.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "blurb": "Learn about arithmetic operators and boolean expressions by searching for leap years.", - "language_versions": "≥1.0", - "files": { - "exemplar": [ - ".meta/exemplar.jl" - ], - "test": [ - "runtests.jl" - ], - "solution": [ - "leap.jl" - ] - }, - "contributors": [], - "authors": [ - "SaschaMann", - "cmcaine" - ], - "forked_from": ["v2/leap"] -} diff --git a/exercises/concept.wip/leap/.meta/design.md b/exercises/concept.wip/leap/.meta/design.md deleted file mode 100644 index 0f2c465e..00000000 --- a/exercises/concept.wip/leap/.meta/design.md +++ /dev/null @@ -1,11 +0,0 @@ -# Design - -## Goal - -The goal of this exercise is to teach the student the fundamentals of the boolean expressions and (arithmetic) operators in Julia. -This is a prerequisite for them to understand how unit testing works in Julia, which will be required later in the track. - -## Learning objectives - -- Know how to use arithmetic operators, in particular the remainder operator. -- Know how to compare two integers for equality. diff --git a/exercises/concept.wip/leap/.meta/exemplar.jl b/exercises/concept.wip/leap/.meta/exemplar.jl deleted file mode 100644 index c5625fb8..00000000 --- a/exercises/concept.wip/leap/.meta/exemplar.jl +++ /dev/null @@ -1,6 +0,0 @@ -""" - is_leap_year(year) - -Return if `year` is a leap year in the gregorian calendar. -""" -isleapyear(y) = (y % 4 == 0) && ((y % 100 != 0) || (y % 400 == 0)) diff --git a/exercises/concept.wip/leap/leap.jl b/exercises/concept.wip/leap/leap.jl deleted file mode 100644 index e69de29b..00000000 diff --git a/exercises/concept.wip/leap/runtests.jl b/exercises/concept.wip/leap/runtests.jl deleted file mode 100644 index 513137ef..00000000 --- a/exercises/concept.wip/leap/runtests.jl +++ /dev/null @@ -1,41 +0,0 @@ -using Test - -include("leap.jl") - -@testset verbose = true "tests" begin - @testset "year not divisible by 4 in common year" begin - @test !isleapyear(2015) - end - - @testset "year divisible by 2, not divisible by 4 in common year" begin - @test !isleapyear(1970) - end - - @testset "year divisible by 4, not divisible by 100 in leap year" begin - @test isleapyear(1996) - end - - @testset "year divisible by 4 and 5 is still a leap year" begin - @test isleapyear(1960) - end - - @testset "year divisible by 100, not divisible by 400 in common year" begin - @test !isleapyear(2100) - end - - @testset "year divisible by 100 but not by 3 is still not a leap year" begin - @test !isleapyear(1900) - end - - @testset "year divisible by 400 in leap year" begin - @test isleapyear(2000) - end - - @testset "year divisible by 400 but not by 125 is still a leap year" begin - @test isleapyear(2400) - end - - @testset "year divisible by 200, not divisible by 400 in common year" begin - @test !isleapyear(1800) - end -end