Skip to content

Commit 6b4a30c

Browse files
authored
Clarify and fix up typos (#40)
1 parent 8498a6f commit 6b4a30c

File tree

4 files changed

+11
-16
lines changed

4 files changed

+11
-16
lines changed

Sprint-2/implement/cases.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
// A set of words can be grouped together in different cases.
22

33
// For example, "hello there" in snake case would be written "hello_there"
4-
// UPPER_SNAKE_CASE means taking a string and writing it in
4+
// UPPER_SNAKE_CASE means taking a string and writing it in all caps with underscores instead of spaces.
55

66
// Implement a function that:
77

88
// Given a string input like "hello there"
99
// When we call this function with the input string
10-
// it returns the string in UPPER_CAMEL_CASE, so "HELLO_THERE"
10+
// it returns the string in UPPER_SNAKE_CASE, so "HELLO_THERE"
1111

1212
// Another example: "lord of the rings" should be "LORD_OF_THE_RINGS"
1313

Sprint-2/implement/to-pounds.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// In week-1, there is a program written in interpret/to-pounds.js
1+
// In Sprint-1, there is a program written in interpret/to-pounds.js
22

33
// You will need to take this code and turn it into a reusable block of code.
44
// You will need to declare a function called toPounds with an appropriately named parameter.

Sprint-2/interpret/time-format.js

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,30 +7,25 @@ function formatTimeDisplay(seconds) {
77
const totalMinutes = (seconds - remainingSeconds) / 60;
88
const remainingMinutes = totalMinutes % 60;
99
const totalHours = (totalMinutes - remainingMinutes) / 60;
10-
const remainingHours = totalHours % 24;
1110

12-
return `${pad(remainingHours)}:${pad(remainingMinutes)}:${pad(
11+
return `${pad(totalHours)}:${pad(remainingMinutes)}:${pad(
1312
remainingSeconds
1413
)}`;
1514
}
1615

17-
console.log(formatTimeDisplay(61));
18-
1916
// You will need to play computer with this example - use the Python Visualiser https://pythontutor.com/visualize.html#mode=edit
2017
// to help you answer these questions
2118

2219
// Questions
2320

24-
// a) Run this program with node, identify the line the error is thrown. Explain why this error is occurring. How can you fix this error?
25-
26-
// b) When formatTimeDisplay is called how many times will pad be called?
21+
// a) When formatTimeDisplay is called how many times will pad be called?
2722

2823
// Call formatTimeDisplay with an input of 61, now answer the following:
2924

30-
// c) What is the value assigned to num when pad is called for the first time?
25+
// b) What is the value assigned to num when pad is called for the first time?
3126

32-
// d) What is the return value of pad is called for the first time?
27+
// c) What is the return value of pad is called for the first time?
3328

34-
// e) What is the value assigned to num when pad is called for the last time in this program? Explain your answer
29+
// d) What is the value assigned to num when pad is called for the last time in this program? Explain your answer
3530

36-
// f) What is the return value assigned to num when pad is called for the last time in this program? Explain your answer
31+
// e) What is the return value assigned to num when pad is called for the last time in this program? Explain your answer

Sprint-2/readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
## Errors
44

5-
In this section, you need to go to each file in `errors` directory and run the file with node to check what the error is. Your task is to interpret the error message and explain why it occurs. The [errors documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors) will help you figure out the solution.
5+
In this section, you need to go to each file in `errors` directory. Read the file and predict what error will happen. Then run the file with node to check what the error is. Your task is to interpret the error message and explain why it occurs. The [errors documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors) will help you figure out the solution.
66

77
## Debug
88

99
In this section, you need to go to each file in `debug` to **explain and predict** why the program isn't behaving as intended. Then you'll need to run the program with node to check your prediction. You will also need to correct the code too.
1010

1111
## Implement
1212

13-
In this section, you will have a short set of requirements about a function. You will need to implement a function based off this set of requirements.Make sure you check your function works for a number of different inputs.
13+
In this section, you will have a short set of requirements about a function. You will need to implement a function based off this set of requirements. Make sure you check your function works for a number of different inputs.
1414
Here is a recommended order:
1515

1616
1. `to-pounds.js`

0 commit comments

Comments
 (0)