Skip to content
Open
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
2 changes: 1 addition & 1 deletion exercises/practice/allergies/.meta/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
"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/",
"custom": {
"version.tests.compatibility": "jest-27",
"flag.tests.task-per-describe": false,
Expand Down
2 changes: 1 addition & 1 deletion exercises/practice/bob/.meta/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
},
"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",
"custom": {
"version.tests.compatibility": "jest-27",
"flag.tests.task-per-describe": false,
Expand Down
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,7 +15,7 @@
},
"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",
"custom": {
"version.tests.compatibility": "jest-27",
"flag.tests.task-per-describe": false,
Expand Down
4 changes: 2 additions & 2 deletions exercises/practice/camicia/.docs/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ status: `"loop"`, cards: 8, tricks: 3
- **Cards**: total number of cards played throughout the game
- **Tricks**: number of times the central pile was collected

```exercism/advanced
~~~~exercism/advanced
For those who want to take on a more exciting challenge, the hunt for other records for the longest game with an end is still open.
There are 653,534,134,886,878,245,000 (approximately 654 quintillion) possibilities, and we haven't calculated them all yet!
```
~~~~
2 changes: 1 addition & 1 deletion exercises/practice/etl/.meta/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
"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/",
"custom": {
"version.tests.compatibility": "jest-27",
"flag.tests.task-per-describe": false,
Expand Down
2 changes: 1 addition & 1 deletion exercises/practice/gigasecond/.meta/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
},
"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",
"custom": {
"version.tests.compatibility": "jest-27",
"flag.tests.task-per-describe": false,
Expand Down
2 changes: 1 addition & 1 deletion exercises/practice/grep/.meta/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
"blurb": "Search a file for lines matching a regular expression pattern. Return the line number and contents of each matching line.",
"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",
"custom": {
"version.tests.compatibility": "jest-27",
"flag.tests.task-per-describe": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,5 +81,5 @@ The screenshots above have been generated using F-Puzzles.com, a Puzzle Setting
[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
2 changes: 1 addition & 1 deletion exercises/practice/kindergarten-garden/.meta/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
},
"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/",
"custom": {
"version.tests.compatibility": "jest-27",
"flag.tests.task-per-describe": false,
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
2 changes: 1 addition & 1 deletion exercises/practice/matrix/.meta/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
"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/",
"custom": {
"version.tests.compatibility": "jest-27",
"flag.tests.task-per-describe": false,
Expand Down
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.
2 changes: 1 addition & 1 deletion exercises/practice/phone-number/.meta/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
},
"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/",
"custom": {
"version.tests.compatibility": "jest-27",
"flag.tests.task-per-describe": false,
Expand Down
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 @@ -25,7 +25,7 @@
},
"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",
"custom": {
"version.tests.compatibility": "jest-27",
"flag.tests.task-per-describe": false,
Expand Down
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
2 changes: 1 addition & 1 deletion exercises/practice/rest-api/.docs/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ Your task is to implement a simple [RESTful API][restful-wikipedia] that receive

[restful-wikipedia]: https://en.wikipedia.org/wiki/Representational_state_transfer
[iou]: https://en.wikipedia.org/wiki/IOU
[github-rest]: https://developer.github.com/v3/
[github-rest]: https://docs.github.com/en/rest
[reddit-rest]: https://web.archive.org/web/20231202231149/https://www.reddit.com/dev/api/
[restfulapi]: https://restfulapi.net/
2 changes: 1 addition & 1 deletion exercises/practice/reverse-string/.meta/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
"blurb": "Reverse a given string.",
"source": "Introductory challenge to reverse an input string",
"source_url": "https://medium.freecodecamp.org/how-to-reverse-a-string-in-javascript-in-3-different-ways-75e4763c68cb",
"source_url": "https://www.freecodecamp.org/news/how-to-reverse-a-string-in-javascript-in-3-different-ways-75e4763c68cb",
"custom": {
"version.tests.compatibility": "jest-27",
"flag.tests.task-per-describe": false,
Expand Down
2 changes: 1 addition & 1 deletion exercises/practice/space-age/.meta/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
},
"blurb": "Given an age in seconds, calculate how old someone is in terms of a given planet's solar years.",
"source": "Partially inspired by Chapter 1 in Chris Pine's online Learn to Program tutorial.",
"source_url": "https://pine.fm/LearnToProgram/?Chapter=01",
"source_url": "https://pine.fm/LearnToProgram/chap_01.html",
"custom": {
"version.tests.compatibility": "jest-27",
"flag.tests.task-per-describe": false,
Expand Down
2 changes: 1 addition & 1 deletion exercises/practice/triangle/.meta/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
"blurb": "Determine if a triangle is equilateral, isosceles, or scalene.",
"source": "The Ruby Koans triangle project, parts 1 & 2",
"source_url": "https://web.archive.org/web/20220831105330/http://rubykoans.com",
"source_url": "https://www.rubykoans.com/",
"custom": {
"version.tests.compatibility": "jest-27",
"flag.tests.task-per-describe": false,
Expand Down