From f958042cc04c1312d3f29130d39d7456fbe0cc69 Mon Sep 17 00:00:00 2001 From: Ilenia <26656284+ilenia-magoni@users.noreply.github.com> Date: Sun, 4 Feb 2024 16:43:08 +0100 Subject: [PATCH] chore(curriculum): add quotes around strings in Expense Tracker (#53520) Co-authored-by: Dario-DC --- .../65822308ded1ba4632f66aa3.md | 4 ++-- .../658225d560369446ece5518b.md | 2 +- .../65822bd82d708c4895080c35.md | 6 +++--- .../65823bbbdb4eaa4f9d20a0fb.md | 2 +- .../65823ff0d4b991510fade1a8.md | 2 +- .../65824561f3478e5371a33ae5.md | 2 +- .../658246c28575d653d1f89b59.md | 2 +- .../65824872894f59546e3084e2.md | 2 +- .../65824a1b16631c54fa524154.md | 2 +- .../65824c7b4e2da85597693dcf.md | 2 +- .../65824dfdb6815d563b2d3256.md | 2 +- .../6582507654b3ed5712341382.md | 4 ++-- .../658252f6b1526d57b103d48a.md | 2 +- .../658258c0e5fbe85c14c060cf.md | 2 +- .../65825b758fe85a5cebabc8c5.md | 2 +- .../6582687859366a618424d84b.md | 6 +++--- 16 files changed, 22 insertions(+), 22 deletions(-) diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-lambda-functions-by-building-an-expense-tracker/65822308ded1ba4632f66aa3.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-lambda-functions-by-building-an-expense-tracker/65822308ded1ba4632f66aa3.md index d7aab5b3d3a..73a865105ec 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-lambda-functions-by-building-an-expense-tracker/65822308ded1ba4632f66aa3.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-lambda-functions-by-building-an-expense-tracker/65822308ded1ba4632f66aa3.md @@ -10,10 +10,10 @@ dashedName: step-4 A dictionary is another built-in data type in Python. A dictionary is a collection of data in the form of *key*-*value* pairs. Dictionaries are defined with curly braces `{}` and they contain key-value pairs separated by commas. Each key is followed by a colon `:` and the value: ```py -{"amount": 50.0, "category": "Food"} +{'amount': 50.0, 'category': 'Food'} ``` -In the example above, `amount` and `category` are keys, and `50.0` and `Food` are their the corresponding values. +In the example above, `amount` and `category` are keys, and `50.0` and `'Food'` are their the corresponding values. Create a dictionary with a key `amount` and value of the `amount` parameter and pass your new dictionary to the `.append()` call. diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-lambda-functions-by-building-an-expense-tracker/658225d560369446ece5518b.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-lambda-functions-by-building-an-expense-tracker/658225d560369446ece5518b.md index 07f21ecefcc..510a44b67ab 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-lambda-functions-by-building-an-expense-tracker/658225d560369446ece5518b.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-lambda-functions-by-building-an-expense-tracker/658225d560369446ece5518b.md @@ -7,7 +7,7 @@ dashedName: step-5 # --description-- -Add another key-value pair to the dictionary you are appending to the `expense` list. Use the string `category` as the key, and the `category` parameter as the value. +Add another key-value pair to the dictionary you are appending to the `expense` list. Use the string `'category'` as the key, and the `category` parameter as the value. # --hints-- diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-lambda-functions-by-building-an-expense-tracker/65822bd82d708c4895080c35.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-lambda-functions-by-building-an-expense-tracker/65822bd82d708c4895080c35.md index 18e1e8659b1..7389641e58b 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-lambda-functions-by-building-an-expense-tracker/65822bd82d708c4895080c35.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-lambda-functions-by-building-an-expense-tracker/65822bd82d708c4895080c35.md @@ -10,11 +10,11 @@ dashedName: step-9 You can access values in a dictionary through its keys. You need to use the bracket notation and include the key between the square brackets: ```py -my_dict = {"amount": 50.0, "category": "Food"} -my_dict["amount"] # 50.0 +my_dict = {'amount': 50.0, 'category': 'Food'} +my_dict['amount'] # 50.0 ``` -You are currently interpolating the `expense` dictionary in your f-string. Modify the f-string expression to access the value of the `amount` key and the `category` key in the `expense` dictionary. +You are currently interpolating the `expense` dictionary in your f-string. Modify the f-string expression to access the value of the `'amount'` key and the `'category'` key in the `expense` dictionary. # --hints-- diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-lambda-functions-by-building-an-expense-tracker/65823bbbdb4eaa4f9d20a0fb.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-lambda-functions-by-building-an-expense-tracker/65823bbbdb4eaa4f9d20a0fb.md index 55df7c207a5..d4a2f8399d4 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-lambda-functions-by-building-an-expense-tracker/65823bbbdb4eaa4f9d20a0fb.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-lambda-functions-by-building-an-expense-tracker/65823bbbdb4eaa4f9d20a0fb.md @@ -7,7 +7,7 @@ dashedName: step-16 # --description-- -Within your `total_expenses` function, replace `pass` with a `lambda` function. Use `expense` as the parameter and return the value of the `amount` key in the `expense` dictionary. +Within your `total_expenses` function, replace `pass` with a `lambda` function. Use `expense` as the parameter and return the value of the `'amount'` key in the `expense` dictionary. # --hints-- diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-lambda-functions-by-building-an-expense-tracker/65823ff0d4b991510fade1a8.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-lambda-functions-by-building-an-expense-tracker/65823ff0d4b991510fade1a8.md index edc3ca9935f..a9c3eadb188 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-lambda-functions-by-building-an-expense-tracker/65823ff0d4b991510fade1a8.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-lambda-functions-by-building-an-expense-tracker/65823ff0d4b991510fade1a8.md @@ -7,7 +7,7 @@ dashedName: step-20 # --description-- -Within the `filter_expenses_by_category` function, replace `pass` with a `lambda` function. Use `expense` as the parameter and return the comparison between the value of the `category` key of the `expense` dictionary and `category`. +Within the `filter_expenses_by_category` function, replace `pass` with a `lambda` function. Use `expense` as the parameter and return the comparison between the value of the `'category'` key of the `expense` dictionary and `category`. # --hints-- diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-lambda-functions-by-building-an-expense-tracker/65824561f3478e5371a33ae5.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-lambda-functions-by-building-an-expense-tracker/65824561f3478e5371a33ae5.md index cad1f46acdd..56667701c65 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-lambda-functions-by-building-an-expense-tracker/65824561f3478e5371a33ae5.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-lambda-functions-by-building-an-expense-tracker/65824561f3478e5371a33ae5.md @@ -23,7 +23,7 @@ You should define a function named `main()` without parameters. }) ``` -You should move the `expense` list inside the `main()` function body. +You should move the `expenses` list inside the `main()` function body. ```js ({ test: () => assert(__pyodide.runPython(` diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-lambda-functions-by-building-an-expense-tracker/658246c28575d653d1f89b59.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-lambda-functions-by-building-an-expense-tracker/658246c28575d653d1f89b59.md index ea141e73104..3cd8e3642fd 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-lambda-functions-by-building-an-expense-tracker/658246c28575d653d1f89b59.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-lambda-functions-by-building-an-expense-tracker/658246c28575d653d1f89b59.md @@ -14,7 +14,7 @@ while condition: ``` -Below the `expense` list, create a `while` loop. Use `True` for the condition, and print the string `\nExpense Tracker` inside the loop body to show the title of the program. +Below the `expenses` list, create a `while` loop. Use `True` for the condition, and print the string `'\nExpense Tracker'` inside the loop body to show the title of the program. # --hints-- diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-lambda-functions-by-building-an-expense-tracker/65824872894f59546e3084e2.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-lambda-functions-by-building-an-expense-tracker/65824872894f59546e3084e2.md index f1da4c8ac5e..7bd3ed13946 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-lambda-functions-by-building-an-expense-tracker/65824872894f59546e3084e2.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-lambda-functions-by-building-an-expense-tracker/65824872894f59546e3084e2.md @@ -9,7 +9,7 @@ dashedName: step-25 The `while` loop you created in the previous step is an infinite loop that will allow the program to continuously present menu options until the user decides to exit. -After the `print()` call, add another one to print the string `1. Add an expense`. +After the `print()` call, add another one to print the string `'1. Add an expense'`. # --hints-- diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-lambda-functions-by-building-an-expense-tracker/65824a1b16631c54fa524154.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-lambda-functions-by-building-an-expense-tracker/65824a1b16631c54fa524154.md index b9c1394da24..93ee461978a 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-lambda-functions-by-building-an-expense-tracker/65824a1b16631c54fa524154.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-lambda-functions-by-building-an-expense-tracker/65824a1b16631c54fa524154.md @@ -7,7 +7,7 @@ dashedName: step-26 # --description-- -Next, add another `print()` call and pass the string `2. List all expenses`. +Next, add another `print()` call and pass the string `'2. List all expenses'`. # --hints-- diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-lambda-functions-by-building-an-expense-tracker/65824c7b4e2da85597693dcf.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-lambda-functions-by-building-an-expense-tracker/65824c7b4e2da85597693dcf.md index 1e88e2b1aaa..c374d62d60d 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-lambda-functions-by-building-an-expense-tracker/65824c7b4e2da85597693dcf.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-lambda-functions-by-building-an-expense-tracker/65824c7b4e2da85597693dcf.md @@ -7,7 +7,7 @@ dashedName: step-27 # --description-- -Provide the other menu options by printing the following three strings in your `while` loop: `3. Show total expenses`, `4. Filter expenses by category`, and `5. Exit`. +Provide the other menu options by printing the following three strings in your `while` loop: `'3. Show total expenses'`, `'4. Filter expenses by category'`, and `'5. Exit'`. # --hints-- diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-lambda-functions-by-building-an-expense-tracker/65824dfdb6815d563b2d3256.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-lambda-functions-by-building-an-expense-tracker/65824dfdb6815d563b2d3256.md index 702bd977ad4..b7a6a5a4592 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-lambda-functions-by-building-an-expense-tracker/65824dfdb6815d563b2d3256.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-lambda-functions-by-building-an-expense-tracker/65824dfdb6815d563b2d3256.md @@ -9,7 +9,7 @@ dashedName: step-28 The `input()` function takes a user input and it returns the user input in the form of a string. -Inside your `while` loop, call the `input()` function passing the string `Enter your choice: ` as the argument, and assign the result to a variable named `choice`. +Inside your `while` loop, call the `input()` function passing the string `'Enter your choice: '` as the argument, and assign the result to a variable named `choice`. # --hints-- diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-lambda-functions-by-building-an-expense-tracker/6582507654b3ed5712341382.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-lambda-functions-by-building-an-expense-tracker/6582507654b3ed5712341382.md index 2d564d604aa..34dbde9fb81 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-lambda-functions-by-building-an-expense-tracker/6582507654b3ed5712341382.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-lambda-functions-by-building-an-expense-tracker/6582507654b3ed5712341382.md @@ -7,9 +7,9 @@ dashedName: step-29 # --description-- -You are going to use conditional statements to check the user's choice. If the choice is `1`, it means the user wants to add an expense. +You are going to use conditional statements to check the user's choice. If the choice is `'1'`, it means the user wants to add an expense. -Still in the `while` loop, under the `choice` variable, write an `if` statement to check if `choice` equals the string `1`. If it's true, it will be the starting point for adding a new expense. +Still in the `while` loop, under the `choice` variable, write an `if` statement to check if `choice` equals the string `'1'`. If it's true, it will be the starting point for adding a new expense. Inside the `if` statement body, declare a variable `amount` and assign it an empty `input()` call. diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-lambda-functions-by-building-an-expense-tracker/658252f6b1526d57b103d48a.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-lambda-functions-by-building-an-expense-tracker/658252f6b1526d57b103d48a.md index c474338339c..83de6165853 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-lambda-functions-by-building-an-expense-tracker/658252f6b1526d57b103d48a.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-lambda-functions-by-building-an-expense-tracker/658252f6b1526d57b103d48a.md @@ -9,7 +9,7 @@ dashedName: step-30 Inside the `if` statement, you should ask the user to enter the amount for the expense and store it in a variable. -Pass the string `Enter amount: ` to your empty `input()` call, so you can store the expense. +Pass the string `'Enter amount: '` to your empty `input()` call, so you can store the expense. # --hints-- diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-lambda-functions-by-building-an-expense-tracker/658258c0e5fbe85c14c060cf.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-lambda-functions-by-building-an-expense-tracker/658258c0e5fbe85c14c060cf.md index a31249a61ce..ef5f5a90136 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-lambda-functions-by-building-an-expense-tracker/658258c0e5fbe85c14c060cf.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-lambda-functions-by-building-an-expense-tracker/658258c0e5fbe85c14c060cf.md @@ -9,7 +9,7 @@ dashedName: step-34 To list all expenses, you can use an `elif` statement after an `if` statement. The `elif` checks additional conditions and only works following an `if` statement. -Create an `elif` statement to check if the user's choice equals the string `2`. Inside the `elif` statement, print the string `\nAll Expenses:`. +Create an `elif` statement to check if the user's choice equals the string `2`. Inside the `elif` statement, print the string `'\nAll Expenses:'`. # --hints-- diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-lambda-functions-by-building-an-expense-tracker/65825b758fe85a5cebabc8c5.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-lambda-functions-by-building-an-expense-tracker/65825b758fe85a5cebabc8c5.md index 78b93da8505..f4bedf6c887 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-lambda-functions-by-building-an-expense-tracker/65825b758fe85a5cebabc8c5.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-lambda-functions-by-building-an-expense-tracker/65825b758fe85a5cebabc8c5.md @@ -9,7 +9,7 @@ dashedName: step-36 To show the total expenses, create an `elif` statement that checks if `choice == '3'`. -If it's true, it means the user wants to see the total expenses. So call `print()` and pass the string `\nTotal Expenses: ` as the first argument and `total_expenses(expenses)` as the second argument. +If it's true, it means the user wants to see the total expenses. So call `print()` and pass the string `'\nTotal Expenses: '` as the first argument and `total_expenses(expenses)` as the second argument. # --hints-- diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-lambda-functions-by-building-an-expense-tracker/6582687859366a618424d84b.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-lambda-functions-by-building-an-expense-tracker/6582687859366a618424d84b.md index 081b2682e6b..1178193ba5f 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-lambda-functions-by-building-an-expense-tracker/6582687859366a618424d84b.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-lambda-functions-by-building-an-expense-tracker/6582687859366a618424d84b.md @@ -7,9 +7,9 @@ dashedName: step-41 # --description-- -To provide a way to exit the program, use another `elif` statement to check if `choice` equals the string `5`. +To provide a way to exit the program, use another `elif` statement to check if `choice` equals the string `'5'`. -Inside the new `elif` statement, print the string `Exiting the program.` to show that the program is terminating its execution. +Inside the new `elif` statement, print the string `'Exiting the program.'` to show that the program is terminating its execution. # --hints-- @@ -26,7 +26,7 @@ You should have `elif choice == '5':` in your code. }) ``` -You should print `Exiting the program.` in your new `elif` statement. +You should print `'Exiting the program.'` in your new `elif` statement. ```js ({ test: () =>