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 @@ -21,5 +21,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 @@ -23,5 +23,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 @@ -20,5 +20,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/gigasecond/.meta/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,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"
}
2 changes: 1 addition & 1 deletion exercises/practice/grep/.meta/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@
},
"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"
}
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/"
}
5 changes: 5 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 All @@ -44,6 +47,8 @@ description = "Deficient numbers -> Edge case (no factors other than itself) is

[72445cee-660c-4d75-8506-6c40089dc302]
description = "Invalid inputs -> Zero is rejected (as it is not a positive integer)"
include = false

[2d72ce2c-6802-49ac-8ece-c790ba3dae13]
description = "Invalid inputs -> Negative integer is rejected (as it is not a positive integer)"
include = false
30 changes: 17 additions & 13 deletions exercises/practice/perfect-numbers/perfect-numbers-test.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,22 @@
(classify 33550336)
'perfect)

(test-equal? "Smallest abundant number"
(classify 12)
'abundant)

(test-equal? "Medium abundant number"
(classify 30)
'abundant)

(test-equal? "Large abundant number"
(classify 33550335)
'abundant)

(test-equal? "Perfect square abundant number"
(classify 196)
'abundant)

(test-equal? "Smallest prime deficient number"
(classify 2)
'deficient)
Expand All @@ -39,18 +55,6 @@

(test-equal? "Edge case (no factors other than itself)"
(classify 1)
'deficient)

(test-equal? "Smallest abundant number"
(classify 12)
'abundant)

(test-equal? "Medium abundant number"
(classify 30)
'abundant)

(test-equal? "Large abundant number"
(classify 33550335)
'abundant)))
'deficient)))

(run-tests suite))
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 @@ -22,5 +22,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 @@ -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/reverse-string/.meta/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,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/"
}