Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exercises no longer ask developers to 'write a function' (#2396) #2406

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions exercises/alphametics/description.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Description

Write a function to solve alphametics puzzles.
Given an alphametics puzzle, find the correct solution.

[Alphametics][alphametics] is a puzzle where letters in words are replaced with numbers.

Expand All @@ -26,6 +26,4 @@ This is correct because every letter is replaced by a different number and the w

Each letter must represent a different digit, and the leading digit of a multi-digit number must not be zero.

Write a function to solve alphametics puzzles.

[alphametics]: https://en.wikipedia.org/wiki/Alphametics
2 changes: 1 addition & 1 deletion exercises/alphametics/metadata.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
title = "Alphametics"
blurb = "Write a function to solve alphametics puzzles."
blurb = "Given an alphametics puzzle, find the correct solution."
4 changes: 2 additions & 2 deletions exercises/darts/description.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Description

Write a function that returns the earned points in a single toss of a Darts game.
Calculate the points scored in a single toss of a Darts game.

[Darts][darts] is a game where players throw darts at a [target][darts-target].

Expand All @@ -16,7 +16,7 @@ In our particular instance of the game, the target rewards 4 different amounts o
The outer circle has a radius of 10 units (this is equivalent to the total radius for the entire target), the middle circle a radius of 5 units, and the inner circle a radius of 1.
Of course, they are all centered at the same point — that is, the circles are [concentric][] defined by the coordinates (0, 0).

Write a function that given a point in the target (defined by its [Cartesian coordinates][cartesian-coordinates] `x` and `y`, where `x` and `y` are [real][real-numbers]), returns the correct amount earned by a dart landing at that point.
Given a point in the target (defined by its [Cartesian coordinates][cartesian-coordinates] `x` and `y`, where `x` and `y` are [real][real-numbers]), calculate the correct score earned by a dart landing at that point.

## Credit

Expand Down
2 changes: 1 addition & 1 deletion exercises/darts/metadata.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
title = "Darts"
blurb = "Write a function that returns the earned points in a single toss of a Darts game."
blurb = "Calculate the points scored in a single toss of a Darts game."
source = "Inspired by an exercise created by a professor Della Paolera in Argentina"
2 changes: 1 addition & 1 deletion exercises/flatten-array/description.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Take a nested list and return a single flattened list with all values except nil/null.

The challenge is to write a function that accepts an arbitrarily-deep nested list-like structure and returns a flattened structure without any nil/null values.
The challenge is to take an arbitrarily-deep nested list-like structure and produce a flattened structure without any nil/null values.

For example:

Expand Down
4 changes: 2 additions & 2 deletions exercises/go-counting/description.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Count the scored points on a Go board.
In the game of go (also known as baduk, igo, cờ vây and wéiqí) points are gained by completely encircling empty intersections with your stones.
The encircled intersections of a player are known as its territory.

Write a function that determines the territory of each player.
Calculate the territory of each player.
You may assume that any stones that have been stranded in enemy territory have already been taken off the board.

Write a function that determines the territory which includes a specified coordinate.
Determine the territory which includes a specified coordinate.

Multiple empty intersections may be encircled at once and for encircling only horizontal and vertical neighbors count.
In the following diagram the stones which matter are marked "O" and the stones that don't are marked "I" (ignored).
Expand Down
2 changes: 1 addition & 1 deletion exercises/nucleotide-codons/description.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Description

Write a function that returns the name of an amino acid a particular codon, possibly using shorthand, encodes for.
Translate a given codon into the name of the amino acid that it encodes, possibly using shorthand.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're rewording this, the exercise asks you to translate a sequence of codons into a sequence of amino acids. There's no shorthands in any of the tracks that I've seen.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that's explained in the description. DNA has the 4 bases, Adenine, Cytine, Thymine, Guanine. The shorthand it talks about is to do with the fact that multiple codons can map to the same amino acid, e.g. AAA and AAG both map to Lysine. So the shorthand they came up with is AAR (R means A|G). I think the "may use shorthand" language is due to the fact that the input might be "AAA", "AAG", or "AAR" and the expected output would be "Lysine"? But I haven't done the exercise yet.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, wrote that from phone while horizontal and in pain 😅. Had a quick chance to search, and -- because the exercise is deprecated? -- I've only found it (locked) on the Rust track. Because of that and the fact that there's no canonical-data.json file I can't confirm my assumption above is correct.

Since the exercise is deprecated, is it worth further effort to refine the text?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the exercise is deprecated, is it worth further effort to refine the text?

Not really


In DNA sequences of 3 nucleotides, called codons, encode for amino acids.
Often several codons encode for the same amino acid.
Expand Down
2 changes: 1 addition & 1 deletion exercises/nucleotide-codons/metadata.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
title = "Nucleotide Codons"
blurb = "Write a function that returns the name of an amino acid a particular codon, possibly using shorthand, encodes for."
blurb = "Translate a given codon into the amino acid it encodes, possibly using shorthand."
2 changes: 1 addition & 1 deletion exercises/parallel-letter-frequency/description.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ Count the frequency of letters in texts using parallel computation.

Parallelism is about doing things in parallel that can also be done sequentially.
A common example is counting the frequency of letters.
Create a function that returns the total frequency of each letter in a list of texts and that employs parallelism.
Employ parallelism to calculate the total frequency of each letter in a list of texts.
Loading