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
2 changes: 1 addition & 1 deletion exercises/practice/allergies/.meta/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,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/"
}
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/etl/.meta/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,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/"
}
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 @@ -15,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/"
}
2 changes: 1 addition & 1 deletion exercises/practice/matrix/.meta/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,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/"
}
3 changes: 3 additions & 0 deletions exercises/practice/perfect-numbers/.meta/tests.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ description = "Abundant numbers -> Medium abundant number is classified correctl
[ec7792e6-8786-449c-b005-ce6dd89a772b]
description = "Abundant numbers -> Large abundant number is classified correctly"

[05f15b93-849c-45e9-9c7d-1ea131ef7d10]
description = "Abundant numbers -> Perfect square abundant number is classified correctly"

[e610fdc7-2b6e-43c3-a51c-b70fb37413ba]
description = "Deficient numbers -> Smallest prime deficient number is classified correctly"

Expand Down
32 changes: 18 additions & 14 deletions exercises/practice/perfect-numbers/perfect_numbers.vader
Original file line number Diff line number Diff line change
@@ -1,67 +1,71 @@

Execute (Smallest perfect number is classified correctly):
let g:number = 6
let g:expected = "perfect"
let g:expected = 'perfect'
AssertEqual g:expected, Classify(g:number)

Execute (Medium perfect number is classified correctly):
let g:number = 28
let g:expected = "perfect"
let g:expected = 'perfect'
AssertEqual g:expected, Classify(g:number)

Execute (Large perfect number is classified correctly):
let g:number = 33550336
let g:expected = "perfect"
let g:expected = 'perfect'
AssertEqual g:expected, Classify(g:number)

Execute (Smallest abundant number is classified correctly):
let g:number = 12
let g:expected = "abundant"
let g:expected = 'abundant'
AssertEqual g:expected, Classify(g:number)

Execute (Medium abundant number is classified correctly):
let g:number = 30
let g:expected = "abundant"
let g:expected = 'abundant'
AssertEqual g:expected, Classify(g:number)

Execute (Large abundant number is classified correctly):
let g:number = 33550335
let g:expected = "abundant"
let g:expected = 'abundant'
AssertEqual g:expected, Classify(g:number)

Execute (Perfect square abundant number is classified correctly):
let g:number = 196
let g:expected = 'abundant'
AssertEqual g:expected, Classify(g:number)

Execute (Smallest prime deficient number is classified correctly):
let g:number = 2
let g:expected = "deficient"
let g:expected = 'deficient'
AssertEqual g:expected, Classify(g:number)

Execute (Smallest non-prime deficient number is classified correctly):
let g:number = 4
let g:expected = "deficient"
let g:expected = 'deficient'
AssertEqual g:expected, Classify(g:number)

Execute (Medium deficient number is classified correctly):
let g:number = 32
let g:expected = "deficient"
let g:expected = 'deficient'
AssertEqual g:expected, Classify(g:number)

Execute (Large deficient number is classified correctly):
let g:number = 33550337
let g:expected = "deficient"
let g:expected = 'deficient'
AssertEqual g:expected, Classify(g:number)

Execute (Edge case (no factors other than itself) is classified correctly):
let g:number = 1
let g:expected = "deficient"
let g:expected = 'deficient'
AssertEqual g:expected, Classify(g:number)

Execute (Zero is rejected (as it is not a positive integer)):
let g:number = 0
let g:expected = "Classification is only possible for positive integers."
let g:expected = 'Classification is only possible for positive integers.'
AssertThrows call Classify(g:number)
AssertEqual g:expected, g:vader_exception

Execute (Negative integer is rejected (as it is not a positive integer)):
let g:number = -1
let g:expected = "Classification is only possible for positive integers."
let g:expected = 'Classification is only possible for positive integers.'
AssertThrows call Classify(g:number)
AssertEqual g:expected, g:vader_exception
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 @@ -19,5 +19,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/"
}
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 @@ -18,5 +18,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
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 @@ -15,5 +15,5 @@
},
"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"
}
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 @@ -15,5 +15,5 @@
},
"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"
}
2 changes: 1 addition & 1 deletion exercises/practice/triangle/.meta/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@
},
"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/"
}