Skip to content

Commit e8f0679

Browse files
🤖 Auto-sync docs, metadata, and filepaths (#287)
Co-authored-by: IsaacG <[email protected]>
1 parent 22c53f9 commit e8f0679

File tree

4 files changed

+39
-28
lines changed

4 files changed

+39
-28
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Introduction
2+
3+
A shipment of emergency supplies has arrived, but there's a problem.
4+
To protect from damage, the items — flashlights, first-aid kits, blankets — are packed inside boxes, and some of those boxes are nested several layers deep inside other boxes!
5+
6+
To be prepared for an emergency, everything must be easily accessible in one box.
7+
Can you unpack all the supplies and place them into a single box, so they're ready when needed most?

‎exercises/practice/luhn/.docs/instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ If the sum is evenly divisible by 10, the original number is valid.
4141

4242
### Invalid Canadian SIN
4343

44-
The number to be checked is `066 123 468`.
44+
The number to be checked is `066 123 478`.
4545

4646
We start at the end of the number and double every second digit, beginning with the second digit from the right and moving left.
4747

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Introduction
2+
3+
At the Global Verification Authority, you've just been entrusted with a critical assignment.
4+
Across the city, from online purchases to secure logins, countless operations rely on the accuracy of numerical identifiers like credit card numbers, bank account numbers, transaction codes, and tracking IDs.
5+
The Luhn algorithm is a simple checksum formula used to help identify mistyped numbers.
6+
7+
A batch of identifiers has just arrived on your desk.
8+
All of them must pass the Luhn test to ensure they're legitimate.
9+
If any fail, they'll be flagged as invalid, preventing mistakes such as incorrect transactions or failed account verifications.
10+
11+
Can you ensure this is done right? The integrity of many services depends on you.
Lines changed: 20 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,17 @@
11
# Instructions
22

3-
Translate RNA sequences into proteins.
3+
Your job is to translate RNA sequences into proteins.
44

5-
RNA can be broken into three-nucleotide sequences called codons, and then translated to a protein like so:
5+
RNA strands are made up of three-nucleotide sequences called **codons**.
6+
Each codon translates to an **amino acid**.
7+
When joined together, those amino acids make a protein.
68

7-
RNA: `"AUGUUUUCU"` => translates to
8-
9-
Codons: `"AUG", "UUU", "UCU"`
10-
=> which become a protein with the following sequence =>
11-
12-
Protein: `"Methionine", "Phenylalanine", "Serine"`
13-
14-
There are 64 codons which in turn correspond to 20 amino acids; however, all of the codon sequences and resulting amino acids are not important in this exercise.
15-
If it works for one codon, the program should work for all of them.
16-
However, feel free to expand the list in the test suite to include them all.
17-
18-
There are also three terminating codons (also known as 'STOP' codons); if any of these codons are encountered (by the ribosome), all translation ends and the protein is terminated.
19-
20-
All subsequent codons after are ignored, like this:
21-
22-
RNA: `"AUGUUUUCUUAAAUG"` =>
23-
24-
Codons: `"AUG", "UUU", "UCU", "UAA", "AUG"` =>
25-
26-
Protein: `"Methionine", "Phenylalanine", "Serine"`
27-
28-
Note the stop codon `"UAA"` terminates the translation and the final methionine is not translated into the protein sequence.
29-
30-
Below are the codons and resulting amino acids needed for the exercise.
9+
In the real world, there are 64 codons, which in turn correspond to 20 amino acids.
10+
However, for this exercise, you’ll only use a few of the possible 64.
11+
They are listed below:
3112

3213
| Codon | Amino Acid |
33-
| :----------------- | :------------ |
14+
| ------------------ | ------------- |
3415
| AUG | Methionine |
3516
| UUU, UUC | Phenylalanine |
3617
| UUA, UUG | Leucine |
@@ -40,6 +21,18 @@ Below are the codons and resulting amino acids needed for the exercise.
4021
| UGG | Tryptophan |
4122
| UAA, UAG, UGA | STOP |
4223

24+
For example, the RNA string “AUGUUUUCU” has three codons: “AUG”, “UUU” and “UCU”.
25+
These map to Methionine, Phenylalanine, and Serine.
26+
27+
## “STOP” Codons
28+
29+
You’ll note from the table above that there are three **“STOP” codons**.
30+
If you encounter any of these codons, ignore the rest of the sequence — the protein is complete.
31+
32+
For example, “AUGUUUUCUUAAAUG” contains a STOP codon (“UAA”).
33+
Once we reach that point, we stop processing.
34+
We therefore only consider the part before it (i.e. “AUGUUUUCU”), not any further codons after it (i.e. “AUG”).
35+
4336
Learn more about [protein translation on Wikipedia][protein-translation].
4437

4538
[protein-translation]: https://en.wikipedia.org/wiki/Translation_(biology)

0 commit comments

Comments
 (0)