chore(i18n,learn): processed translations (#54077)

Co-authored-by: Naomi Carrigan <nhcarrigan@gmail.com>
This commit is contained in:
freeCodeCamp's Camper Bot
2024-03-25 22:01:40 +05:30
committed by GitHub
parent c742a22ac2
commit cc87f4455d
5432 changed files with 242595 additions and 14943 deletions

View File

@@ -38,13 +38,14 @@ Submit your page when you think you've got it right. If you're running into erro
# --hints--
Event `'user'` should be emitted with `name`, `currentUsers`, and `connected`.
Event `'user'` should be emitted with `username`, `currentUsers`, and `connected`.
```js
async (getUserInput) => {
const url = new URL("/_api/server.js", getUserInput("url"));
const res = await fetch(url);
const data = await res.text();
// Regex is lenient to match both `username` and `name` as the key on purpose.
assert.match(
data,
/io.emit.*('|")user\1.*name.*currentUsers.*connected/s,

View File

@@ -7,7 +7,7 @@ dashedName: step-5
# --description--
Now you will move to the actual construction of the board, which is a 9x9 gird.
Now you will move to the actual construction of the board, which is a 9x9 grid.
The input puzzle would look like this:

View File

@@ -9,11 +9,11 @@ dashedName: step-9
The `random` module contains a pseudo-random number generator. Most of its functionalities depend on the `random()` function, which returns a floating point number in the range between `0.0` (inclusive) and `1.0` (exclusive).
Call the `random()` function and print the result.
Call the `random()` function from the `random` module and print the result.
# --hints--
You should print `random.random()`.
You should print the result of calling `random.random()`.
```js
({ test: () => assert.match(code, /^print\s*\(\s*random\.random\s*\(\s*\)\s*\)/m) })

View File

@@ -16,7 +16,7 @@ Now, delete your two `print()` calls.
You should delete your two `print()` calls.
```js
({ test: () => assert.isFalse( /print/.test(code)) })
({ test: () => assert.isFalse( /^print/m.test(code)) })
```
# --seed--

View File

@@ -13,7 +13,7 @@ Just before them, add a comment saying `Define the possible characters for the p
# --hints--
You should add the comment just above your three variables.
You should add the comment just above the `letters` variable.
```js
({ test: () => assert.match(code, /^#\s*Define the possible characters for the password.*^letters/ms) })

View File

@@ -7,7 +7,7 @@ dashedName: step-20
# --description--
Finally, call the `generate_password` function with `8` as the argument and assign the function call to a `new_password` variable.
Finally, declare a variable `new_password` and assign it the result of calling `generate_password`. Pass `8` as the argument to your `generate_password` call.
# --hints--
@@ -17,7 +17,7 @@ You should call `generate_password` passing `8` as the argument.
({ test: () => assert.match(code, /generate_password\s*\(\s*8\s*\)/) })
```
You should assign `generate_password(8)` to a `new_password` variable.
You should assign `generate_password(8)` to the variable `new_password`.
```js
({

View File

@@ -9,7 +9,7 @@ dashedName: step-29
The `search()` function from the `re` module analyzes the string passed as the argument looking for the first place where the regex pattern matches the string.
Declare a variable called `quote` and assign the string `Not all those who wander are lost.` to this variable. Then, print the result of `pattern.search(quote)`.
Declare a variable called `quote` and assign the string `'Not all those who wander are lost.'` to this variable. Then, print the result of `pattern.search(quote)`.
# --hints--

View File

@@ -7,7 +7,7 @@ dashedName: step-42
# --description--
The dot character is a wildcard that matches any character in a string — except for a newline character by default. Modify `pattern` to match the entire string. Use a `.` followed by the `+` quantifier.
The dot character is a wildcard that matches any character in a string — except for a newline character by default. Modify `pattern` to match the entire string by replacing the current pattern with a `.` followed by the `+` quantifier.
# --hints--

View File

@@ -11,7 +11,7 @@ Now, turn `pattern` into the shorthand class for non-alphanumeric characters.
# --hints--
Your `pattern` variable should be `\W`.
Your `pattern` variable should be `'\W'`.
```js
({ test: () => assert.match(code, /^pattern\s*=\s*r("|')\\W\1/m) })

View File

@@ -13,7 +13,7 @@ Now turn your `quote` string into a single underscore character.
# --hints--
Your `quote` variable should be `_`.
Your `quote` variable should be `'_'`.
```js
({ test: () => assert.equal(__userGlobals.get("quote"), "_") })

View File

@@ -19,9 +19,10 @@ You should delete the last three lines in your code.
```js
({ test: () => {
assert.isFalse(/pattern\s*=\s*r("|')\\W\1/.test(code));
assert.isFalse(/quote\s*=\s*("|')_\1/.test(code));
assert.isFalse(/print\(\s*re\.findall\(\s*pattern\s*,\s*quote\s*\)\s*\)/.test(code));
const commentless_code = __helpers.python.removeComments(code);
assert.notMatch(commentless_code, /pattern\s*=\s*r("|')\\W\1/);
assert.notMatch(commentless_code, /quote\s*=\s*("|')_\1/);
assert.notMatch(commentless_code, /print\(\s*re\.findall\(\s*pattern\s*,\s*quote\s*\)\s*\)/);
}})
```

View File

@@ -14,7 +14,7 @@ Now, combine your raw string with an f-string and interpolate your `symbols` var
The second item in your fourth constraint tuple should be the string `fr'[{symbols}]'`.
```js
({ test: () => assert.match(code, /\(\s*special_chars\s*,\s*fr("|')\[\{\s*symbols\s*\}\]\1/) })
({ test: () => assert.match(code, /\(\s*special_chars\s*,\s*(fr|rf)("|')\[\{\s*symbols\s*\}\]\2/) })
```
# --seed--

View File

@@ -7,7 +7,7 @@ dashedName: step-54
# --description--
After your new comment, write a `for` loop to iterate over the `constraints` list. Use `constraint` and `pattern` as the iterating variables.
After your new comment, write a `for` loop to iterate over the `constraints` list. Use `constraint` and `pattern` as the loop variables.
# --hints--

View File

@@ -7,20 +7,32 @@ dashedName: step-59
# --description--
Turn the expression inside your `for` loop into an `if` statement. Use the expression you wrote in the previous step as the `if` condition. Inside the new conditional statement, increment the `count` value by `1`.
Turn the expression inside your `for` loop into an `if` statement. Use the expression you wrote in the previous step as the `if` condition.
Inside the new conditional statement, increment the `count` value by `1`.
# --hints--
You should turn `constraint <= len(re.findall(pattern, password))` into the `if` condition.
```js
({ test: () => assert.match(code, /^(\s*)for.+:\s*^\1(\s{4})if\s+constraint\s*<=\s*len\s*\(\s*re\.findall\s*\(\s*pattern\s*,\s*password\s*\)\s*\)\s*:/m) })
({ test: () => {
const commentless_code = __helpers.python.removeComments(code);
const {block_body} = __helpers.python.getBlock(commentless_code, /for\s+constraint\s*,\s*pattern\s+in\s+constraints\s*/);
assert(block_body.match(/^\s+if\s+constraint\s*<=\s*len\s*\(\s*re\.findall\s*\(\s*pattern\s*,\s*password\s*\)\s*\)\s*:/));
}
})
```
You should increment `count` by one inside your new `if` statement.
```js
({ test: () => assert.match(code, /^(\s*)for.+:\s*^\1(\s{4})if\s+constraint\s*<=\s*len\s*\(\s*re\.findall\s*\(\s*pattern\s*,\s*password\s*\)\s*\)\s*:\s*^\1\2\2(count\s*\+=\s*1|count\s*=\s*count\s*\+\s*1)/m) })
({ test: () => {
const commentless_code = __helpers.python.removeComments(code);
const {block_body} = __helpers.python.getBlock(commentless_code, /if\s+constraint\s*<=\s*len\s*\(\s*re\.findall\s*\(\s*pattern\s*,\s*password\s*\)\s*\)\s*/);
assert(block_body.match(/^\s+(count\s*\+=\s*1|count\s*=\s*count\s*\+\s*1)/));
}
})
```
# --seed--

View File

@@ -14,13 +14,18 @@ Finally, after the `for` loop, create an `if` statement to check if `count` is e
You should create an `if` statement that checks if `count` is equal to `4` after the `for` loop.
```js
({ test: () => assert.match(code, /^(\s*)for.+:\s*^\1(\s{4})if\s+constraint\s* <=\s*len\s*\(\s*re\.findall\s*\(\s*pattern\s*,\s*password\s*\)\s*\)\s*:\s*^\1\2\2count\s*\+=\s*1\s*^\1if\s+count\s*==\s*4\s*:/m) })
({ test: () => assert.match(code, /^(\s*)for.+:\s*^\1(\s{4})if\s+constraint\s*<=\s*len\s*\(\s*re\.findall\s*\(\s*pattern\s*,\s*password\s*\)\s*\)\s*:\s*^\1\2\2count\s*\+=\s*1\s*^\1if\s+count\s*==\s*4\s*:/m) })
```
You should use `break` inside your new `if` to break out of the `while` loop.
```js
({ test: () => assert.match(code, /^(\s*)for.+:\s*^\1(\s{4})if\s+constraint\s* <=\s*len\s*\(\s*re\.findall\s*\(\s*pattern\s*,\s*password\s*\)\s*\)\s*:\s*^\1\2\2count\s*\+=\s*1\s*^\1if\s+count\s*==\s*4\s*:\s*^\1\2break/m) })
({ test: () => {
const commentless_code = __helpers.python.removeComments(code);
const {block_body} = __helpers.python.getBlock(commentless_code, /if\s+count\s*==\s*4\s*/);
assert(block_body.match(/^\s+break\s*$/m));
}
})
```
# --seed--

View File

@@ -7,11 +7,11 @@ dashedName: step-71
# --description--
Modify your `print()` call to take the string `Generated password:` as the first argument, before `new_password`.
Modify your `print()` call to take the string `'Generated password:'` as the first argument, before `new_password`.
# --hints--
You should pass the `Generated password:` string and `new_password` to your `print()` call.
You should pass the string `'Generated password:'` and `new_password` to your `print()` call.
```js
({ test: () => assert.match(code, /^print\s*\(\s*("|')Generated\spassword:\1\s*,\s*new_password\s*\)/m) })

View File

@@ -13,10 +13,22 @@ With that, the password generator project is complete.
# --hints--
You should have an `if` statement that checks if `__name__ == '__main__'` and put the last two lines of your code in it.
You should have an `if` statement that checks if `__name__ == '__main__'`.
```js
({ test: () => assert.match(code, /^if\s+__name__\s*==\s*("|')__main__\1\s*:\s*^(\s{4})new_password\s*=\s*generate_password\s*\(\s*\)\s*^\2print\s*\(\s*("|')Generated\spassword:\3\s*,\s*new_password\s*\)/m) })
const commentless_code = __helpers.python.removeComments(code);
assert(commentless_code.match(/^if\s+__name__\s*==\s*("|')__main__\1\s*:\s*$/m));
```
You should put the `new_password` assignment and the following `print()` call in your new `if` statement body.
```js
({ test: () => {
const commentless_code = __helpers.python.removeComments(code);
const {block_body} = __helpers.python.getBlock(commentless_code, /if\s+__name__\s*==\s*("|')__main__\3\s*/);
assert(block_body.match(/^\s+new_password\s*=\s*generate_password\s*\(\s*\)\s*print\s*\(\s*("|')Generated\spassword:\1\s*,\s*new_password\s*\)\s*$/));
}
})
```
# --seed--

View File

@@ -7,9 +7,9 @@ dashedName: step-30
# --description--
The value `None` is returned since `i` is not found inside the parsed string.
The value `None` is returned since `'i'` is not found inside the parsed string.
Now, modify your pattern into `l` and see the result.
Now, modify the string passed to `re.compile()` into `'l'` and see the result.
# --hints--

View File

@@ -14,7 +14,15 @@ Put your `password` variable declaration and the following `for` loop inside a `
You should create a `while True` loop enclosing your existing `password` declaration and `for` loop.
```js
({ test: () => assert.match(code, /^(\s*)while\s+True\s*:\s*^\1\1password\s*=\s*("|')\2\s*#\s*Generate\spassword\s*^\1\1for\s+_\s+in\s+range\s*\(\s*length\s*\s*\)\s*:\s*^\1\1\1password\s*\+=\s*secrets\.choice\s*\(\s*all_characters\s*\)/m) })
({ test: () => {
const commentless_code = __helpers.python.removeComments(code);
const {block_body} = __helpers.python.getBlock(commentless_code, /while\s+True\s*/);
assert(block_body.match(/^\s+password\s*=\s*("|')\1\s*^\s+for\s+_\s+in\s+range\s*\(\s*length\s*\s*\)\s*:\s*^\s+password\s*\+=\s*secrets\.choice\s*\(\s*all_characters\s*\)\s*$/m));
const {block_body: for_body} = __helpers.python.getBlock(commentless_code, /for\s+_\s+in\s+range\s*\(\s*length\s*\s*\)\s*/);
assert(for_body.match(/^\s+password\s*\+=\s*secrets\.choice\s*\(\s*all_characters\s*\)\s*$/m));
}
})
```
# --seed--

View File

@@ -15,7 +15,7 @@ my_tuple = ('larch', 1, True)
Your `constraints` list is going to store tuples. The first item of each tuple will be a constraint parameter.
Add a tuple to your list. Use `nums` as the first item and an empty string as the second item.
Modify the `constraints` list assignment by adding a tuple to your list. Use `nums` as the first item and an empty string as the second item.
# --hints--

View File

@@ -7,11 +7,11 @@ dashedName: step-32
# --description--
You can obtain the same result without using the `compile()` function. Modify your `pattern` variable into the literal string `l+`. Then, change the `print()` call to print `re.search(pattern, quote)`.
You can obtain the same result without using the `compile()` function. Modify your `pattern` variable into the literal string `'l+'`. Then, change the `print()` call to print `re.search(pattern, quote)`.
# --hints--
You should modify your `pattern` variable into the literal string `l+`.
You should modify your `pattern` variable into the literal string `'l+'`.
```js
({ test: () => assert.equal(__userGlobals.get("pattern"), "l+") })

View File

@@ -7,11 +7,11 @@ dashedName: step-61
# --description--
Instead of using a loop and a counter variable, you can achieve the same result with a different approach.
Instead of using a loop and a counter variable, you can achieve the same result with a different approach, which you are going to implement in the next few steps.
Replace your existing `for` loop and two `if` statements with a single `if` statement. For the `if` condition, use a list created with the list comprehension syntax.
`all()` is a built-in Python function that returns `True` if all the elements inside a given iterable evaluate to `True`. Otherwise, it returns `False`.
The list stores the results of evaluating the expression `constraint <= len(re.findall(pattern, password))` for each `constraint`-`pattern` tuple in the `constraints` list.
Replace your existing `for` loop and two `if` statements with a single `if` statement. For the `if` condition, use a call to the `all()` function and pass an empty list as the argument to the function call.
# --hints--
@@ -24,10 +24,20 @@ You should replace your existing `for` loop and two `if` statements with a singl
} })
```
Your new `if` condition should be a list comprehension that is the result of evaluating the expression `constraint <= len(re.findall(pattern, password))` for each `constraint`-`pattern` tuple in the `constraints` list.
Your new `if` condition should be `all([])`.
```js
({ test: () => assert.match(code, /^(\s{8})if\s*\[\s*constraint\s*<=\s*len\s*\(\s*re\.findall\s*\(\s*pattern\s*,\s*password\s*\)\s*\)\s+for\s+constraint\s*,\s*pattern\s+in\s+constraints\s*\]\s*:\s*^\1\s{4}break/m) })
({ test: () => assert(runPython(`
_Node(_code).find_function("generate_password").find_while("True").find_bodies()[0].find_if("all([])")
`)) })
```
You should have `break` inside your new `if` body.
```js
({ test: () => assert(runPython(`
_Node(_code).find_function("generate_password").find_while("True").find_bodies()[0].find_if("all([])").find_bodies()[0].is_equivalent("break")
`)) })
```
# --seed--

View File

@@ -7,18 +7,18 @@ dashedName: step-62
# --description--
`all()` is a built-in Python function that returns `True` if all the elements inside a given iterable evaluate to `True`. Otherwise, it returns `False`.
Right now, `all()` is taking an empty list as the argument. Populate that empty list using the comprehension syntax so that the list stores the results of evaluating the expression `constraint <= len(re.findall(pattern, password))` for each `constraint`-`pattern` tuple in the `constraints` list.
You can combine the `all()` function with the list comprehension syntax to make your code more concise.
Modify your `if` condition by passing the list comprehension you created in the previous step to the `all()` function.
In this way, you'll break out of the `while` loop only after all the requirements are fulfilled.
# --hints--
You should pass your list comprehension to the `all()` function.
You should pass `[constraint <= len(re.findall(pattern, password)) for constraint, pattern in constraints]` to the `all()` function.
```js
({ test: () => assert.match(code, /^(\s*)if\s+all\s*\(\s*\[\s*constraint\s*<=\s*len\s*\(\s*re\.findall\s*\(\s*pattern\s*,\s*password\s*\)\s*\)\s*for\s+constraint\s*,\s*pattern\s+in\s+constraints\s*\]\s*\)\s*:\s*^\1\s{4}break/m) })
({ test: () => assert(runPython(`
_Node(_code).find_function("generate_password").find_while("True").find_bodies()[0].find_ifs()[0].find_conditions()[0].is_equivalent("all([constraint <= len(re.findall(pattern, password)) for constraint, pattern in constraints])")
`)) })
```
# --seed--
@@ -56,8 +56,7 @@ def generate_password(length, nums, special_chars, uppercase, lowercase):
# Check constraints
count = 0
--fcc-editable-region--
if [constraint <= len(re.findall(pattern, password))
for constraint, pattern in constraints]:
if all([]):
--fcc-editable-region--
break

View File

@@ -14,7 +14,11 @@ You don't need the `count` variable anymore. Delete this variable and its value.
You should delete the `count = 0` line.
```js
({ test: () => assert.isFalse( /count\s*=\s*0/.test(code)) })
({ test: () => {
const commentless_code = __helpers.python.removeComments(code);
assert.isFalse( /count\s*=\s*0/.test(commentless_code))
}
})
```
# --seed--

View File

@@ -15,7 +15,7 @@ You can call a function using keyword arguments, that is writing the parameter n
def add(x, y):
return x + y
spam(x=1, y=7) # 8
add(x=1, y=7) # 8
```
Modify your function call to use keyword arguments.

View File

@@ -18,7 +18,7 @@ You will be <a href="https://gitpod.io/?autostart=true#https://github.com/freeCo
# --instructions--
In this project, you will visualize and make calculations from medical examination data using matplotlib, seaborn, and pandas. The dataset values were collected during medical examinations.
In this project, you will visualize and make calculations from medical examination data using `matplotlib`, `seaborn`, and `pandas`. The dataset values were collected during medical examinations.
## Data description
@@ -43,23 +43,49 @@ File name: medical_examination.csv
## Tasks
Create a chart similar to `examples/Figure_1.png`, where we show the counts of good and bad outcomes for the `cholesterol`, `gluc`, `alco`, `active`, and `smoke` variables for patients with cardio=1 and cardio=0 in different panels.
Create a chart similar to `examples/Figure_1.png`, where we show the counts of good and bad outcomes for the `cholesterol`, `gluc`, `alco`, `active`, and `smoke` variables for patients with `cardio=1` and `cardio=0` in different panels.
Use the data to complete the following tasks in `medical_data_visualizer.py`:
- Add an `overweight` column to the data. To determine if a person is overweight, first calculate their BMI by dividing their weight in kilograms by the square of their height in meters. If that value is > 25 then the person is overweight. Use the value 0 for NOT overweight and the value 1 for overweight.
- Normalize the data by making 0 always good and 1 always bad. If the value of `cholesterol` or `gluc` is 1, make the value 0. If the value is more than 1, make the value 1.
- Convert the data into long format and create a chart that shows the value counts of the categorical features using seaborn's `catplot()`. The dataset should be split by 'Cardio' so there is one chart for each `cardio` value. The chart should look like `examples/Figure_1.png`.
- Add an `overweight` column to the data. To determine if a person is overweight, first calculate their BMI by dividing their weight in kilograms by the square of their height in meters. If that value is > 25 then the person is overweight. Use the value `0` for NOT overweight and the value `1` for overweight.
- Normalize the data by making `0` always good and `1` always bad. If the value of `cholesterol` or `gluc` is `1`, make the value `0`. If the value is more than `1`, make the value `1`.
- Convert the data into long format and create a chart that shows the value counts of the categorical features using `seaborn`'s `catplot()`. The dataset should be split by `Cardio` so there is one chart for each `cardio` value. The chart should look like `examples/Figure_1.png`.
- Clean the data. Filter out the following patient segments that represent incorrect data:
- diastolic pressure is higher than systolic (Keep the correct data with `(df['ap_lo'] <= df['ap_hi'])`)
- height is less than the 2.5th percentile (Keep the correct data with `(df['height'] >= df['height'].quantile(0.025))`)
- height is more than the 97.5th percentile
- weight is less than the 2.5th percentile
- weight is more than the 97.5th percentile
- Create a correlation matrix using the dataset. Plot the correlation matrix using seaborn's `heatmap()`. Mask the upper triangle. The chart should look like `examples/Figure_2.png`.
- Create a correlation matrix using the dataset. Plot the correlation matrix using `seaborn`'s `heatmap()`. Mask the upper triangle. The chart should look like `examples/Figure_2.png`.
Any time a variable is set to `None`, make sure to set it to the correct code.
Unit tests are written for you under `test_module.py`.
## Instructions
By each number in the `medical_data_visualizer.py` file, add the code from the associated instruction number below.
1. Import the data from `medical_examination.csv` and assign it to the `df` variable
2. Create the `overweight` column in the `df` variable
3. Normalize data by making `0` always good and `1` always bad. If the value of `cholesterol` or `gluc` is 1, set the value to `0`. If the value is more than `1`, set the value to `1`.
4. Draw the Categorical Plot in the `draw_cat_plot` function
5. Create a DataFrame for the cat plot using `pd.melt` with values from `cholesterol`, `gluc`, `smoke`, `alco`, `active`, and `overweight` in the `df_cat` variable.
6. Group and reformat the data in `df_cat` to split it by `cardio`. Show the counts of each feature. You will have to rename one of the columns for the `catplot` to work correctly.
7. Convert the data into `long` format and create a chart that shows the value counts of the categorical features using the following method provided by the seaborn library import : `sns.catplot()`
8. Get the figure for the output and store it in the `fig` variable
9. Do not modify the next two lines
10. Draw the Heat Map in the `draw_heat_map` function
11. Clean the data in the `df_heat` variable by filtering out the following patient segments that represent incorrect data:
- height is less than the 2.5th percentile (Keep the correct data with `(df['height'] >= df['height'].quantile(0.025))`)
- height is more than the 97.5th percentile
- weight is less than the 2.5th percentile
- weight is more than the 97.5th percentile
12. Calculate the correlation matrix and store it in the `corr` variable
13. Generate a mask for the upper triangle and store it in the `mask` variable
14. Set up the `matplotlib` figure
15. Plot the correlation matrix using the method provided by the `seaborn` library import: `sns.heatmap()`
16. Do not modify the next two lines
## التطوير
Write your code in `medical_data_visualizer.py`. For development, you can use `main.py` to test your code.

View File

@@ -200,7 +200,7 @@ const linkText = Array.from(document.querySelectorAll('.nav-link')).map(el =>
el.innerText?.trim().toUpperCase()
)
const remainder = headerText.filter(str => linkText.indexOf(str) === -1)
assert(headerText.length > 0 && headerText.length > 0 && remainder.length === 0)
assert(headerText.length > 0 && linkText.length > 0 && remainder.length === 0)
```
يجب أن يكون لكل `.nav-link` سمة `href` التي تربط مع `.main-section` (على سبيل المثال، إذا نقرت على العنصر `.nav-link` الذي يحتوي على النص "Hello world"، تنتقل الصفحة إلى عنصر `section` بهذا المعرف (id)).

View File

@@ -9,7 +9,7 @@ dashedName: step-40
قد نجح ذلك، ولكن لا يزال هناك مسافة فارغة صغير على يمين price.
يمكنك الاستمرار في تجربة نسب مئوية مختلفة للعرض. وبدلا من ذلك، استخدم مفتاح space على لوحة المفاتيح لنقل عنصر `p` مع الفئة `price` بجانب عنصر `p` مع الفئة `flavor` بحيث تكون على نفس السطر في المحرر. تيقن من عدم وجود مسافة.
يمكنك الاستمرار في تجربة نسب مئوية مختلفة للعرض. وبدلا من ذلك، استخدم مفتاح space على لوحة المفاتيح لنقل عنصر `p` مع الفئة `price` بجانب عنصر `p` مع الفئة `flavor` بحيث تكون على نفس السطر في المحرر. Make sure there is no space between the two elements.
# --hints--

View File

@@ -7,47 +7,45 @@ dashedName: step-1
# --description--
عناصر HTML لديها علامات فتح (opening tags) مثل `<h1>` وإغلاق (closing tags) مثل `</h1>`.
HTML elements have opening tags like `<h1>` and closing tags like `</h1>`. The text an element will display goes between its opening and closing tags.
تيقن من أن نص العنصر يقع بين سمات أفتاح (open tag) و أغلاق (closing tag).
Change the text of the `h1` element below from `Hello World` to `CatPhotoApp` and watch the change in the browser preview.
ابحث عن عنصر `h1` وغيّر نصه إلى:
`CatPhotoApp`
When you are done, press the "Check Your Code" button to see if it's correct.
# --hints--
النص `CatPhotoApp` يجب أن يكون موجوداً في الكود. قد تحتاج إلى التحقق من الإملاء.
The text `CatPhotoApp` should be present in the code. You may want to check your spelling.
```js
assert(code.match(/catphotoapp/i));
```
يجب أن يحتوي العنصر `h1` على opening tag. Opening tags تكتب هكذا: `<elementName>`.
Your `h1` element should have an opening tag. Opening tags have this syntax: `<elementName>`.
```js
assert(document.querySelector('h1'));
```
يجب أن يحتوي العنصر `h1` على closing tag. Closing tags يجب ان تتبع بـ `/` مباشرة بعد رمز `<`.
Your `h1` element should have a closing tag. Closing tags have a `/` just after the `<` character.
```js
assert(code.match(/<\/h1\>/));
```
لديك أكثر من عنصر واحد `h1`. قم بإزالة عنصر `h1` الإضافي.
You have more than one `h1` element. Remove the extra `h1` element.
```js
assert(document.querySelectorAll('h1').length === 1);
```
النص في عنصر `h1` يجب أن يكون `CatPhotoApp`. إما أن تكون قد حذفت النص، أو لديك خطأ إملائي، أو أنه ليس بين علامتي فتح وإغلاق العنصر `h1`.
Your `h1` element's text should be `CatPhotoApp`. You have either omitted the text, have a typo, or it is not between the `h1` element's opening and closing tags.
```js
assert(document.querySelector('h1').innerText.toLowerCase() === 'catphotoapp');
```
يبدو أنك تستخدم ملحق (extension) المتصفح الذي يعدل الصفحة. تيقن من إيقاف جميع ملحقات المتصفح.
You appear to be using a browser extension that is modifying the page. Be sure to turn off all browser extensions.
```js
assert.isAtMost(document.querySelectorAll('script').length, 2);

View File

@@ -26,7 +26,7 @@ assert(code.match(/const\s+userAvatarUrl\s*=/));
You should assign a `ternary` operator to the `userAvatarUrl`. Your `ternary` should check if `avatar` starts with `/user_avatar/` and return `avatarUrl.concat(avatar)` or `avatar`.
```js
assert(code.match(/const\s+userAvatarUrl\s*=\s*avatar\.startsWith\(\s*('|")\/user_avatar\/\1\s*\)\s*\?\s*avatarUrl\.concat\(\s*avatar\s*\)\s*:\s*avatar\s*/));
assert(code.match(/const\s+userAvatarUrl\s*=\s*(?:avatar\.startsWith\(\s*('|")\/user_avatar\/\1\s*\)|\/\^\\\/user_avatar\\\/\/\.test\(\s*avatar\s*\))\s*\?\s*avatarUrl\.concat\(\s*avatar\s*\)\s*:\s*avatar/));
```
# --seed--

View File

@@ -9,6 +9,12 @@ dashedName: step-17
قم بتغليف الأرقام `0`, و `100`, و `50` في عناصر `span`. ثمَّ غلف العناصر `span` الجديدة في عناصر `strong`. Then give your new `span` elements `id` values of `xpText`, `healthText`, and `goldText`, respectively.
Your answer should follow this basic structure:
```html
<span class="stat">TEXT <strong><span id="VALUE">TEXT</span></strong></span>
```
# --hints--
You should add a `strong` element in your first `.stat` element.

View File

@@ -9,7 +9,7 @@ dashedName: step-6
You now need to start adding products. Before you do that, you need to consider the structure of your product data. A product will need a unique identifier to distinguish it from other products, a price so people know how much it costs, and a name so people know what they are buying. You should also add a category to each product.
Add an object to your `products` array. Give this object an `id` property set to the number `1`, a `name` property set to `Vanilla Cupcakes (6 Pack)`, a `price` property set to the number `12.99`, and a `category` property set to `Cupcake`.
Add an object to your `products` array. Give this object an `id` property set to the number `1`, a `name` property set to the string `"Vanilla Cupcakes (6 Pack)"`, a `price` property set to the number `12.99`, and a `category` property set to the string `"Cupcake"`.
# --hints--
@@ -31,7 +31,7 @@ Your products array should have an object with an `id` property set to the numbe
assert.equal(products[0].id, 1);
```
Your products array should have an object with a `name` property set to `Vanilla Cupcakes (6 Pack)`.
Your products array should have an object with a `name` property set to the string `"Vanilla Cupcakes (6 Pack)"`.
```js
assert.equal(products[0].name, 'Vanilla Cupcakes (6 Pack)');
@@ -43,7 +43,7 @@ Your products array should have an object with a `price` property set to the num
assert.equal(products[0].price, 12.99);
```
Your products array should have an object with a `category` property set to `Cupcake`.
Your products array should have an object with a `category` property set to the string `"Cupcake"`.
```js
assert.equal(products[0].category, 'Cupcake');

View File

@@ -7,7 +7,7 @@ dashedName: step-12
# --description--
After your `h2` element, create two `p` elements. Give the first a `class` of `dessert-price`, and the text of the `price` variable with a dollar sign in front of it. Give the second a `class` of `product-category`, and the text `Category:` followed by the value of the `category` variable.
After your `h2` element, create two `p` elements. Give the first a `class` of `dessert-price`, and the text of the `price` variable with a dollar sign in front of it. Give the second a `class` of `product-category`, and the text `"Category: "` followed by the value of the `category` variable.
# --hints--
@@ -44,7 +44,7 @@ Your second `p` element should have a `class` of `product-category`.
assert.equal(document.querySelector('.dessert-card')?.children[2].className, 'product-category');
```
Your second `p` element should have the text `Category:` followed by the value of the `category` variable.
Your second `p` element should have the text `"Category: "` followed by the value of the `category` variable.
```js
assert.equal(document.querySelector('.dessert-card')?.children[2].textContent, 'Category: Cupcake');

View File

@@ -7,7 +7,7 @@ dashedName: step-13
# --description--
Finally, after your `p` elements, create a `button` element. Give it an `id` set to the value of the `id` variable, a `class` of `btn add-to-cart-btn`, and use `Add to cart` for the text.
Finally, after your `p` elements, create a `button` element. Give it an `id` set to the value of the `id` variable, a `class` of `btn add-to-cart-btn`, and use `"Add to cart"` for the text.
# --hints--
@@ -37,7 +37,7 @@ assert.include(document.querySelector('.dessert-card button')?.className, 'btn')
assert.include(document.querySelector('.dessert-card button')?.className, 'add-to-cart-btn');
```
Your `button` element should have the text `Add to cart`.
Your `button` element should have the text `"Add to cart"`.
```js
assert.equal(document.querySelector('.dessert-card button')?.textContent?.trim(), 'Add to cart');

View File

@@ -315,7 +315,7 @@ class ShoppingCart {
currentProductCount > 1
? currentProductCountSpan.textContent = `${currentProductCount}x`
: productsContainer.innerHTML += `
<div id=dessert${id} class="product">
<div id="dessert${id}" class="product">
</div>
`;

View File

@@ -336,7 +336,7 @@ class ShoppingCart {
currentProductCount > 1
? currentProductCountSpan.textContent = `${currentProductCount}x`
: productsContainer.innerHTML += `
<div id=dessert${id} class="product">
<div id="dessert${id}" class="product">
<p>
</p>

View File

@@ -318,9 +318,9 @@ class ShoppingCart {
currentProductCount > 1
? currentProductCountSpan.textContent = `${currentProductCount}x`
: productsContainer.innerHTML += `
<div id=dessert${id} class="product">
<div id="dessert${id}" class="product">
<p>
<span class="product-count" id=product-count-for-id${id}></span>${name}
<span class="product-count" id="product-count-for-id${id}"></span>${name}
</p>
<p>${price}</p>
</div>

View File

@@ -7,7 +7,7 @@ dashedName: step-33
# --description--
You need to get all of the `Add to cart` buttons that you added to the DOM earlier. Declare an `addToCartBtns` variable, and assign it the value of calling the `getElementsByClassName()` method on the `document` object, passing in the string `add-to-cart-btn`.
You need to get all of the `Add to cart` buttons that you added to the DOM earlier. Declare an `addToCartBtns` variable, and assign it the value of calling the `getElementsByClassName()` method on the `document` object, passing in the string `"add-to-cart-btn"`.
# --hints--
@@ -23,7 +23,7 @@ You should call the `getElementsByClassName()` method on the `document` object.
assert.match(code, /document\s*\.\s*getElementsByClassName\s*\(/);
```
You should pass the string `add-to-cart-btn` to the `getElementsByClassName()` method.
You should pass the string `"add-to-cart-btn"` to the `getElementsByClassName()` method.
```js
assert.match(code, /document\s*\.\s*getElementsByClassName\s*\(\s*('|"|`)add-to-cart-btn\1\s*\)/);
@@ -318,9 +318,9 @@ class ShoppingCart {
currentProductCount > 1
? currentProductCountSpan.textContent = `${currentProductCount}x`
: productsContainer.innerHTML += `
<div id=dessert${id} class="product">
<div id="dessert${id}" class="product">
<p>
<span class="product-count" id=product-count-for-id${id}></span>${name}
<span class="product-count" id="product-count-for-id${id}"></span>${name}
</p>
<p>${price}</p>
</div>

View File

@@ -320,9 +320,9 @@ class ShoppingCart {
currentProductCount > 1
? currentProductCountSpan.textContent = `${currentProductCount}x`
: productsContainer.innerHTML += `
<div id=dessert${id} class="product">
<div id="dessert${id}" class="product">
<p>
<span class="product-count" id=product-count-for-id${id}></span>${name}
<span class="product-count" id="product-count-for-id${id}"></span>${name}
</p>
<p>${price}</p>
</div>

View File

@@ -318,9 +318,9 @@ class ShoppingCart {
currentProductCount > 1
? currentProductCountSpan.textContent = `${currentProductCount}x`
: productsContainer.innerHTML += `
<div id=dessert${id} class="product">
<div id="dessert${id}" class="product">
<p>
<span class="product-count" id=product-count-for-id${id}></span>${name}
<span class="product-count" id="product-count-for-id${id}"></span>${name}
</p>
<p>${price}</p>
</div>

View File

@@ -314,9 +314,9 @@ class ShoppingCart {
currentProductCount > 1
? currentProductCountSpan.textContent = `${currentProductCount}x`
: productsContainer.innerHTML += `
<div id=dessert${id} class="product">
<div id="dessert${id}" class="product">
<p>
<span class="product-count" id=product-count-for-id${id}></span>${name}
<span class="product-count" id="product-count-for-id${id}"></span>${name}
</p>
<p>${price}</p>
</div>

View File

@@ -317,9 +317,9 @@ class ShoppingCart {
currentProductCount > 1
? currentProductCountSpan.textContent = `${currentProductCount}x`
: productsContainer.innerHTML += `
<div id=dessert${id} class="product">
<div id="dessert${id}" class="product">
<p>
<span class="product-count" id=product-count-for-id${id}></span>${name}
<span class="product-count" id="product-count-for-id${id}"></span>${name}
</p>
<p>${price}</p>
</div>

View File

@@ -306,9 +306,9 @@ class ShoppingCart {
currentProductCount > 1
? currentProductCountSpan.textContent = `${currentProductCount}x`
: productsContainer.innerHTML += `
<div id=dessert${id} class="product">
<div id="dessert${id}" class="product">
<p>
<span class="product-count" id=product-count-for-id${id}></span>${name}
<span class="product-count" id="product-count-for-id${id}"></span>${name}
</p>
<p>${price}</p>
</div>

View File

@@ -339,9 +339,9 @@ class ShoppingCart {
currentProductCount > 1
? currentProductCountSpan.textContent = `${currentProductCount}x`
: productsContainer.innerHTML += `
<div id=dessert${id} class="product">
<div id="dessert${id}" class="product">
<p>
<span class="product-count" id=product-count-for-id${id}></span>${name}
<span class="product-count" id="product-count-for-id${id}"></span>${name}
</p>
<p>${price}</p>
</div>

View File

@@ -306,9 +306,9 @@ class ShoppingCart {
currentProductCount > 1
? currentProductCountSpan.textContent = `${currentProductCount}x`
: productsContainer.innerHTML += `
<div id=dessert${id} class="product">
<div id="dessert${id}" class="product">
<p>
<span class="product-count" id=product-count-for-id${id}></span>${name}
<span class="product-count" id="product-count-for-id${id}"></span>${name}
</p>
<p>${price}</p>
</div>

View File

@@ -323,9 +323,9 @@ class ShoppingCart {
currentProductCount > 1
? currentProductCountSpan.textContent = `${currentProductCount}x`
: productsContainer.innerHTML += `
<div id=dessert${id} class="product">
<div id="dessert${id}" class="product">
<p>
<span class="product-count" id=product-count-for-id${id}></span>${name}
<span class="product-count" id="product-count-for-id${id}"></span>${name}
</p>
<p>${price}</p>
</div>

View File

@@ -317,9 +317,9 @@ class ShoppingCart {
currentProductCount > 1
? currentProductCountSpan.textContent = `${currentProductCount}x`
: productsContainer.innerHTML += `
<div id=dessert${id} class="product">
<div id="dessert${id}" class="product">
<p>
<span class="product-count" id=product-count-for-id${id}></span>${name}
<span class="product-count" id="product-count-for-id${id}"></span>${name}
</p>
<p>${price}</p>
</div>

View File

@@ -303,9 +303,9 @@ class ShoppingCart {
currentProductCount > 1
? currentProductCountSpan.textContent = `${currentProductCount}x`
: productsContainer.innerHTML += `
<div id=dessert${id} class="product">
<div id="dessert${id}" class="product">
<p>
<span class="product-count" id=product-count-for-id${id}></span>${name}
<span class="product-count" id="product-count-for-id${id}"></span>${name}
</p>
<p>${price}</p>
</div>

View File

@@ -312,9 +312,9 @@ class ShoppingCart {
currentProductCount > 1
? currentProductCountSpan.textContent = `${currentProductCount}x`
: productsContainer.innerHTML += `
<div id=dessert${id} class="product">
<div id="dessert${id}" class="product">
<p>
<span class="product-count" id=product-count-for-id${id}></span>${name}
<span class="product-count" id="product-count-for-id${id}"></span>${name}
</p>
<p>${price}</p>
</div>

View File

@@ -306,9 +306,9 @@ class ShoppingCart {
currentProductCount > 1
? currentProductCountSpan.textContent = `${currentProductCount}x`
: productsContainer.innerHTML += `
<div id=dessert${id} class="product">
<div id="dessert${id}" class="product">
<p>
<span class="product-count" id=product-count-for-id${id}></span>${name}
<span class="product-count" id="product-count-for-id${id}"></span>${name}
</p>
<p>${price}</p>
</div>

View File

@@ -7,7 +7,7 @@ dashedName: step-39
# --description--
Now assign the `textContent` of the `showHideCartSpan` variable the result of a ternary expression which checks if `isCartShowing` is true. If it is, set the `textContent` to `Hide`, otherwise set it to `Show`.
Now assign the `textContent` of the `showHideCartSpan` variable the result of a ternary expression which checks if `isCartShowing` is true. If it is, set the `textContent` to `"Hide"`, otherwise set it to `"Show"`.
# --hints--
@@ -23,13 +23,13 @@ You should use ternary syntax to check if `isCartShowing` is true.
assert.match(code, /showHideCartSpan\s*\.\s*textContent\s*=\s*isCartShowing\s*\?\s*/)
```
You should set the `textContent` of the `showHideCartSpan` variable to `Hide` if `isCartShowing` is true.
You should set the `textContent` of the `showHideCartSpan` variable to `"Hide"` if `isCartShowing` is true.
```js
assert.match(code, /showHideCartSpan\s*\.\s*textContent\s*=\s*isCartShowing\s*\?\s*('|"|`)Hide\1\s*:\s*/)
```
You should set the `textContent` of the `showHideCartSpan` variable to `Show` if `isCartShowing` is false.
You should set the `textContent` of the `showHideCartSpan` variable to `"Show"` if `isCartShowing` is false.
```js
assert.match(code, /showHideCartSpan\s*\.\s*textContent\s*=\s*isCartShowing\s*\?\s*('|"|`)Hide\1\s*:\s*('|"|`)Show\2/)
@@ -318,9 +318,9 @@ class ShoppingCart {
currentProductCount > 1
? currentProductCountSpan.textContent = `${currentProductCount}x`
: productsContainer.innerHTML += `
<div id=dessert${id} class="product">
<div id="dessert${id}" class="product">
<p>
<span class="product-count" id=product-count-for-id${id}></span>${name}
<span class="product-count" id="product-count-for-id${id}"></span>${name}
</p>
<p>${price}</p>
</div>

View File

@@ -7,7 +7,7 @@ dashedName: step-40
# --description--
Finally, update the `display` property of the `style` object of the `cartContainer` variable to another ternary which checks if `isCartShowing` is true. If it is, set the `display` property to `block`, otherwise set it to `none`.
Finally, update the `display` property of the `style` object of the `cartContainer` variable to another ternary which checks if `isCartShowing` is true. If it is, set the `display` property to `"block"`, otherwise set it to `"none"`.
Now you should be able to see your cart and add items to it.
@@ -31,13 +31,13 @@ You should use ternary syntax to check if `isCartShowing` is true.
assert.match(code, /cartContainer\s*\.\s*style\s*\.\s*display\s*=\s*isCartShowing\s*\?\s*/)
```
You should set the `display` property of the `style` property of the `cartContainer` variable to `block` if `isCartShowing` is true.
You should set the `display` property of the `style` property of the `cartContainer` variable to `"block"` if `isCartShowing` is true.
```js
assert.match(code, /cartContainer\s*\.\s*style\s*\.\s*display\s*=\s*isCartShowing\s*\?\s*('|"|`)block\1\s*:\s*/)
```
You should set the `display` property of the `style` property of the `cartContainer` variable to `none` if `isCartShowing` is false.
You should set the `display` property of the `style` property of the `cartContainer` variable to `"none"` if `isCartShowing` is false.
```js
assert.match(code, /cartContainer\s*\.\s*style\s*\.\s*display\s*=\s*isCartShowing\s*\?\s*('|"|`)block\1\s*:\s*('|"|`)none\2/)
@@ -326,9 +326,9 @@ class ShoppingCart {
currentProductCount > 1
? currentProductCountSpan.textContent = `${currentProductCount}x`
: productsContainer.innerHTML += `
<div id=dessert${id} class="product">
<div id="dessert${id}" class="product">
<p>
<span class="product-count" id=product-count-for-id${id}></span>${name}
<span class="product-count" id="product-count-for-id${id}"></span>${name}
</p>
<p>${price}</p>
</div>

View File

@@ -308,9 +308,9 @@ class ShoppingCart {
currentProductCount > 1
? currentProductCountSpan.textContent = `${currentProductCount}x`
: productsContainer.innerHTML += `
<div id=dessert${id} class="product">
<div id="dessert${id}" class="product">
<p>
<span class="product-count" id=product-count-for-id${id}></span>${name}
<span class="product-count" id="product-count-for-id${id}"></span>${name}
</p>
<p>${price}</p>
</div>

View File

@@ -306,9 +306,9 @@ class ShoppingCart {
currentProductCount > 1
? currentProductCountSpan.textContent = `${currentProductCount}x`
: productsContainer.innerHTML += `
<div id=dessert${id} class="product">
<div id="dessert${id}" class="product">
<p>
<span class="product-count" id=product-count-for-id${id}></span>${name}
<span class="product-count" id="product-count-for-id${id}"></span>${name}
</p>
<p>${price}</p>
</div>

View File

@@ -320,9 +320,9 @@ class ShoppingCart {
currentProductCount > 1
? currentProductCountSpan.textContent = `${currentProductCount}x`
: productsContainer.innerHTML += `
<div id=dessert${id} class="product">
<div id="dessert${id}" class="product">
<p>
<span class="product-count" id=product-count-for-id${id}></span>${name}
<span class="product-count" id="product-count-for-id${id}"></span>${name}
</p>
<p>${price}</p>
</div>

View File

@@ -346,9 +346,9 @@ class ShoppingCart {
currentProductCount > 1
? currentProductCountSpan.textContent = `${currentProductCount}x`
: productsContainer.innerHTML += `
<div id=dessert${id} class="product">
<div id="dessert${id}" class="product">
<p>
<span class="product-count" id=product-count-for-id${id}></span>${name}
<span class="product-count" id="product-count-for-id${id}"></span>${name}
</p>
<p>${price}</p>
</div>

View File

@@ -302,9 +302,9 @@ class ShoppingCart {
currentProductCount > 1
? currentProductCountSpan.textContent = `${currentProductCount}x`
: productsContainer.innerHTML += `
<div id=dessert${id} class="product">
<div id="dessert${id}" class="product">
<p>
<span class="product-count" id=product-count-for-id${id}></span>${name}
<span class="product-count" id="product-count-for-id${id}"></span>${name}
</p>
<p>${price}</p>
</div>

View File

@@ -300,9 +300,9 @@ class ShoppingCart {
currentProductCount > 1
? currentProductCountSpan.textContent = `${currentProductCount}x`
: productsContainer.innerHTML += `
<div id=dessert${id} class="product">
<div id="dessert${id}" class="product">
<p>
<span class="product-count" id=product-count-for-id${id}></span>${name}
<span class="product-count" id="product-count-for-id${id}"></span>${name}
</p>
<p>${price}</p>
</div>

View File

@@ -316,9 +316,9 @@ class ShoppingCart {
currentProductCount > 1
? currentProductCountSpan.textContent = `${currentProductCount}x`
: productsContainer.innerHTML += `
<div id=dessert${id} class="product">
<div id="dessert${id}" class="product">
<p>
<span class="product-count" id=product-count-for-id${id}></span>${name}
<span class="product-count" id="product-count-for-id${id}"></span>${name}
</p>
<p>${price}</p>
</div>

View File

@@ -321,9 +321,9 @@ class ShoppingCart {
currentProductCount > 1
? currentProductCountSpan.textContent = `${currentProductCount}x`
: productsContainer.innerHTML += `
<div id=dessert${id} class="product">
<div id="dessert${id}" class="product">
<p>
<span class="product-count" id=product-count-for-id${id}></span>${name}
<span class="product-count" id="product-count-for-id${id}"></span>${name}
</p>
<p>${price}</p>
</div>

View File

@@ -314,9 +314,9 @@ class ShoppingCart {
currentProductCount > 1
? currentProductCountSpan.textContent = `${currentProductCount}x`
: productsContainer.innerHTML += `
<div id=dessert${id} class="product">
<div id="dessert${id}" class="product">
<p>
<span class="product-count" id=product-count-for-id${id}></span>${name}
<span class="product-count" id="product-count-for-id${id}"></span>${name}
</p>
<p>${price}</p>
</div>

View File

@@ -300,9 +300,9 @@ class ShoppingCart {
currentProductCount > 1
? currentProductCountSpan.textContent = `${currentProductCount}x`
: productsContainer.innerHTML += `
<div id=dessert${id} class="product">
<div id="dessert${id}" class="product">
<p>
<span class="product-count" id=product-count-for-id${id}></span>${name}
<span class="product-count" id="product-count-for-id${id}"></span>${name}
</p>
<p>${price}</p>
</div>

View File

@@ -326,9 +326,9 @@ class ShoppingCart {
currentProductCount > 1
? currentProductCountSpan.textContent = `${currentProductCount}x`
: productsContainer.innerHTML += `
<div id=dessert${id} class="product">
<div id="dessert${id}" class="product">
<p>
<span class="product-count" id=product-count-for-id${id}></span>${name}
<span class="product-count" id="product-count-for-id${id}"></span>${name}
</p>
<p>${price}</p>
</div>

View File

@@ -318,9 +318,9 @@ class ShoppingCart {
currentProductCount > 1
? currentProductCountSpan.textContent = `${currentProductCount}x`
: productsContainer.innerHTML += `
<div id=dessert${id} class="product">
<div id="dessert${id}" class="product">
<p>
<span class="product-count" id=product-count-for-id${id}></span>${name}
<span class="product-count" id="product-count-for-id${id}"></span>${name}
</p>
<p>${price}</p>
</div>
@@ -672,9 +672,9 @@ class ShoppingCart {
currentProductCount > 1
? currentProductCountSpan.textContent = `${currentProductCount}x`
: productsContainer.innerHTML += `
<div id=dessert${id} class="product">
<div id="dessert${id}" class="product">
<p>
<span class="product-count" id=product-count-for-id${id}></span>${name}
<span class="product-count" id="product-count-for-id${id}"></span>${name}
</p>
<p>${price}</p>
</div>

View File

@@ -301,9 +301,9 @@ class ShoppingCart {
currentProductCount > 1
? currentProductCountSpan.textContent = `${currentProductCount}x`
: productsContainer.innerHTML += `
<div id=dessert${id} class="product">
<div id="dessert${id}" class="product">
<p>
<span class="product-count" id=product-count-for-id${id}></span>${name}
<span class="product-count" id="product-count-for-id${id}"></span>${name}
</p>
<p>${price}</p>
</div>

View File

@@ -7,9 +7,9 @@ dashedName: step-66
# --description--
Use `const` and arrow syntax to define a function called `setPlayButtonAccessibleText`.
To make the application more accessible, it is important that the play button describes the current song or the first song in the playlist.
This function will set the `aria-label` attribute to the current song, or to the first song in the playlist. And if the playlist is empty, it sets the `aria-label` to `"Play"`.
Start by creating an empty arrow function called `setPlayButtonAccessibleText`.
# --hints--

View File

@@ -7,7 +7,9 @@ dashedName: step-68
# --description--
Use the `setAttribute` method on the `playButton` element to set an attribute named `"aria-label"`. For the value, use a `ternary` to set `song?.title` to `Play ${song.title}` or `"Play"` if there's no `song.title` available.
The `setPlayButtonAccessibleText` function will set the `aria-label` attribute to the current song, or to the first song in the playlist. And if the playlist is empty, it sets the `aria-label` to `"Play"`.
Use the `setAttribute` method on the `playButton` element to set an attribute named `"aria-label"`. For the value, use a ternary to `set song?.title` to `Play ${song.title}` or `"Play"` if there's no `song.title` available.
Don't forget you need template interpolation here, so you need to use backticks.

View File

@@ -17,7 +17,7 @@ You should create an `if` block.
assert.match(code, /const\s+update\s*=\s*(?:\(\s*event\s*\)|event)\s*=>\s*\{\s*const\s+element\s*=\s*event\.target\s*;?\s*const\s+value\s*=\s*element\.value\.replace\(\s*\/\\s\/g\s*,\s*('|"|`)\1\s*\)\s*;?\s*if\s*\(/);
```
Your `if` condition should check if `value` includes the `id` of the `element`.
Your `if` condition should check that `value` does not include the `id` of the `element`.
```js
assert.match(code, /const\s+update\s*=\s*(?:\(\s*event\s*\)|event)\s*=>\s*\{\s*const\s+element\s*=\s*event\.target\s*;?\s*const\s+value\s*=\s*element\.value\.replace\(\s*\/\\s\/g\s*,\s*('|"|`)\1\s*\)\s*;?\s*if\s*\(\s*!value\.includes\(\s*element\.id\s*\)/);

View File

@@ -14,7 +14,7 @@ To count the occurrences for each number, use a `for...of` loop to iterate throu
You should use a `for...of` loop to iterate through the `arr` array.
```js
assert.match(code, /const\s+detectFullHouse\s*=\s*(\(\s*arr\s*\)|arr)\s*=>\s*{.*\s*for\s*\(\s*const\s+num\s+of\s+arr\s*\)\s*{\s*.*}/s);
assert.match(code, /const\s+detectFullHouse\s*=\s*(\(\s*arr\s*\)|arr)\s*=>\s*{.*\s*for\s*\(\s*(const|let|var)\s+num\s+of\s+arr\s*\)\s*{\s*.*}/s);
```
# --seed--

View File

@@ -7,7 +7,26 @@ dashedName: step-66
# --description--
Inside the constructor, add `this.position` and assign it an object with the `x` and `y` coordinates.
When working with objects where the property name and value are the same, you can use the shorthand property name syntax. This syntax allows you to omit the property value if it is the same as the property name.
```js
// using shorthand property name syntax
obj = {
a, b, c
}
```
The following code is the same as:
```js
obj = {
a: a,
b: b,
c: c
}
```
Inside the constructor, add `this.position` and assign it an object with the `x` and `y` coordinates. Make sure to use the shorthand property syntax .
# --hints--
@@ -17,7 +36,7 @@ You should have a `this.position` property.
assert.match(code, /this\.position\s*;?/);
```
The `this.position` property should be an object with the `x` and `y` coordinates.
The `this.position` property should be an object with the `x` and `y` coordinates. Make sure to use the shorthand property syntax.
```js
assert.match(code, /this\.position\s*=\s*{\s*x\s*,\s*y\s*,?\s*}\s*;?/);

View File

@@ -11,7 +11,7 @@ Next, retrieve the values from the input fields and store them in a `taskObj` ob
Create a `taskObj` object with an `id` property as the first property. For the value of the `id` property, retrieve the value of the `titleInput` field, convert it to lowercase, and then use the `split()` and `join()` methods to hyphenate it.
Make sure all of those are in template literals because you need the `id` property value as a string.
Make sure that the value of the `id` property is enclosed within template literals, as you will be appending more to the string later on.
# --hints--

View File

@@ -13,6 +13,8 @@ Start by accessing the `id` called `"team"` from the HTML document and storing i
Remember, you can use the `getElementById` method for this.
_NOTE_: The numbers for the team are organized alphabetically by last name. This differs from conventional numbering where the numbers correspond with what is on the player's jerseys.
# --hints--
You should use the `document.getElementById()` method to get the `#team` element.

View File

@@ -17,6 +17,8 @@ isCaptain: false
nickname: null
```
_NOTE_: The numbers for the team are organized alphabetically by last name. This differs from conventional numbering where the numbers correspond with what is on the player's jerseys.
# --hints--
Your `myFavoriteFootballTeam.players` array should have the value of an object.

View File

@@ -1,8 +1,8 @@
---
id: 657b1985ae17886b05b382b1
title: Task 25
title: Task 26
challengeType: 19
dashedName: task-25
dashedName: task-26
---
<!-- (Audio) Second Candidate: We were responsible for implementing new features and ensuring that the website had fast performance. -->

View File

@@ -1,8 +1,8 @@
---
id: 657b19bf7b32af6caf763ef7
title: Task 26
title: Task 27
challengeType: 19
dashedName: task-26
dashedName: task-27
---
<!-- (Audio) Second Candidate: It was a collaborative effort, and we were able to deliver the project on time. -->
@@ -15,7 +15,7 @@ The term `collaborative effort` refers to a situation where people work together
## --text--
What does `collaborative effort` imply in the context of Candidate2's statement?
What does `collaborative effort` imply in the context of the Second Candidate's statement?
## --answers--

View File

@@ -1,8 +1,8 @@
---
id: 657b1a03df3ec46eca276046
title: Task 27
title: Task 25
challengeType: 22
dashedName: task-27
dashedName: task-25
---
<!-- (Audio) Second Candidate: Yes, our team was involved in a project to redesign the company's website. -->

View File

@@ -1,8 +1,8 @@
---
id: 657b1a27dc6daf6ffd52ff1f
title: Task 28
title: Task 29
challengeType: 19
dashedName: task-28
dashedName: task-29
---
<!-- (Audio) Anna: Excellent! Can you share details about your educational background? Were you trained in a specific field?

View File

@@ -1,8 +1,8 @@
---
id: 657b1a637e4dc571f8f4d3d7
title: Task 29
title: Task 31
challengeType: 19
dashedName: task-29
dashedName: task-31
---
<!-- (Audio) Anna: Impressive. We appreciate candidates with strong educational backgrounds and practical experience. -->

View File

@@ -1,8 +1,8 @@
---
id: 657b1a9581015573806e1e20
title: Task 30
title: Task 28
challengeType: 22
dashedName: task-30
dashedName: task-28
---
<!-- (Audio) Second Candidate: We were responsible for implementing new features and ensuring the website's performance. It was a collaborative effort, and we were able to deliver the project on time. -->
@@ -15,7 +15,7 @@ Listen to the dialogue and fill in the blanks with the correct words you learned
## --sentence--
`We _ responsible for implementing new features and ensuring the website's performance. It _ a _ effort, and we were able to deliver the project on time.`
`We _ responsible for implementing new features and ensuring the website had fast performance. It _ a _ effort, and we were able to deliver the project on time.`
## --blanks--

View File

@@ -1,8 +1,8 @@
---
id: 657b1cc072206e7ac3db88b8
title: Task 31
title: Task 30
challengeType: 22
dashedName: task-31
dashedName: task-30
---
<!-- (Audio) Second Candidate: I have a master's degree in computer science. My studies were intensive, and I was introduced to many different methodologies. -->

View File

@@ -1,15 +1,23 @@
---
id: 657b1dfec76149836ea5c7d0
title: Task 34
title: Task 38
challengeType: 22
dashedName: task-34
dashedName: task-38
---
<!-- (Audio) Sophie: It wasn't exactly tech-related, but I learned a lot about problem-solving and critical thinking. -->
# --description--
In this task, you will focus on the past simple negative. It's created by adding `not` after the auxiliary verb `was` or `were`. For example, `was` becomes `wasn't` (`was not`) and `were` becomes `weren't` (`were not`). This form is used to describe something that did not happen in the past.
There are some verbs you can't use `didn't` to create negative sentences in the past. The verb `to be`is one of them.
If you want to create a negative sentence using the verb `to be` in the past, simply add `not` after `was` or `were`. For example:
`It was working normally` -> `It wasn't working normally`.
`They were informed earlier` -> `They weren't informed earlier`.
`Wasn't` is the abbreviation of `was not` and `weren't` the abbreviation of `were not`.
# --fillInTheBlank--

View File

@@ -1,21 +1,26 @@
---
id: 657b1e2fad2ffe84ab420a56
title: Task 35
title: Task 37
challengeType: 19
dashedName: task-35
dashedName: task-37
---
<!-- (Audio) Sophie: I didn't study computer science at university, but I majored in electrical engineering. -->
# --description--
For most verbs, if you want to make a negative sentence in the past tense, simply put `didn't` in front of the main verb. `Didn't` is short for `did not`.
You're already familiar with `wasn't` and `weren't` for past simple negative. Now, let's explore `didn't`, a contraction of `did not`. It's used with the base form of verbs (the infinitive without `to`) to express that an action did not happen in the past. For example, `didn't go` means the action of going did not occur.
Remember that the main verb stays in its simple form. Only the auxiliary verb `did` is conjugated. For example:
**Affirmative sentence in the past**: `I worked yesterday` - The Verb `work` is conjugated to the past.
**Negative sentence in the past**: `I didn't work yesterday` - Only the auxiliary verb is conjugated to the past.
# --question--
## --text--
If we say in English that `Sophie didn't study computer science`, what could you understand from this sentence?
If someone says that `Sophie didn't study computer science`, what could you understand from this sentence?
## --answers--

View File

@@ -1,15 +1,15 @@
---
id: 657b1e66159fec86336a737b
title: Task 36
title: Task 43
challengeType: 19
dashedName: task-36
dashedName: task-43
---
<!-- (Audio) Sophie: No, not really. I played around with coding, but most of my projects involved circuit designs and electrical systems. -->
# --description--
You've already learned the basics of the simple past tense. Now you can dive deeper into it. Typically, the simple past tense is formed by adding `-ed` to regular verbs. For instance, the verb `play` becomes `played` in the simple past. This tense is used to describe actions that were completed at a specific time in the past.
Typically, the simple past tense is formed by adding `-ed` to regular verbs. For instance, the verb `play` becomes `played` in the simple past. This tense is used to describe actions that were completed at a specific time in the past.
# --question--

View File

@@ -1,48 +1,100 @@
---
id: 657b1e9a62603587747f7f45
title: Task 37
title: Task 47
challengeType: 19
dashedName: task-37
dashedName: task-47
---
<!-- (Audio) Brian: I see. Did you enjoy your time there, even if it wasn't entirely tech-focused? -->
# --description--
In English, when forming questions in the simple past tense, you often use `did`. This is followed by the subject and the base form of the verb (without `ed`). For example, `Did you enjoy` is a past simple interrogative phrase where `did` is the auxiliary verb, `you` is the subject, and `enjoy` is the base form of the verb.
When you want to ask someone about their experiences related to a past event, you can say `Did you enjoy...?`
This is a simple way to ask about someone's preferences or satisfaction.
`Even if` is used to introduce a condition or situation that contrasts with the main part of the question or statement. It helps to provide more context or specify conditions under which something occurred or was felt.
For example, `Did you enjoy your vacation, even if it rained every day?` adds a contrasting condition to the question about the vacation.
# --question--
## --text--
What does a question like `Did you enjoy the concert last night?` ask about?
What does Brian want to know from Sophie?
## --answers--
Are you going to enjoy the concert?
If Sophie only did tech things
### --feedback--
This implies a future event. The question with `did` is asking about a past experience.
Brian knows Sophie's time was not all about tech.
---
Do you enjoy concerts in general?
If Sophie had a good time, even if it was not all about tech
---
What tech things Sophie learned
### --feedback--
This is asking about general preferences, not a specific past event.
Brian is asking about Sophie's feelings, not what she learned.
---
Did you have a good experience at the concert last night?
---
Will you enjoy future concerts?
If Sophie will do more tech things later
### --feedback--
The question is about a past event, not future experiences.
Brian is asking about the past, not what Sophie will do.
## --video-solution--
3
2
# --scene--
```json
{
"setup": {
"background": "company2-center.png",
"characters": [
{
"character": "Brian",
"position": {"x":50,"y":15,"z":1.2},
"opacity": 0
}
],
"audio": {
"filename": "3.1-3.mp3",
"startTime": 1,
"startTimestamp": 31.80,
"finishTimestamp": 36.02
}
},
"commands": [
{
"character": "Brian",
"opacity": 1,
"startTime": 0
},
{
"character": "Brian",
"startTime": 1,
"finishTime": 5.22,
"dialogue": {
"text": "I see. Did you enjoy your time there, even if it wasn't entirely tech-focused?",
"align": "center"
}
},
{
"character": "Brian",
"opacity": 0,
"startTime": 5.72
}
]
}
```

View File

@@ -1,8 +1,8 @@
---
id: 657b1f0585d48f8ac0b19654
title: Task 39
title: Task 48
challengeType: 22
dashedName: task-39
dashedName: task-48
---
<!-- (Audio) Brian: I see. Did you enjoy your time there, even if it wasn't entirely tech-focused?
@@ -10,13 +10,19 @@ Sophie: I did. -->
# --description--
In this task, you'll focus on answering questions in the simple past tense. When responding to a past simple interrogative (a question), you can answer affirmatively with `did` or negatively with `didn't`. For example, `Did you go to the party?` can be answered with `I did` (affirmative) or `I didn't` (negative). Listen to the dialogue and fill in the blanks correctly to practice this structure.
When answering to a past simple interrogative (a question), you can answer affirmatively with `did` or negatively with `didn't`.
For example, `Did you go to the party?` can be answered with `I did` (affirmative) or `I didn't` (negative).
Listen to the dialogue and fill in the blanks correctly to practice this structure.
# --fillInTheBlank--
## --sentence--
`Brian: I see. _ you enjoy your time there, even if it wasn't entirely tech-focused? Sophie: I _.`
`Brian: I see. _ you enjoy your time there, even if it wasn't entirely tech-focused?`
`Sophie: I _.`
## --blanks--
@@ -55,7 +61,7 @@ This response is an affirmative answer to the past simple interrogative question
"audio": {
"filename": "3.1-3.mp3",
"startTime": 1,
"startTimestamp": 32.00,
"startTimestamp": 31.80,
"finishTimestamp": 37.02
}
},
@@ -68,7 +74,7 @@ This response is an affirmative answer to the past simple interrogative question
{
"character": "Brian",
"startTime": 1,
"finishTime": 5.22,
"finishTime": 5.42,
"dialogue": {
"text": "I see. Did you enjoy your time there, even if it wasn't entirely tech focused?",
"align": "center"
@@ -77,17 +83,17 @@ This response is an affirmative answer to the past simple interrogative question
{
"character": "Brian",
"opacity": 0,
"startTime": 5.25
"startTime": 5.45
},
{
"character": "Sophie",
"opacity": 1,
"startTime": 5.25
"startTime": 5.45
},
{
"character": "Sophie",
"startTime": 5.72,
"finishTime": 6.02,
"startTime": 5.92,
"finishTime": 6.22,
"dialogue": {
"text": "I did.",
"align": "center"
@@ -96,7 +102,7 @@ This response is an affirmative answer to the past simple interrogative question
{
"character": "Sophie",
"opacity": 0,
"startTime": 6.52
"startTime": 6.72
}
]
}

View File

@@ -1,8 +1,8 @@
---
id: 657b1f598f63008c8bdb20b8
title: Task 40
title: Task 49
challengeType: 19
dashedName: task-40
dashedName: task-49
---
# --description--

View File

@@ -1,8 +1,8 @@
---
id: 657b1f981cd42e8dc3b282d9
title: Task 41
title: Task 50
challengeType: 19
dashedName: task-41
dashedName: task-50
---
# --description--
@@ -13,7 +13,7 @@ You'll learn another special case in this task. It's the past tense form of `hav
## --text--
What does `had` imply in a sentence like `They had a meeting yesterday?`
What does `had` imply in a sentence like `They had a meeting yesterday`?
## --answers--

View File

@@ -1,15 +1,15 @@
---
id: 657b1fe950c0df90346e5d12
title: Task 42
title: Task 51
challengeType: 22
dashedName: task-42
dashedName: task-51
---
<!-- (Audio) Sophie: I did. It was challenging, but I met some fantastic people. We had a bunch of fun coding marathons, although I wasn't always a very strong programmer. -->
# --description--
This task is a review of the words `met`, `had`, and `wasn't`. You have already learned these words. Listen to the dialogue and fill in the blanks with the correct words. This exercise is a good way to practice and reinforce your understanding of these words in context.
You have already learned these words. Listen to the dialogue and fill in the blanks with the correct words.
# --fillInTheBlank--

View File

@@ -1,15 +1,19 @@
---
id: 657b201372864e91d4f5bb53
title: Task 43
title: Task 52
challengeType: 22
dashedName: task-43
dashedName: task-52
---
<!-- (Audio) Brian: I studied at a small college as well and majored in information technology. -->
# --description--
When a verb ends in a consonant followed by `y`, you should change the `y` to `i` and add `ed` for the past tense. For example, `carry` becomes `carried`. Note that this rule applies when the `y` follows a consonant, not a vowel, so the simple past form of `convey` is `conveyed`. For regular verbs, you simply add `ed` to form the past tense.
The rule for conjugating verbs in the past tense that end with `y` depends on the letter before the `y`. Here's how it works:
If the verb ends with a **vowel followed by `y`** simply add `-ed` to the end of the verb. For example: `Stay` becomes `stayed`.
If the verb ends with a **consonant followed by `y`**, change the `y` to `i` and add `-ed`. For example: `study` becomes `studied`.
# --fillInTheBlank--

View File

@@ -1,19 +1,27 @@
---
id: 657b20338e0802931673c1e1
title: Task 44
title: Task 53
challengeType: 22
dashedName: task-44
dashedName: task-53
---
<!-- (Audio) Brian: It was more hands-on, and I loved every bit of it. -->
# --description--
You've learned that for verbs ending in `e`, you simply add `d` to form the simple past tense. Choose the correct form of `love` to complete the sentence:
Regular verbs that end with `e` have a simple rule for conjugating in the past tense. You just need to add a `d` to the end of the verb.
This rule helps to keep the pronunciation clear and avoids the addition of an extra syllable that could complicate the word's pronunciation.
For example:
`live` becomes `lived`.
# --fillInTheBlank--
## --sentence--
`Last summer, she really _ the beach vacation.`
`It was more hands-on, and I _ every bit of it.`
## --blanks--
@@ -22,3 +30,47 @@ You've learned that for verbs ending in `e`, you simply add `d` to form the simp
### --feedback--
To form the simple past, add `d` to the base form of the verb, `love`.
# --scene--
```json
{
"setup": {
"background": "company2-center.png",
"characters": [
{
"character": "Brian",
"position": {"x":50,"y":15,"z":1.2},
"opacity": 0
}
],
"audio": {
"filename": "3.1-3.mp3",
"startTime": 1,
"startTimestamp": 51.72,
"finishTimestamp": 54.64
}
},
"commands": [
{
"character": "Brian",
"opacity": 1,
"startTime": 0
},
{
"character": "Brian",
"startTime": 1,
"finishTime": 3.92,
"dialogue": {
"text": "It was more hands-on and I loved every bit of it.",
"align": "center"
}
},
{
"character": "Brian",
"opacity": 0,
"startTime": 4.42
}
]
}
```

View File

@@ -1,15 +1,15 @@
---
id: 657b20985d315095e5c3851d
title: Task 45
title: Task 55
challengeType: 19
dashedName: task-45
dashedName: task-55
---
<!-- (Audio) Brian: I got to build and maintain networks and manage a few small projects. -->
# --description--
In this context, `got` is a special case in the simple past tense. It's the past tense of `get`. Unlike regular verbs that typically add `-ed` for the past tense, `get` changes to `got`.
`Got` is the past tense of `get`. Unlike regular verbs that typically add `-ed` for the past tense, `get` changes to `got`.
# --question--

View File

@@ -1,8 +1,8 @@
---
id: 657b21e28a01039cb27b4f13
title: Task 46
title: Task 58
challengeType: 19
dashedName: task-46
dashedName: task-58
---
# --description--

View File

@@ -1,8 +1,8 @@
---
id: 657b221b2ab0ac9e18a173ef
title: Task 47
title: Task 59
challengeType: 22
dashedName: task-47
dashedName: task-59
---
# --description--

View File

@@ -1,15 +1,15 @@
---
id: 657b223e41ce6b9f9a01d214
title: Task 48
title: Task 60
challengeType: 22
dashedName: task-48
dashedName: task-60
---
<!-- (Audio) Brian: They weren't exactly big projects. -->
# --description--
You'll review the past simple negative in this task. It's formed using `was` or `were` with `not`, like `weren't` (`were not`) or `wasn't` (`was not`). It's used to talk about things that did not happen or were not true in the past.
Lisnte to the audio and complete the sentence.
# --fillInTheBlank--

View File

@@ -1,8 +1,8 @@
---
id: 657b2310b8cd52a4f15c1818
title: Task 49
title: Task 65
challengeType: 19
dashedName: task-49
dashedName: task-65
---
<!-- (Audio) Tom: Hey, Alice. How was it for you to get into tech?

View File

@@ -1,15 +1,15 @@
---
id: 657b2340be1593a6517fe77b
title: Task 50
title: Task 66
challengeType: 22
dashedName: task-50
dashedName: task-66
---
<!-- (Audio) Alice: I didn't study tech at a traditional university. -->
# --description--
This task reviews the past simple negative form. In the past simple negative, `did not` (contracted to `didn't`) is followed by the base form of a verb. This structure is used to express that an action did not happen in the past. In this dialogue, Alice is describing her educational background related to technology.
In this dialogue, Alice is describing her educational background related to technology. Listen to the dialogue and complete the sentence.
# --fillInTheBlank--

View File

@@ -1,8 +1,8 @@
---
id: 657b236aa1eb9fa7b209aa03
title: Task 51
title: Task 67
challengeType: 19
dashedName: task-51
dashedName: task-67
---
<!-- (Audio) Alice: I'm mostly self-taught, and I took a lot of online courses. -->

View File

@@ -1,38 +1,38 @@
---
id: 657b23a413d28da927e087ca
title: Task 52
title: Task 68
challengeType: 22
dashedName: task-52
dashedName: task-68
---
<!-- (Audio) Alice: I'm mostly self-taught, and I took a lot of online courses. -->
# --description--
This task reviews how an adverb is often formed by adding `-ly` to an adjective.
`Most` is an adjective you can use when to talk about the biggest part of something. For exmaple:
`We completed most of our work before lunch,` it means a group finished the biggest part of their work.
`Mostly` is an adverb. You use it to talk about what something is like most of the time. For exemple:
`The office is mostly quiet in the mornings,` means that usually, in the mornings, the office is quiet.
So, `most` talks about a big part of something, and `mostly` tells you what usually happens or what something is like most of the time.
# --fillInTheBlank--
## --sentence--
`She completed _ of her work before lunch. The office is _ quiet in the mornings.`
`I'm _ self-taught, and I took a lot of online courses.`
## --blanks--
`most`
### --feedback--
This word is used as an adjective to describe the quantity of work completed.
---
`mostly`
### --feedback--
This word is used as an adverb to describe the general state of the office.
This word is used as an adverb to describe the main way Alice learned how to code.
# --scene--

View File

@@ -1,15 +1,17 @@
---
id: 657b23bc0e32f9aa9c62eb82
title: Task 53
title: Task 69
challengeType: 19
dashedName: task-53
dashedName: task-69
---
<!-- (Audio) Alice: I'm mostly self-taught, and I took a lot of online courses. -->
# --description--
The term `self-taught` refers to acquiring knowledge or skills without direct teaching from a traditional teacher or educational institution. It involves learning independently. The word `taught` is the past participle of `teach`. When someone is `self-taught`, it means they have taught themselves.
The word `self-taught` means learning things by yourself, not from a school or teacher. It's when you learn something on your own.
The word `taught` is from `teach`, which means to give someone knowledge or to show how to do something. So, if you are `self-taught`, you have learned something by yourself.
# --question--

View File

@@ -1,19 +1,21 @@
---
id: 657b23f03b449aac2c517089
title: Task 54
title: Task 70
challengeType: 22
dashedName: task-54
dashedName: task-70
---
# --description--
The word `took` is a special case in the simple past tense. It's the past tense of `take`. Unlike regular verbs that follow the standard `-ed` ending for the past tense, `take` changes to `took`. This irregular form is important to know because it's commonly used to talk about actions that happened in the past. Choose the correct past tense form of `take` to complete the sentence:
The word `took` is what you use instead of `take` when you're talking about something that happened in the past, like yesterday or last year.
Most verbs get `-ed` added to them for the past tense, like `play` becomes `played`. But `take` is different; it changes to `took`.
# --fillInTheBlank--
## --sentence--
`Last summer, she _ a photography class.`
`I'm mostly self-taught, and I _ a lot of online courses.`
## --blanks--
@@ -22,3 +24,47 @@ The word `took` is a special case in the simple past tense. It's the past tense
### --feedback--
This word is the past tense form of `take`. It's used to talk about actions that happened in the past.
# --scene--
```json
{
"setup": {
"background": "company2-breakroom.png",
"characters": [
{
"character": "Alice",
"position": {"x":50,"y":0,"z":1.4},
"opacity": 0
}
],
"audio": {
"filename": "3.1-4.mp3",
"startTime": 1,
"startTimestamp": 8.00,
"finishTimestamp": 10.82
}
},
"commands": [
{
"character": "Alice",
"opacity": 1,
"startTime": 0
},
{
"character": "Alice",
"startTime": 1,
"finishTime": 3.82,
"dialogue": {
"text": "I'm mostly self-taught and I took a lot of online courses.",
"align": "center"
}
},
{
"character": "Alice",
"opacity": 0,
"startTime": 4.32
}
]
}
```

Some files were not shown because too many files have changed in this diff Show More