From 5b3b65a72fa90a27a45448ebff3ea91beec6ef09 Mon Sep 17 00:00:00 2001 From: Bobbi Towers Date: Fri, 13 Oct 2023 09:10:22 -0700 Subject: [PATCH] add numbers to hints --- exercises/concept/card-games/.docs/hints.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/exercises/concept/card-games/.docs/hints.md b/exercises/concept/card-games/.docs/hints.md index 0dfbac62..3013115e 100644 --- a/exercises/concept/card-games/.docs/hints.md +++ b/exercises/concept/card-games/.docs/hints.md @@ -1,36 +1,36 @@ # Hints -## Tracking Poker Rounds +## 1. Tracking Poker Rounds - The [`list`][list] function returns a list consisting of the arguments it is passed. -## Keeping all Rounds in the Same Place +## 2. Keeping all Rounds in the Same Place - The [`concat`][concat] function can be used to concatenate two lists together. -## Finding Prior Rounds +## 3. Finding Prior Rounds - The [`some`][some] function will return the first logically true value in a collection. - [`boolean`][boolean] is useful in cases where a function returns a value but the tests are expecting a boolean. -## Averaging Card Values +## 4. Averaging Card Values - Recall basic arithmetic operators such as [`/`][division] and [`+`][addition]. - A collection of numbers can be summed using either [`apply`][apply] or [`reduce`][reduce]. - The [`count`][count] function returns the number of items in a collection. - The `/` function returns a ratio type when operating on integers. You can use [`double`][double] to convert a ratio to a decimal. -## Alternate Averages +## 5. Alternate Averages - There are sequence functions to return the [`first`][first] or [`last`] element of a sequential collection. - To find the middle card you can divide the number of cards by 2, round to the lowest integer with [`int`][int], and retrieve the card at that index using [`nth`][nth]. - Use [`or`][or] to determine if either condition is true. -## More Averaging Techniques +## 6. More Averaging Techniques - One way of retrieving the cards at even/odd indices would be to [`map`][map] a function using [`nth`][nth] over a [`range`][range], which takes an optional `step` argument. -## Bonus Round Rules +## 7. Bonus Round Rules - Recall how to use [`if`][if] from the exercise on conditionals. - You can return all items of a collection except for the last one using [`butlast`][butlast].