From ba7f5af66bc2281c729d5d8ab52aa30ffd7d42c5 Mon Sep 17 00:00:00 2001 From: BethanyG Date: Sat, 8 May 2021 21:19:52 -0700 Subject: [PATCH 1/3] Reconstituted V3 Repo PR2949 (https://github.com/exercism/v3/pull/2949) --- exercises/concept/black-jack/.docs/hints.md | 21 ++ .../concept/black-jack/.docs/instructions.md | 50 +++++ .../concept/black-jack/.docs/introduction.md | 185 ++++++++++++++++++ .../concept/black-jack/.meta/config.json | 39 ++++ exercises/concept/black-jack/.meta/design.md | 63 ++++++ .../concept/black-jack/.meta/exemplar.py | 23 +++ exercises/concept/black-jack/black-jack.py | 10 + .../concept/black-jack/black-jack_test.py | 41 ++++ 8 files changed, 432 insertions(+) create mode 100644 exercises/concept/black-jack/.docs/hints.md create mode 100644 exercises/concept/black-jack/.docs/instructions.md create mode 100644 exercises/concept/black-jack/.docs/introduction.md create mode 100644 exercises/concept/black-jack/.meta/config.json create mode 100644 exercises/concept/black-jack/.meta/design.md create mode 100644 exercises/concept/black-jack/.meta/exemplar.py create mode 100644 exercises/concept/black-jack/black-jack.py create mode 100644 exercises/concept/black-jack/black-jack_test.py diff --git a/exercises/concept/black-jack/.docs/hints.md b/exercises/concept/black-jack/.docs/hints.md new file mode 100644 index 0000000000..48d5446c44 --- /dev/null +++ b/exercises/concept/black-jack/.docs/hints.md @@ -0,0 +1,21 @@ +# General + +- [The Python Comparisons Tutorial][the python comparisons tutorial] and [Python comparisons examples][python comparisons examples] can be a great introduction. + +## 1. Calculate the number of card + +- You can use the [equality comparison operator][equality comparison operator] to get the number of the card. + +## 2. Calculate the number of Ace + +- You can use the [order comparisons operator][order comparisons operator]to decide the value of ace without the sum of hand exceeding 21. + +## 3. Judge Blackjack + +- You can use the [membership test operations][membership test operations] in `if` or `elif` syntax to find black-jack from the first two cards in your hand. + +[the python comparisons tutorial]: https://docs.python.org/3/reference/expressions.html#comparisons +[python comparisons examples]: https://www.tutorialspoint.com/python/comparison_operators_example.htm +[equality comparison operator]: https://docs.python.org/3/reference/expressions.html#comparisons +[order comparisons operator]: https://docs.python.org/3/reference/expressions.html#comparisons +[membership test operations]: https://docs.python.org/3/reference/expressions.html#comparisons \ No newline at end of file diff --git a/exercises/concept/black-jack/.docs/instructions.md b/exercises/concept/black-jack/.docs/instructions.md new file mode 100644 index 0000000000..b906923998 --- /dev/null +++ b/exercises/concept/black-jack/.docs/instructions.md @@ -0,0 +1,50 @@ +In this exercise, you're going to implement some rules from [Blackjack][blackjack] + +You have some rules to implement for judging the result of the game. + +**Note** : In this exercise, _A_ means an ace, _J_ means jack, _Q_ means queen, and _K_ means king card. + +## 1. Calculate the number of card + +Create the `number_of_card()` function with a parameter `card`. The value of _J, Q_ or _K_ is 10. If the `card` is _A_, then just return "ace". + +```python +>>> number_of_card('K') +10 +>>> number_of_card('A') +ace +``` + +## 2. Calculate the number of Ace + +Create the `number_of_ace()` function with a parameter `hand`. + +1. `hand` : the sum of cards in hand with an ace. + +Ace is 1 or 11. You have to decide the value of ace without the sum of hand exceeding 21. + +```python +>>> number_of_ace(19) +1 +>>> number_of_ace(7) +11 +``` + +## 3. Judge Blackjack + +Create the `blackjack()` function with a parameter `hand`. + +1. `hand` : first two cards in hand. + +This function should return if the hand is blackjack. There's must be an ace card in `hand`. + +**Note** : If the player has an Ace and a ten-value card, it is called a _Blackjack_. Ten-value cards include _10, J, Q, K_. I think you may have many ways. But if you can, use a way to check if there are an ace and a ten-value in the list. + +```python +>>> blackjack(['A', 'K']) +True +>>> blackjack([10, 9]) +False +``` + +[blackjack]: https://en.wikipedia.org/wiki/Blackjack \ No newline at end of file diff --git a/exercises/concept/black-jack/.docs/introduction.md b/exercises/concept/black-jack/.docs/introduction.md new file mode 100644 index 0000000000..eed9111f84 --- /dev/null +++ b/exercises/concept/black-jack/.docs/introduction.md @@ -0,0 +1,185 @@ +## Comparisons + +There are some different kinds of comparison operators in Python + +| Operator | Operation | Description | +| -------- | ------------------------ | -------------------------------------------------------- | +| `>` | Greater than | `a > b` is `True` if `a` is greater than `b` | +| `<` | Less than | `a < b` is `True` if `a` is less than `b` | +| `==` | Equal to | `a == b` is `True` if `a` is equals to `b` | +| `>=` | Greater than or equal to | `a >= b` is `True` if `a > b` or `a == b` is `True` | +| `<=` | Less than or equal to | `a <= b` is `True` if `a < b` or `a == b` is `True` | +| `!=` | Not equal to | `a != b` is `True` if `a = b` is `False` | +| `is` | Identity | `a is b` is `True` if `a` and `b` is same object | +| `is not` | Identity | `a is not b` is `True` if `a` and `b` is not same object | +| `in` | Containment test | `a in b` is `True` if `a` is member of `b` | +| `not in` | Containment test | `a not in b` is `True` if `a` is not a member of `b` | + +## Greater than + +Operator `>` tests if the first operand's value is greater than the second one's. + +```python +>>> 3 > 1 +True +>>> 2.99 > 3 +False +>>> 1 > 1 +False +>>> 0 > 1 +False +``` + +## Less than + +Operator `<` tests if the first operand's value is less than the second one's. + +```python +>>> 3 < 1 +False +>>> 2.99 < 3 +True +>>> 1 < 1 +False +>>> 0 < 1 +True +``` + +## Equal to + +Operator `==` tests if the first operand's value is equal to the second one's + +```python +>>> 3 == 1 +False +>>> 2.99 == 3 +False +>>> 1 == 1 +True +>>> 0 == 1 +False +``` + +## Greater than or equal to + +Operator `>=` tests if the first operand's value is equal to or greater than the second one's. + +```python +>>> 3 >= 1 +True +>>> 2.99 >= 3 +False +>>> 1 >= 1 +True +>>> 0 >= 1 +False +``` + +## Less than or equal to + +Operator `<=` tests if the first operand's value is equal to or less than the second one's. + +```python +>>> 3 <= 1 +False +>>> 2.99 <= 3 +True +>>> 1 <= 1 +True +>>> 0 <= 1 +True +``` + +## Not equal to + +Operator `!=` tests if the first operand's value is not equal to the second one's + +```python +>>> 3 != 1 +True +>>> 2.99 != 3 +True +>>> 1 != 1 +False +>>> 0 != 1 +True +``` + +## Identity test + +Operator `is` tests if the first and second operand is the same object. + +```python +# comparing non-object type `is` will raise warning +>>> 1 is 1 +:1: SyntaxWarning: "is" with a literal. Did you mean "=="? +True +>>> 1 is 2 +:1: SyntaxWarning: "is" with a literal. Did you mean "=="? +False +>>> x = int(4) +>>> y = x +>>> x is y +True +>>> y = int(5) +>>> x is y +False +``` + +Operator `is not` tests if the first and second operand is not the same object. + +```python +>>> 1 is not 1 +:1: SyntaxWarning: "is not" with a literal. Did you mean "!="? +False +>>> 1 is not 2 +:1: SyntaxWarning: "is not" with a literal. Did you mean "!="? +True +>>> x = int(4) +>>> y = x +>>> x is not y +False +>>> y = int(5) +>>> x is not y +True +``` + +## Containment test + +Operator `in` tests if the first operand is a member of the second operand. + +```python +>>> x = [1, 2, 3, 4, 5] +>>> 1 in x +True +>>> 2 in x +True +>>> 3 in x +True +>>> 4 in x +True +>>> 5 in x +True +>>> 6 in x +False +``` + +Operator `not in` tests if the first operand is not a member of the second operand. + +```python +>>> x = [1, 2, 3, 4, 5] +>>> 1 not in x +False +>>> 2 not in x +False +>>> 3 not in x +False +>>> 4 not in x +False +>>> 5 not in x +False +>>> 6 not in x +True +``` + +[python3-docs]: https://docs.python.org/3/library/operator.html \ No newline at end of file diff --git a/exercises/concept/black-jack/.meta/config.json b/exercises/concept/black-jack/.meta/config.json new file mode 100644 index 0000000000..28e55f7bb2 --- /dev/null +++ b/exercises/concept/black-jack/.meta/config.json @@ -0,0 +1,39 @@ +{ + "blurb": "Learn about comparisons by implementing some Black Jack judging rules.", + "authors": [ + { + "github_username": "Ticktakto", + "exercism_username": "Ticktakto" + }, + { + "github_username": "Yabby1997", + "exercism_username": "Yabby1997" + }, + { + "github_username": "limm-jk", + "exercism_username": "limm-jk" + }, + { + "github_username": "OMEGA-Y", + "exercism_username": "OMEGA-Y" + }, + { + "github_username": "wnstj2007", + "exercism_username": "wnstj2007" + } + ], + "contributors": [ + "bethanyg" + ], + "files": { + "solution": [ + "black-jack.py" + ], + "test": [ + "black-jack_test.py" + ], + "exemplar": [ + ".meta/exemplar.py" + ] + } +} \ No newline at end of file diff --git a/exercises/concept/black-jack/.meta/design.md b/exercises/concept/black-jack/.meta/design.md new file mode 100644 index 0000000000..8800837a35 --- /dev/null +++ b/exercises/concept/black-jack/.meta/design.md @@ -0,0 +1,63 @@ +## Goal + +This concept exercise should teach how basic _non-customized_ comparisons work in python and how to use them effectively. + +## Learning objectives + +- understand all comparison operations in Python have the same priority and are evaluated after arithmetic, shifting, or bitwise operations. +- understand all comparisons yield the boolean values True and False +- know that identity comparisons is and is not are for checking an objects identity only +- understand that `==` and `!=` compare both the value & type of an object. +- know where Python has altered the behavior of `==` and `!=` for certain `built-in` types (such as [numbers][numbers], or for standard library types like [decimals][decimals], and [fractions][fractions] to allow comparison across and within type. +- know that unlike numeric types, strings (`str`) and binary sequences (`bytes` & `byte array`) **cannot** be directly compared. +- understand how comparisons work within `built-in` [sequence types][sequence types](`list`, `tuple`, `range`) and `built-in` `collection types` (`set`, `[dict]`) +- know about the "special" comparisons `None`, `NotImplemented` (comparing either should use identity operators and not equality operators because they are singleton objects) and NaN (`NaN` is **never** `==` to itself) +- use the value comparison operators `==`, `>`, `<`, `!=` with numeric types +- use the value comparison operators `==`, `>`, `<`, `!=` with non-numeric types +- use `is` and `is not` to check/verify identity + +## Out of scope + +- rich comparison with `__lt__`, `__le__`, `__ne__`, `__ge__`, `__gt__` +- understanding (_and using the concept_) that the `==` operator calls the dunder method `__eq__()` on a specific object, and uses that object's implementation for comparison. Where no implementation is present, the default `__eq__()` from generic `object` is used. +- overloading the default implementation of the `__eq__()` dunder method on a specific object to customize comparison behavior. +- `set operations` +- performance considerations + +## Concepts + +- Comparison priority in Python +- Comparison operators `==`, `>`, `<`, `!=` +- Identity methods `is` and `is not` +- Equality applied to `built-in` types +- Equivalence vs equality +- Inequality + +## Prerequisites + +- `basics` +- `booleans` +- `dicts` +- `lists` +- `sets` +- `strings` +- `tuples` +- `numbers` +- `iteration` + +## Resources + +- [Comparisons in Python (Python language reference)](https://docs.python.org/3/reference/expressions.html#comparisons) +- [Value comparisons in Python (Python language reference)](https://docs.python.org/3/reference/expressions.html#value-comparisons) +- [Identity comparisons in Python (Python language reference)](https://docs.python.org/3/reference/expressions.html#is-not) +- [Python operators official doc](https://docs.python.org/3/library/operator.html) +- [Python Object Model (Python docs)](https://docs.python.org/3/reference/datamodel.html#objects) +- [Basic Customization](https://docs.python.org/3/reference/datamodel.html#customization) +- [Python basic operators on tutorialspoint](https://www.tutorialspoint.com/python/python_basic_operators.htm) +- [Python comparison operators on data-flair](https://data-flair.training/blogs/python-comparison-operators/) +- [PEP 207 to allow Operator Overloading for Comparison](https://www.python.org/dev/peps/pep-0207/) + +[numbers]: https://docs.python.org/3/library/stdtypes.html#typesnumeric +[decimals]: https://docs.python.org/3/library/decimal.html#decimal.Decimal +[fractions]: https://docs.python.org/3/library/fractions.html#fractions.Fraction +[sequence types]: https://docs.python.org/3/library/stdtypes.html#sequence-types-list-tuple-range \ No newline at end of file diff --git a/exercises/concept/black-jack/.meta/exemplar.py b/exercises/concept/black-jack/.meta/exemplar.py new file mode 100644 index 0000000000..677b9b433b --- /dev/null +++ b/exercises/concept/black-jack/.meta/exemplar.py @@ -0,0 +1,23 @@ +def number_of_card(card): + if card == 'A': + return "ace" + elif card == 'J' or card == 'Q' or card == 'K': + return 10 + else: + return card + + +def number_of_ace(hand): + if hand+11 <= 21: + return 11 + else: + return 1 + + +def blackjack(hand): + if 'A' not in hand: + return False + elif 'J' in hand or 'Q' in hand or 'K' in hand or 10 in hand: + return True + else: + False \ No newline at end of file diff --git a/exercises/concept/black-jack/black-jack.py b/exercises/concept/black-jack/black-jack.py new file mode 100644 index 0000000000..1c0be61572 --- /dev/null +++ b/exercises/concept/black-jack/black-jack.py @@ -0,0 +1,10 @@ +def number_of_card(card): + pass + + +def number_of_ace(hand): + pass + + +def blackjack(hand): + pass \ No newline at end of file diff --git a/exercises/concept/black-jack/black-jack_test.py b/exercises/concept/black-jack/black-jack_test.py new file mode 100644 index 0000000000..78541757e2 --- /dev/null +++ b/exercises/concept/black-jack/black-jack_test.py @@ -0,0 +1,41 @@ +import unittest +from comparisons import * + + +class TestComparisons(unittest.TestCase): + + # Problem 1 + def test_number_of_card(self): + input_data = [ + # input : card + 'K', + 'A' + ] + output_data = [10, "ace"] + for input, output in zip(input_data, output_data): + with self.subTest(input=input, output=output): + self.assertEqual(number_of_card(input[0], input[1]), output) + + # Problem 2 + def test_number_of_ace(self): + input_data = [ + # input : hand + 19, + 7 + ] + output_data = [1, 11] + for input, output in zip(input_data, output_data): + with self.subTest(input=input, output=output): + self.assertEqual(number_of_ace(input[0], input[1]), output) + + # Problem 3 + def test_blackjack(self): + input_data = [ + # input : hand + ['A', 'J'], + [10, 9] + ] + output_data = [True, False] + for input, output in zip(input_data, output_data): + with self.subTest(input=input, output=output): + self.assertEqual(blackjack(input[0], input[1]), output) \ No newline at end of file From 35af71653b8c448cd31fe3d291e090f37d5aafb1 Mon Sep 17 00:00:00 2001 From: BethanyG Date: Sat, 8 May 2021 21:27:32 -0700 Subject: [PATCH 2/3] Changed author array in .meta/config.json to just github username. --- .../concept/black-jack/.meta/config.json | 41 +++---------------- 1 file changed, 6 insertions(+), 35 deletions(-) diff --git a/exercises/concept/black-jack/.meta/config.json b/exercises/concept/black-jack/.meta/config.json index 28e55f7bb2..04c8140fc2 100644 --- a/exercises/concept/black-jack/.meta/config.json +++ b/exercises/concept/black-jack/.meta/config.json @@ -1,39 +1,10 @@ { "blurb": "Learn about comparisons by implementing some Black Jack judging rules.", - "authors": [ - { - "github_username": "Ticktakto", - "exercism_username": "Ticktakto" - }, - { - "github_username": "Yabby1997", - "exercism_username": "Yabby1997" - }, - { - "github_username": "limm-jk", - "exercism_username": "limm-jk" - }, - { - "github_username": "OMEGA-Y", - "exercism_username": "OMEGA-Y" - }, - { - "github_username": "wnstj2007", - "exercism_username": "wnstj2007" - } - ], - "contributors": [ - "bethanyg" - ], + "authors": ["Ticktakto", "Yabby1997", "limm-jk", "OMEGA-Y", "wnstj2007"], + "contributors": ["bethanyg"], "files": { - "solution": [ - "black-jack.py" - ], - "test": [ - "black-jack_test.py" - ], - "exemplar": [ - ".meta/exemplar.py" - ] + "solution": ["black-jack.py"], + "test": ["black-jack_test.py"], + "exemplar": [".meta/exemplar.py"] } -} \ No newline at end of file +} From 13ef59a374aee05ad67179464fd6caa45de3dac7 Mon Sep 17 00:00:00 2001 From: BethanyG Date: Mon, 10 May 2021 08:35:10 -0700 Subject: [PATCH 3/3] Added black-jack concept exercise and ran prettier. --- config.json | 235 ++++++++++++---------------------------------------- 1 file changed, 54 insertions(+), 181 deletions(-) diff --git a/config.json b/config.json index ff789f9d4d..36a4da9091 100644 --- a/config.json +++ b/config.json @@ -17,18 +17,10 @@ "highlightjs_language": "python" }, "files": { - "solution": [ - "%{snake_slug}.py" - ], - "test": [ - "%{snake_slug}_test.py" - ], - "example": [ - ".meta/example.py" - ], - "exemplar": [ - ".meta/exemplar.py" - ] + "solution": ["%{snake_slug}.py"], + "test": ["%{snake_slug}_test.py"], + "example": [".meta/example.py"], + "exemplar": [".meta/exemplar.py"] }, "exercises": { "concept": [ @@ -36,36 +28,23 @@ "slug": "processing-logs", "name": "Processing Logs", "uuid": "5a9b42fb-ddf4-424b-995d-f9952ea63c37", - "concepts": [ - "strings" - ], - "prerequisites": [ - "basics" - ], + "concepts": ["strings"], + "prerequisites": ["basics"], "status": "wip" }, { "slug": "tisbury-treasure-hunt", "name": "Tisbury Treasure Hunt", "uuid": "7ecd42c1-2ed5-487a-bc89-71c9cbad9b05", - "concepts": [ - "tuples" - ], - "prerequisites": [ - "bools", - "loops", - "conditionals", - "numbers" - ], + "concepts": ["tuples"], + "prerequisites": ["bools", "loops", "conditionals", "numbers"], "status": "wip" }, { "slug": "guidos-gorgeous-lasagna", "name": "Guido's Gorgeous Lasagna", "uuid": "dfd7dc01-3544-4f61-a063-af8530d6e601", - "concepts": [ - "basics" - ], + "concepts": ["basics"], "prerequisites": [], "status": "wip" }, @@ -73,50 +52,39 @@ "slug": "ghost-gobble-arcade-game", "name": "Ghost Gobble Arcade Game", "uuid": "c050470d-ef22-4187-aaac-239e07955a4d", - "concepts": [ - "bools" - ], - "prerequisites": [ - "basics" - ], + "concepts": ["bools"], + "prerequisites": ["basics"], + "status": "wip" + }, + { + "slug": "black-jack", + "name": "Black Jack", + "uuid": "e1a6075e-0c5e-48cd-8c50-69140961a06a", + "concepts": ["comparisons"], + "prerequisites": ["basics"], "status": "wip" }, { "slug": "pretty-leaflet", "name": "Pretty Leaflet", "uuid": "5b813a3a-1983-470b-91a1-9f2c0b327ab7", - "concepts": [ - "string-formatting" - ], - "prerequisites": [ - "strings", - "classes", - "loops", - "lists" - ], + "concepts": ["string-formatting"], + "prerequisites": ["strings", "classes", "loops", "lists"], "status": "wip" }, { "slug": "inventory-management", "name": "Inventory Management", "uuid": "0558b66c-f2c8-4ff3-846a-4ac87a8660d9", - "concepts": [ - "dicts" - ], - "prerequisites": [ - "loops", - "lists", - "tuples" - ], + "concepts": ["dicts"], + "prerequisites": ["loops", "lists", "tuples"], "status": "wip" }, { "slug": "log-levels", "name": "Log Levels", "uuid": "083f29eb-734f-4d4a-9f27-3e8ceedc29b1", - "concepts": [ - "enums" - ], + "concepts": ["enums"], "prerequisites": [ "classes", "conditionals", @@ -133,34 +101,23 @@ "slug": "elyses-enchantments", "name": "Elyse's Enchantments", "uuid": "d76958ce-3a5b-4e4c-9388-b109f67cf23a", - "concepts": [ - "lists" - ], - "prerequisites": [ - "conditionals", - "strings" - ], + "concepts": ["lists"], + "prerequisites": ["conditionals", "strings"], "status": "wip" }, { "slug": "chaitanas-colossal-coaster", "name": "Chaitana's Colossal Coaster", "uuid": "f326f3f8-1ab0-4d3d-8f42-5130fe5af841", - "concepts": [ - "list-methods" - ], - "prerequisites": [ - "lists" - ], + "concepts": ["list-methods"], + "prerequisites": ["lists"], "status": "wip" }, { "slug": "restaurant-rozalynn", "name": "Restaurant Rozalynn", "uuid": "72c9aa99-20be-4e96-8ade-56c26d598498", - "concepts": [ - "none" - ], + "concepts": ["none"], "prerequisites": [ "bools", "conditionals", @@ -175,9 +132,7 @@ "slug": "making-the-grade", "name": "Making the Grade", "uuid": "f6a8d4bd-4ead-438f-b44f-d3578be1702f", - "concepts": [ - "loops" - ], + "concepts": ["loops"], "prerequisites": [ "basics", "comparisons", @@ -192,25 +147,16 @@ "slug": "little-sisters-essay", "name": "Little Sister's Essay", "uuid": "09c322bc-5c04-480b-8441-fd9ef5c7a3b4", - "concepts": [ - "string-methods" - ], - "prerequisites": [ - "basics", - "strings" - ], + "concepts": ["string-methods"], + "prerequisites": ["basics", "strings"], "status": "wip" }, { "slug": "currency-exchange", "name": "Currency Exchange", "uuid": "1335ca33-3af0-4720-bcf2-bfa68ffc6862", - "concepts": [ - "numbers" - ], - "prerequisites": [ - "basics" - ], + "concepts": ["numbers"], + "prerequisites": ["basics"], "status": "wip" } ], @@ -227,15 +173,8 @@ "slug": "two-fer", "name": "Two Fer", "uuid": "4177de10-f767-4306-b45d-5e9c08ef4753", - "practices": [ - "string-formatting", - "function-arguments" - ], - "prerequisites": [ - "basics", - "string-formatting", - "function-arguments" - ], + "practices": ["string-formatting", "function-arguments"], + "prerequisites": ["basics", "string-formatting", "function-arguments"], "difficulty": 1 }, { @@ -266,17 +205,8 @@ "slug": "high-scores", "name": "High Scores", "uuid": "574d6323-5ff5-4019-9ebe-0067daafba13", - "practices": [ - "sequences", - "lists", - "list-methods" - ], - "prerequisites": [ - "basics", - "lists", - "list-methods", - "sequences" - ], + "practices": ["sequences", "lists", "list-methods"], + "prerequisites": ["basics", "lists", "list-methods", "sequences"], "difficulty": 1 }, { @@ -339,12 +269,7 @@ "slug": "isogram", "name": "Isogram", "uuid": "d1a98c79-d3cc-4035-baab-0e334d2b6a57", - "practices": [ - "sets", - "strings", - "string-methods", - "comparisons" - ], + "practices": ["sets", "strings", "string-methods", "comparisons"], "prerequisites": [ "basics", "bools", @@ -574,10 +499,7 @@ "slug": "markdown", "name": "Markdown", "uuid": "88610b9a-6d3e-4924-a092-6d2f907ed4e2", - "practices": [ - "regular-expressions", - "functions" - ], + "practices": ["regular-expressions", "functions"], "prerequisites": [ "basics", "conditionals", @@ -687,9 +609,7 @@ "slug": "pangram", "name": "Pangram", "uuid": "bebf7ae6-1c35-48bc-926b-e053a975eb10", - "practices": [ - "sets" - ], + "practices": ["sets"], "prerequisites": [ "basics", "bools", @@ -1040,10 +960,7 @@ "slug": "triangle", "name": "Triangle", "uuid": "f0bc144f-3226-4e53-93ee-e60316b29e31", - "practices": [ - "bools", - "comparisons" - ], + "practices": ["bools", "comparisons"], "prerequisites": [ "basics", "bools", @@ -1058,10 +975,7 @@ "slug": "grains", "name": "Grains", "uuid": "a24e6d34-9952-44f4-a0cd-02c7fedb4875", - "practices": [ - "numbers", - "raising-and-handling-errors" - ], + "practices": ["numbers", "raising-and-handling-errors"], "prerequisites": [ "basics", "numbers", @@ -1881,11 +1795,7 @@ "slug": "etl", "name": "Etl", "uuid": "a3b24ef2-303a-494e-8804-e52a67ef406b", - "practices": [ - "dicts", - "dict-methods", - "other-comprehensions" - ], + "practices": ["dicts", "dict-methods", "other-comprehensions"], "prerequisites": [ "basics", "list-comprehensions", @@ -3554,9 +3464,7 @@ "slug": "accumulate", "name": "Accumulate", "uuid": "e7351e8e-d3ff-4621-b818-cd55cf05bffd", - "practices": [ - "list-comprehensions" - ], + "practices": ["list-comprehensions"], "prerequisites": [ "basics", "loops", @@ -3715,13 +3623,7 @@ "slug": "parallel-letter-frequency", "name": "Parallel Letter Frequency", "uuid": "da03fca4-4606-48d8-9137-6e40396f7759", - "practices": [ - "lists", - "loops", - "strings", - "string-methods", - "dicts" - ], + "practices": ["lists", "loops", "strings", "string-methods", "dicts"], "prerequisites": [ "basics", "bools", @@ -3836,10 +3738,7 @@ "slug": "strain", "name": "Strain", "uuid": "b50b29a1-782d-4277-a4d4-23f635fbdaa6", - "practices": [ - "conditionals", - "list-comprehensions" - ], + "practices": ["conditionals", "list-comprehensions"], "prerequisites": [ "basics", "bools", @@ -3926,9 +3825,7 @@ "slug": "gigasecond", "name": "Gigasecond", "uuid": "22606e91-57f3-44cf-ab2d-94f6ee6402e8", - "practices": [ - "numbers" - ], + "practices": ["numbers"], "prerequisites": [ "basics", "bools", @@ -3942,27 +3839,15 @@ "slug": "leap", "name": "Leap", "uuid": "b6acda85-5f62-4d9c-bb4f-42b7a360355a", - "practices": [ - "bools", - "conditionals", - "numbers" - ], - "prerequisites": [ - "basics", - "bools", - "conditionals", - "numbers" - ], + "practices": ["bools", "conditionals", "numbers"], + "prerequisites": ["basics", "bools", "conditionals", "numbers"], "difficulty": 1 }, { "slug": "resistor-color", "name": "Resistor Color", "uuid": "d17bee9c-e803-4745-85ea-864f255fb04e", - "practices": [ - "lists", - "list-methods" - ], + "practices": ["lists", "list-methods"], "prerequisites": [ "basics", "bools", @@ -3977,12 +3862,7 @@ "slug": "resistor-color-duo", "name": "Resistor Color Duo", "uuid": "089f06a6-0759-479c-8c00-d699525a1e22", - "practices": [ - "lists", - "list-methods", - "numbers", - "sequences" - ], + "practices": ["lists", "list-methods", "numbers", "sequences"], "prerequisites": [ "basics", "bools", @@ -4111,12 +3991,7 @@ "slug": "darts", "name": "Darts", "uuid": "cb581e2c-66ab-4221-9884-44bacb7c4ebe", - "practices": [ - "bools", - "conditionals", - "comparisons", - "numbers" - ], + "practices": ["bools", "conditionals", "comparisons", "numbers"], "prerequisites": [ "basics", "bools", @@ -4305,9 +4180,7 @@ "difficulty": 7 } ], - "foregone": [ - "lens-person" - ] + "foregone": ["lens-person"] }, "concepts": [ {