generated from CodeYourFuture/Module-Template
-
-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
82 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,17 @@ | ||
// A set of words can be grouped together in different cases. | ||
// A set of words can be written grouped together in different cases. | ||
|
||
// For example, "hello there" in snake case would be written "hello_there" | ||
// UPPER_SNAKE_CASE means taking a string and writing it in | ||
// UPPER_SNAKE_CASE means taking a string and writing it in all capitals with underscores for spaces | ||
|
||
// Implement a function that: | ||
|
||
// Given a string input like "hello there" | ||
// When we call this function with the input string | ||
// it returns the string in UPPER_CAMEL_CASE, so "HELLO_THERE" | ||
// Then it returns the string in UPPER_CAMEL_CASE, so "HELLO_THERE" | ||
|
||
// Another example: "lord of the rings" should be "LORD_OF_THE_RINGS" | ||
// Test case: we expect "lord of the rings" to be "LORD_OF_THE_RINGS" | ||
// Test case: we expect "the great gatsby" to be "THE_GREAT_GATSBY" | ||
// Test case: we expect "the da vinci code" to be "THE_DA_VINCI_CODE" | ||
|
||
// You will need to come up with an appropriate name for the function | ||
// Use the string documentation to help you find a solution | ||
// Come up with a clear, simple name for the function | ||
// Use the string documentation to help you plan your solution |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
// In week-1, there is a program written in interpret/to-pounds.js | ||
// Find to-pounds.js in an earlier week in this repo | ||
|
||
// You will need to take this code and turn it into a reusable block of code. | ||
// You will need to declare a function called toPounds with an appropriately named parameter. | ||
|
||
// You should call this function a number of times to check it works for different inputs | ||
// Take this code and turn it into a reusable block of code. | ||
// Declare a function called toPounds with an appropriately named parameter. | ||
// Call this function a number of times to check it works for different inputs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
// If products or services are subject to the 20% standard rate of VAT: | ||
// You must add 20% to the price you charge for the goods or service. | ||
// When selling goods, most are subject to the 20% standard rate of VAT. | ||
// You must add 20% to the price you charge for the goods. | ||
// You can do this by multiplying the price you charge by 1.2. | ||
// For example, if your business sells sports equipment for £50, you multiply £50 by 1.2 for a total VAT inclusive price of £60. | ||
|
||
// Implement a function that calculates the new price with VAT (Value Added Tax) added on | ||
// Implement a function that calculates the new price with VAT (Value Added Tax) added on. | ||
|
||
// Given a number, | ||
// When I call this function with a number | ||
// it returns the new price with VAT added on | ||
// Then it returns the new price with VAT added on |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
// There is an implementation of format-as-12-hours.js in the debug directory | ||
// This implementation currently uses the expression Number(time.slice(0, 2)) twice | ||
// Copy that implementation in here, and improve it: | ||
// That implementation currently uses the expression Number(time.slice(0, 2)) twice | ||
// Store this expression in a variable and reference it twice in the function in the correct place | ||
|
||
// Explain why it makes more sense to store this expression in a variable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
// Given a positive integer num, | ||
// When the isPrime function is called with num as input, | ||
// Then it should check if the num is prime | ||
// Then it should return a boolean representing whether the num is prime |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters