mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
fix(curriculum): fix some minor typos in workshop files (#63838)
This commit is contained in:
@@ -162,7 +162,7 @@ It should never have a base case.
|
||||
|
||||
---
|
||||
|
||||
It should only be used for the fibonacci sequence.
|
||||
It should only be used for the Fibonacci sequence.
|
||||
|
||||
---
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ dashedName: step-2
|
||||
|
||||
# --description--
|
||||
|
||||
In previous lessons, you learned about different data types you can store in a variable. You just assigned an integer value. Now you need to assign a string, which is a sequences of characters enclosed by either single or double quotes:
|
||||
In previous lessons, you learned about different data types you can store in a variable. You just assigned an integer value. Now you need to assign a string, which is a sequence of characters enclosed by either single or double quotes:
|
||||
|
||||
```py
|
||||
string_1 = 'I am a string'
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ Your comment should start with `<!--`. You are missing one or more of the charac
|
||||
assert.match(code, /<!--/);
|
||||
```
|
||||
|
||||
Your comment should end with `-->`. You are missing one or more of the characters that define the end of a comment.
|
||||
Your comment should end with `-->`. You are missing one or more of the characters that define the end of a comment.
|
||||
|
||||
```js
|
||||
assert.match(code, /-->/);
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ dashedName: step-4
|
||||
|
||||
Now let's test the `Email` class by creating an email object and checking that it stores information correctly. You'll print a couple of attributes to verify everything works.
|
||||
|
||||
Create an email object named `email_obj` with `alice@example.com` as the sender, `bob@example.com` as the receiver, `Hello` as the subject, and `Hi Bob!` as the body. Then print the `sender` and `subject` attributes as separate print statements to verify they are stored correctly.
|
||||
Create an email object named `email_obj` with `alice@example.com` as the sender, `bob@example.com` as the receiver, `Hello` as the subject, and `Hi Bob!` as the body. Then print the `sender` and `subject` attributes as separate print statements to verify they are stored correctly.
|
||||
|
||||
# --hints--
|
||||
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ Great! Now that you've practiced datetime formatting, remove the `current_time`
|
||||
|
||||
# --hints--
|
||||
|
||||
You should not have the the statement `current_time = datetime.datetime.now()")` in your code.
|
||||
You should not have the statement `current_time = datetime.datetime.now()")` in your code.
|
||||
|
||||
```js
|
||||
({
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ Remove the `console.log`.
|
||||
|
||||
Check if the current first number inside the `.count` is already 10 (the text is `10/10`), and if so, do nothing.
|
||||
|
||||
If the number is less then 10, increment the current count by 1 and update the text of the `.count` element. For example, if the current count is 2, it should be incremented to 3 and the text for the `.count` element should be `3/10`.
|
||||
If the number is less than 10, increment the current count by 1 and update the text of the `.count` element. For example, if the current count is 2, it should be incremented to 3 and the text for the `.count` element should be `3/10`.
|
||||
|
||||
# --hints--
|
||||
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ You should have an `async` arrow function as the first argument to `setTimeout`.
|
||||
assert.match(code, /setTimeout\s*\(\s*async\s*\(\s*\)\s*=>\s*{/);
|
||||
```
|
||||
|
||||
Inside the `async` function , you should create a `try...catch` block.
|
||||
Inside the `async` function, you should create a `try...catch` block.
|
||||
|
||||
```js
|
||||
assert.match(
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ Your `MediaCatalogue` class should have an `__init__` method.
|
||||
})
|
||||
```
|
||||
|
||||
Your `__init__` method should set the `items` attribute to an empty list .
|
||||
Your `__init__` method should set the `items` attribute to an empty list.
|
||||
|
||||
```js
|
||||
({
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ You should have a variable named `result` in your `__str__` method.
|
||||
})
|
||||
```
|
||||
|
||||
Your should assign `f'Media Catalogue ({len(self.items)} items):\n\n'` to the `result` variable.
|
||||
You should assign `f'Media Catalogue ({len(self.items)} items):\n\n'` to the `result` variable.
|
||||
|
||||
```js
|
||||
({
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ dashedName: step-6
|
||||
|
||||
# --description--
|
||||
|
||||
By default the other tabs should not be selected. You can do this by adding the `aria-selected` attribute to the second and third `button` elements and setting their values to `"false"`.
|
||||
By default, the other tabs should not be selected. You can do this by adding the `aria-selected` attribute to the second and third `button` elements and setting their values to `"false"`.
|
||||
|
||||
# --hints--
|
||||
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ In the next few steps, you'll work on a function that will allow you to update t
|
||||
|
||||
Create a function named `sellPlants` that takes three arguments: a plant object, the pot size and the number of pots to sell, in this order.
|
||||
|
||||
When the specified number of pots is greater then the available pots, make your function return `Not enough <pot-size> size pots for <item-name>. Only <pot-number> left.`. Replace `<pot-size>` with the pot size, `<pot-number>` with the remaining pots for that size, and `<item-name>` with the scientific name of the plant followed by a space and the name of the cultivar wrapped between single quotes.
|
||||
When the specified number of pots is greater than the available pots, make your function return `Not enough <pot-size> size pots for <item-name>. Only <pot-number> left.`. Replace `<pot-size>` with the pot size, `<pot-number>` with the remaining pots for that size, and `<item-name>` with the scientific name of the plant followed by a space and the name of the cultivar wrapped between single quotes.
|
||||
|
||||
To test that everything works, log the result of calling your `sellPlants` function with the `ballerina` object, `"small"`, and `25` to the console.
|
||||
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ Below this heading, add a block quotation element with a `cite` attribute with t
|
||||
|
||||
# --hints--
|
||||
|
||||
Your should have an `h2` element nested inside the second section.
|
||||
You should have an `h2` element nested inside the second section.
|
||||
|
||||
```js
|
||||
assert.exists(document.querySelector('main > section:nth-of-type(2) > h2'));
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ After that, print `charlie_brown` to the console.
|
||||
|
||||
# --hints--
|
||||
|
||||
Your `Employee` class should have a `__str__` method with a `self` parameter .
|
||||
Your `Employee` class should have a `__str__` method with a `self` parameter.
|
||||
|
||||
```js
|
||||
({ test: () => assert(runPython(`_Node(_code).find_class("Employee").find_function("__str__").has_args("self")`)) })
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ dashedName: step-3
|
||||
|
||||
# --description--
|
||||
|
||||
Inside the `.btn-container` , create three buttons for each type of story. Give each button a class of `btn` and an `id` of `scary-btn`, `funny-btn`, and `adventure-btn`. The text for each button should be `Scary Story`, `Funny Story`, and `Adventure Story` respectively.
|
||||
Inside the `.btn-container`, create three buttons for each type of story. Give each button a class of `btn` and an `id` of `scary-btn`, `funny-btn`, and `adventure-btn`. The text for each button should be `Scary Story`, `Funny Story`, and `Adventure Story` respectively.
|
||||
|
||||
# --hints--
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ dashedName: step-7
|
||||
|
||||
# --description--
|
||||
|
||||
To get the desired output of `"I love dogs and dogs are so much fun!"`, you will need to use the `replaceAll()` method instead of the `replace()` method. This methods returns a new string for all matches to the substring.
|
||||
To get the desired output of `"I love dogs and dogs are so much fun!"`, you will need to use the `replaceAll()` method instead of the `replace()` method. This method returns a new string for all matches to the substring.
|
||||
|
||||
Update the `exampleSentence.replace("cats", "dogs")` to use the `replaceAll()` method instead. Now you should see the correct text in the console.
|
||||
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ To stop that, add the `disabled` attribute to disable the submit button if `hero
|
||||
|
||||
Now, the button will be disabled if something isn't filled in. Fill in the form with your superhero information and submit it to join the league.
|
||||
|
||||
With that, you superhero application form is complete.
|
||||
With that, your superhero application form is complete.
|
||||
|
||||
# --hints--
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ dashedName: step-25
|
||||
|
||||
# --description--
|
||||
|
||||
In addition to those, add the classes `block` and `rounded-md` to the anchor tag to make the it a block element and remove the sharp edges.
|
||||
In addition to those, add the classes `block` and `rounded-md` to the anchor tag to make it a block element and remove the sharp edges.
|
||||
|
||||
# --hints--
|
||||
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ const buttonEl = document.querySelector("button");
|
||||
assert.equal(buttonEl.textContent, "Message");
|
||||
```
|
||||
|
||||
You `button` element should be inside of the `toggle-container` element.
|
||||
Your `button` element should be inside of the `toggle-container` element.
|
||||
|
||||
```js
|
||||
const buttonEl = document.querySelector("#toggle-container > button");
|
||||
|
||||
Reference in New Issue
Block a user