Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit e5a751f

Browse files
committedJan 15, 2024
Language changes
1 parent 1f79917 commit e5a751f

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed
 

‎Variables/Undefined variable/task.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ character, and they cannot start with a digit. They also cannot be any of the
55
reserved <a href="https://docs.python.org/3/reference/lexical_analysis.html#keywords">keywords</a>.
66

77
### Task
8-
Check what happens if you use a variable which is not defined yet. Change and run the code in the editor – try to print out an **undefined** name (i.e. type the name of an undefined variable inside the brackets of the `print` statement).
8+
Check what happens if you use a variable that is not yet defined. Modify and run the code in the editor – try to print out an **undefined** name (i.e. type the name of an undefined variable inside the brackets of the `print` statement).
99
This should cause an exception - a `NameError`.
1010

11-
Note, that "check" command only runs the testing system, and you will not see the output, so you need to run the file.
11+
Note, that the "check" command only runs the testing system, and you won't see the output, so you need to run the file.
1212

13-
<div class="hint">for example, try to print <code>var1</code> variable instead of <code>variable</code></div>
13+
<div class="hint">For example, try to print the <code>var1</code> variable instead of <code>variable</code></div>

‎Variables/Variable definition/task-info.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ files:
66
- offset: 227
77
length: 1
88
placeholder_text: ???
9-
- offset: 320
9+
- offset: 324
1010
length: 10
1111
placeholder_text: '# Assign a new value'
12-
- offset: 445
12+
- offset: 444
1313
length: 5
1414
placeholder_text: '# Assign 2 to both a and b here'
1515
- name: tests/test_task.py

‎Variables/Variable definition/task.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ chained, e.g., `a = b = 2`.
88
For more structured and detailed information, you can refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/5859).
99

1010
### Task
11-
1. Assign `World` string to `name` variable
12-
2. On line 10 change the value in the `name` variable with your actual name.
13-
3. Use the chain assignment to store 2 in both `a` and `b` on line 15.
11+
1. Assign the `World` string to the `name` variable.
12+
2. On line 10, replace the value in the `name` variable with your actual name.
13+
3. Use chain assignment to store the value 2 in both `a` and `b` on line 15.
1414

1515
<div class="hint">Type a new "name" variable value in the answer placeholder.</div>

‎Variables/Variable definition/variable_definition.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
# Assign "World" to the name variable using the assignment operator
77
name = "World"
88
print("Hello, " + str(name))
9-
# Reassign name variable with your actual name
9+
# Reassign the name variable with your actual name
1010
name = "Username"
1111
print("Hello, " + str(name))
1212

1313

14-
# Use here the chain assignment to assigns the value 2 to variables "a" and "b".
14+
# Use chain assignment here to assign the value 2 to variables "a" and "b".
1515
a = b = 2
1616
print("a = " + str(a))
1717
print("b = " + str(b))

0 commit comments

Comments
 (0)
Please sign in to comment.