Skip to content
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
6 changes: 4 additions & 2 deletions exercises/practice/allergies/.meta/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"authors": ["glaxxie"],
"authors": [
"glaxxie"
],
"files": {
"solution": [
"Allergies.ps1"
Expand All @@ -13,5 +15,5 @@
},
"blurb": "Given a person's allergy score, determine whether or not they're allergic to a given item, and their full list of allergies.",
"source": "Exercise by the JumpstartLab team for students at The Turing School of Software and Design.",
"source_url": "https://turing.edu"
"source_url": "https://www.turing.edu/"
}
4 changes: 1 addition & 3 deletions exercises/practice/alphametics/.docs/instructions.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Instructions

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/practice/alphametics/.meta/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
]
},
"test_runner": false,
"blurb": "Write a function to solve alphametics puzzles."
"blurb": "Given an alphametics puzzle, find the correct solution."
}
6 changes: 4 additions & 2 deletions exercises/practice/anagram/.meta/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"authors": ["meatball133"],
"authors": [
"meatball133"
],
"files": {
"solution": [
"Anagram.ps1"
Expand All @@ -11,7 +13,7 @@
".meta/Anagram.example.ps1"
]
},
"blurb": "Given a word and a list of possible anagrams, select the correct sublist.",
"blurb": "Find the words that use the same letters as another word.",
"source": "Inspired by the Extreme Startup game",
"source_url": "https://github.com/rchatley/extreme_startup"
}
2 changes: 1 addition & 1 deletion exercises/practice/bob/.meta/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@
},
"blurb": "Bob is a lackadaisical teenager. In conversation, his responses are very limited.",
"source": "Inspired by the 'Deaf Grandma' exercise in Chris Pine's Learn to Program tutorial.",
"source_url": "https://pine.fm/LearnToProgram/?Chapter=06"
"source_url": "https://pine.fm/LearnToProgram/chap_06.html"
}
2 changes: 1 addition & 1 deletion exercises/practice/book-store/.meta/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
},
"blurb": "To try and encourage more sales of different books from a popular 5 book series, a bookshop has decided to offer discounts of multiple-book purchases.",
"source": "Inspired by the harry potter kata from Cyber-Dojo.",
"source_url": "https://cyber-dojo.org"
"source_url": "https://cyber-dojo.org/creator/home"
}
4 changes: 2 additions & 2 deletions exercises/practice/etl/.meta/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
},
"blurb": "Change the data format for scoring a game to more easily add other languages.",
"source": "Based on an exercise by the JumpstartLab team for students at The Turing School of Software and Design.",
"source_url": "https://turing.edu"
}
"source_url": "https://www.turing.edu/"
}
6 changes: 4 additions & 2 deletions exercises/practice/gigasecond/.meta/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"authors": ["meatball133"],
"authors": [
"meatball133"
],
"files": {
"solution": [
"Gigasecond.ps1"
Expand All @@ -13,5 +15,5 @@
},
"blurb": "Given a moment, determine the moment that would be after a gigasecond has passed.",
"source": "Chapter 9 in Chris Pine's online Learn to Program tutorial.",
"source_url": "https://pine.fm/LearnToProgram/?Chapter=09"
"source_url": "https://pine.fm/LearnToProgram/chap_09.html"
}
5 changes: 5 additions & 0 deletions exercises/practice/grep/.docs/introduction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Introduction

You have taken a job at a local library helping organize their collection of old books.
The student patrons are often hunting for half-remembered quotes to cite in their term papers.
Rather than manually read every book from cover to cover, you decide to build a small tool to scan them, looking for these partial quotes.
4 changes: 2 additions & 2 deletions exercises/practice/grep/.meta/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
".meta/Grep.example.ps1"
]
},
"blurb": "Search a file for lines matching a regular expression pattern. Return the line number and contents of each matching line.",
"blurb": "Search a file for lines matching a regular expression pattern.",
"source": "Conversation with Nate Foster.",
"source_url": "https://www.cs.cornell.edu/Courses/cs3110/2014sp/hw/0/ps0.pdf"
"source_url": "https://www.cs.cornell.edu/courses/cs3110/2014sp/hw/0/ps0.pdf"
}
6 changes: 4 additions & 2 deletions exercises/practice/isogram/.meta/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"authors": ["meatball133"],
"authors": [
"meatball133"
],
"files": {
"solution": [
"Isogram.ps1"
Expand All @@ -11,7 +13,7 @@
".meta/Isogram.example.ps1"
]
},
"blurb": "Determine if a word or phrase is an isogram.",
"blurb": "Determine whether a phrase is an isogram, a word with no repeated letters.",
"source": "Wikipedia",
"source_url": "https://en.wikipedia.org/wiki/Isogram"
}
8 changes: 4 additions & 4 deletions exercises/practice/killer-sudoku-helper/.docs/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,12 @@ You can also find Killer Sudokus in varying difficulty in numerous newspapers, a

## Credit

The screenshots above have been generated using [F-Puzzles.com](https://www.f-puzzles.com/), a Puzzle Setting Tool by Eric Fox.
The screenshots above have been generated using F-Puzzles.com, a Puzzle Setting Tool by Eric Fox.

[sudoku-rules]: https://masteringsudoku.com/sudoku-rules-beginners/
[killer-guide]: https://masteringsudoku.com/killer-sudoku/
[sudoku-rules]: https://en.wikipedia.org/wiki/Sudoku
[killer-guide]: https://en.wikipedia.org/wiki/Killer_sudoku
[one-solution-img]: https://assets.exercism.org/images/exercises/killer-sudoku-helper/example1.png
[four-solutions-img]: https://assets.exercism.org/images/exercises/killer-sudoku-helper/example2.png
[not-possible-img]: https://assets.exercism.org/images/exercises/killer-sudoku-helper/example3.png
[clover-puzzle]: https://app.crackingthecryptic.com/sudoku/HqTBn3Pr6R
[clover-puzzle]: https://sudokupad.app/HqTBn3Pr6R
[goodliffe-video]: https://youtu.be/c_NjEbFEeW0?t=1180
6 changes: 4 additions & 2 deletions exercises/practice/kindergarten-garden/.meta/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"authors": ["glaxxie"],
"authors": [
"glaxxie"
],
"files": {
"solution": [
"KindergartenGarden.ps1"
Expand All @@ -13,5 +15,5 @@
},
"blurb": "Given a diagram, determine which plants each child in the kindergarten class is responsible for.",
"source": "Exercise by the JumpstartLab team for students at The Turing School of Software and Design.",
"source_url": "https://turing.edu"
"source_url": "https://www.turing.edu/"
}
6 changes: 3 additions & 3 deletions exercises/practice/line-up/.docs/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ Yaʻqūb expects to use numbers from 1 up to 999.

Rules:

- Numbers ending in 1 (except for 11) → `"st"`
- Numbers ending in 2 (except for 12) → `"nd"`
- Numbers ending in 3 (except for 13) → `"rd"`
- Numbers ending in 1 (unless ending in 11) → `"st"`
- Numbers ending in 2 (unless ending in 12) → `"nd"`
- Numbers ending in 3 (unless ending in 13) → `"rd"`
- All other numbers → `"th"`

Examples:
Expand Down
2 changes: 1 addition & 1 deletion exercises/practice/markdown/.docs/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ Your challenge is to re-write this code to make it easier to read and maintain w
It would be helpful if you made notes of what you did in your refactoring in comments so reviewers can see that, but it isn't strictly necessary.
The most important thing is to make the code better!

[markdown]: https://guides.github.com/features/mastering-markdown/
[markdown]: https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax
6 changes: 4 additions & 2 deletions exercises/practice/matrix/.meta/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"authors": ["meatball133"],
"authors": [
"meatball133"
],
"files": {
"solution": [
"Matrix.ps1"
Expand All @@ -13,5 +15,5 @@
},
"blurb": "Given a string representing a matrix of numbers, return the rows and columns of that matrix.",
"source": "Exercise by the JumpstartLab team for students at The Turing School of Software and Design.",
"source_url": "https://turing.edu"
"source_url": "https://www.turing.edu/"
}
2 changes: 1 addition & 1 deletion exercises/practice/nucleotide-count/.meta/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
]
},
"blurb": "Given a DNA string, compute how many times each nucleotide occurs in the string.",
"source": "The Calculating DNA Nucleotides_problem at Rosalind",
"source": "The Counting DNA Nucleotides problem at Rosalind",
"source_url": "https://rosalind.info/problems/dna/"
}
80 changes: 24 additions & 56 deletions exercises/practice/ocr-numbers/.docs/instructions.md
Original file line number Diff line number Diff line change
@@ -1,79 +1,47 @@
# Instructions

Given a 3 x 4 grid of pipes, underscores, and spaces, determine which number is represented, or whether it is garbled.
Optical Character Recognition or OCR is software that converts images of text into machine-readable text.
Given a grid of characters representing some digits, convert the grid to a string of digits.
If the grid has multiple rows of cells, the rows should be separated in the output with a `","`.

## Step One
- The grid is made of one of more lines of cells.
- Each line of the grid is made of one or more cells.
- Each cell is three columns wide and four rows high (3x4) and represents one digit.
- Digits are drawn using pipes (`"|"`), underscores (`"_"`), and spaces (`" "`).

To begin with, convert a simple binary font to a string containing 0 or 1.
## Edge cases

The binary font uses pipes and underscores, four rows high and three columns wide.
- If the input is not a valid size, your program should indicate there is an error.
- If the input is the correct size, but a cell is not recognizable, your program should output a `"?"` for that character.

```text
_ #
| | # zero.
|_| #
# the fourth row is always blank
```
## Examples

Is converted to "0"

```text
#
| # one.
| #
# (blank fourth row)
```

Is converted to "1"

If the input is the correct size, but not recognizable, your program should return '?'

If the input is the incorrect size, your program should return an error.

## Step Two

Update your program to recognize multi-character binary strings, replacing garbled numbers with ?

## Step Three

Update your program to recognize all numbers 0 through 9, both individually and as part of a larger string.

```text
_
_|
|_

```

Is converted to "2"
The following input (without the comments) is converted to `"1234567890"`.

```text
_ _ _ _ _ _ _ _ #
| _| _||_||_ |_ ||_||_|| | # decimal numbers.
| _| _||_||_ |_ ||_||_|| | # Decimal numbers.
||_ _| | _||_| ||_| _||_| #
# fourth line is always blank
# The fourth line is always blank,
```

Is converted to "1234567890"

## Step Four
The following input is converted to `"123,456,789"`.

Update your program to handle multiple numbers, one per line.
When converting several lines, join the lines with commas.
<!-- prettier-ignore-start -->

```text
_ _
_ _
| _| _|
||_ _|

_ _
|_||_ |_
_ _
|_||_ |_
| _||_|

_ _ _
_ _ _
||_||_|
||_| _|

```

Is converted to "123,456,789".
<!-- prettier-ignore-end -->
6 changes: 6 additions & 0 deletions exercises/practice/ocr-numbers/.docs/introduction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Introduction

Your best friend Marta recently landed their dream job working with a local history museum's collections.
Knowing of your interests in programming, they confide in you about an issue at work for an upcoming exhibit on computing history.
A local university's math department had donated several boxes of historical printouts, but given the poor condition of the documents, the decision has been made to digitize the text.
However, the university's old printer had some quirks in how text was represented, and your friend could use your help to extract the data successfully.
6 changes: 4 additions & 2 deletions exercises/practice/pangram/.meta/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"authors": ["meatball133"],
"authors": [
"meatball133"
],
"files": {
"solution": [
"Pangram.ps1"
Expand All @@ -11,7 +13,7 @@
".meta/Pangram.example.ps1"
]
},
"blurb": "Determine if a sentence is a pangram.",
"blurb": "Determine whether a phrase uses every letter in the Latin alphabet.",
"source": "Wikipedia",
"source_url": "https://en.wikipedia.org/wiki/Pangram"
}
2 changes: 1 addition & 1 deletion exercises/practice/perfect-numbers/.meta/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
},
"blurb": "Determine if a number is perfect, abundant, or deficient based on Nicomachus' (60 - 120 CE) classification scheme for positive integers.",
"source": "Taken from Chapter 2 of Functional Thinking by Neal Ford.",
"source_url": "https://www.oreilly.com/library/view/functional-thinking/9781449365509/"
"source_url": "https://nealford.com/books/functionalthinking.html"
}
6 changes: 4 additions & 2 deletions exercises/practice/phone-number/.meta/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"authors": ["glaxxie"],
"authors": [
"glaxxie"
],
"files": {
"solution": [
"PhoneNumber.ps1"
Expand All @@ -13,5 +15,5 @@
},
"blurb": "Clean up user-entered phone numbers so that they can be sent SMS messages.",
"source": "Exercise by the JumpstartLab team for students at The Turing School of Software and Design.",
"source_url": "https://turing.edu"
"source_url": "https://www.turing.edu/"
}
12 changes: 9 additions & 3 deletions exercises/practice/piecing-it-together/.docs/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,24 @@ For this exercise, you may assume square pieces, so that the format can be deriv

### Portrait

A portrait jigsaw puzzle with 6 pieces, all of which are border pieces and none are inside pieces. It has 3 rows and 2 columns. The aspect ratio is 1.5 (3/2).
A portrait jigsaw puzzle with 6 pieces, all of which are border pieces and none are inside pieces.
It has 2 columns and 3 rows.
The aspect ratio is 0.666666... (2/3).

![A 2 by 3 jigsaw puzzle](https://assets.exercism.org/images/exercises/piecing-it-together/jigsaw-puzzle-2x3.svg)

### Square

A square jigsaw puzzle with 9 pieces, all of which are border pieces except for the one in the center, which is an inside piece. It has 3 rows and 3 columns. The aspect ratio is 1 (3/3).
A square jigsaw puzzle with 9 pieces, all of which are border pieces except for the one in the center, which is an inside piece.
It has 3 columns and 3 rows.
The aspect ratio is 1.0 (3/3).

![A 3 by 3 jigsaw puzzle](https://assets.exercism.org/images/exercises/piecing-it-together/jigsaw-puzzle-3x3.svg)

### Landscape

A landscape jigsaw puzzle with 12 pieces, 10 of which are border pieces and 2 are inside pieces. It has 3 rows and 4 columns. The aspect ratio is 1.333333... (4/3).
A landscape jigsaw puzzle with 12 pieces, 10 of which are border pieces and 2 are inside pieces.
It has 4 columns and 3 rows.
The aspect ratio is 1.333333... (4/3).

![A 4 by 3 jigsaw puzzle](https://assets.exercism.org/images/exercises/piecing-it-together/jigsaw-puzzle-4x3.svg)
2 changes: 1 addition & 1 deletion exercises/practice/pig-latin/.meta/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
},
"blurb": "Implement a program that translates from English to Pig Latin.",
"source": "The Pig Latin exercise at Test First Teaching by Ultrasaurus",
"source_url": "https://github.com/ultrasaurus/test-first-teaching/blob/master/learn_ruby/pig_latin/"
"source_url": "https://github.com/ultrasaurus/test-first-teaching/tree/master/learn_ruby/pig_latin"
}
2 changes: 1 addition & 1 deletion exercises/practice/relative-distance/.docs/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ Isla and Tariq are siblings and have a separation of 1.
Similarly, this implementation would report a separation of 2 from you to your father's brother.
~~~~

[six-bacons]: https://en.m.wikipedia.org/wiki/Six_Degrees_of_Kevin_Bacon
[six-bacons]: https://en.wikipedia.org/wiki/Six_Degrees_of_Kevin_Bacon
Loading