Skip to content

Commit 4326e5f

Browse files
committed
hyperskill links. Utm tags added
1 parent 8e03d82 commit 4326e5f

File tree

61 files changed

+61
-61
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+61
-61
lines changed

Classes and objects/Call a method from another method/task.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ As we discussed before, methods may call other methods by using method attribute
44
Use this knowledge to complete the `exponentiate` method of the `Calculator` class. It should
55
call the `multiply` method to calculate the result.
66

7-
For more structured and detailed information, you can refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/6931).
7+
For more structured and detailed information, you can refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/6931?utm_source=jba&utm_medium=jba_courses_links).

Classes and objects/Class and Instance Variables 2/task.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ Implement the method `add_city` that will append a city name to the `all_cities`
99

1010
In the `__init__` method, call the `add_city` method to add the city name to the list upon object initialization.
1111

12-
For more structured and detailed information, you can refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/6981).
12+
For more structured and detailed information, you can refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/6981?utm_source=jba&utm_medium=jba_courses_links).

Classes and objects/Class and Instance Variables/task.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ one object, it will be changed for all objects of the class (check out the examp
3636
editor – see what `print(barsik.favorite_food)` will print). If you intend using a list to keep track
3737
of features unique to each instance, you need to make it an instance attribute.
3838

39-
For more structured and detailed information, you can refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/6677).
39+
For more structured and detailed information, you can refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/6677?utm_source=jba&utm_medium=jba_courses_links).
4040

4141
### Task
4242
In the code editor, complete the implementation of the `Animals` class so that the `print` statement

Classes and objects/Definition/task.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ variable `x`.
4343
You can find out more about class definition syntax by reading <a href="https://docs.python.org/3/tutorial/classes.html#class-definition-syntax">this section</a>
4444
of Python Documentation.
4545

46-
For more structured and detailed information, you can also refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/6661).
46+
For more structured and detailed information, you can also refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/6661?utm_source=jba&utm_medium=jba_courses_links).
4747

4848
### Task
4949
Assign a value to `variable` inside `MyClass` and create an object `my_class` of the class `MyClass()`.

Classes and objects/Special __init__ method/task.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ x.num
3636
(3-4.5j)
3737
```
3838

39-
For more structured and detailed information, you can refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/6669#def-__init).
39+
For more structured and detailed information, you can refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/6669#def-__init?utm_source=jba&utm_medium=jba_courses_links).
4040

4141
### Task
4242
In the code editor, add parameters to the`__init__()` method of the `Car` class, so we can

Classes and objects/The self parameter/task.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class Bag:
2222
self.add(x)
2323
```
2424

25-
For more structured and detailed information, you can refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/6669#self).
25+
For more structured and detailed information, you can refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/6669#self?utm_source=jba&utm_medium=jba_courses_links).
2626

2727
### Task
2828
In the code editor, implement the `add` method of the `Calculator` class. It should

Classes and objects/Update variable/task.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ In this exercise, create a new `Car` object `car2` and then set `color`
44
of `car2` to `"red"`. Print the descriptions of `car1` and `car2` by calling the
55
`description` method.
66

7-
For more structured and detailed information, you can refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/6677#changing-attributes).
7+
For more structured and detailed information, you can refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/6677#changing-attributes?utm_source=jba&utm_medium=jba_courses_links).
88

99
<div class='hint'>Remember how we instantiated objects in the previous task by
1010
"calling" the class.</div>

Classes and objects/Variable access/task.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ then `MyClass.year` and `MyClass.say_hello` are valid attribute references retur
1717
integer and a function object, respectively. Class attributes can be
1818
assigned to, so you can change the value of `MyClass.year` by assignment.
1919

20-
For more structured and detailed information, you can refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/6661#class-attribute).
20+
For more structured and detailed information, you can refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/6661#class-attribute?utm_source=jba&utm_medium=jba_courses_links).
2121

2222
### Task
2323
Check out our example and print the value of `variable1` from `my_object`.

Classes and objects/__str__ vs __repr__/task.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Also, if we think it would be useful to have a string representation for users,
2727
a `__str__` function. Check out another implementation of the class `Complex` in the code editor. Run the code
2828
to see what each of the two `print` statements prints.
2929

30-
For more structured and detailed information, you can refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/7139#str__-vs-__repr).
30+
For more structured and detailed information, you can refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/7139#str__-vs-__repr?utm_source=jba&utm_medium=jba_courses_links).
3131

3232
### Task
3333
Implement `__str__` and `__repr__` methods for the class `Cat`. `__str__` method should return a string like this:

Condition expressions/Boolean operators order/task.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Boolean operators are not evaluated from left to right. There's an order of operations for
44
boolean operators: `not` is evaluated first, `and` is evaluated next, and `or` is evaluated last.
55

6-
For more structured and detailed information, you can refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/6025).
6+
For more structured and detailed information, you can refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/6025?utm_source=jba&utm_medium=jba_courses_links).
77

88
### Task
99
Write an expression that evaluates to `True` if `name` is either `"John"` or `"Jane"` who are `16` or older, but younger than `25`.

Condition expressions/Boolean operators/task.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ operator `and` returns `True` when the expressions on both sides of `and` are `T
55
The boolean operator `or` returns `True` when at least one expression on either side
66
of `or` is `True`. The boolean operator `not` inverts the boolean expression it precedes.
77

8-
For more structured and detailed information, you can refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/6025).
8+
For more structured and detailed information, you can refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/6025?utm_source=jba&utm_medium=jba_courses_links).
99

1010
### Task
1111
Write an expression that evaluates to `True` if `name` is equal to `"John"` and

Condition expressions/Else and elif parts in if statement/task.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ a += 1 if a > b else a -= 1
4141
```
4242
</details>
4343

44-
For more structured and detailed information, you can refer to [this](https://hyperskill.org/learn/step/5932) and [this](https://hyperskill.org/learn/step/5926) Hyperskill knowledge base pages.
44+
For more structured and detailed information, you can refer to [this](https://hyperskill.org/learn/step/5932?utm_source=jba&utm_medium=jba_courses_links) and [this](https://hyperskill.org/learn/step/5926?utm_source=jba&utm_medium=jba_courses_links) Hyperskill knowledge base pages.
4545

4646
### Task
4747
Print `True` if `name` is equal to `"John"` and `False` otherwise.

Condition expressions/If statement/task.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ If you have only one statement to execute, you can put it on the same line as th
2626
if a > b: print("a is greater than b")
2727
```
2828

29-
For more structured and detailed information, you can refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/5953).
29+
For more structured and detailed information, you can refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/5953?utm_source=jba&utm_medium=jba_courses_links).
3030

3131
### Task
3232
Print `"Not an empty list!"` if the `tasks` list is not empty.

Condition expressions/Single-line if-else statement/task.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
As you saw in the previous tasks, a simple `if-else` statement can in fact be written as a single line. Rewrite the statement in the code editor so that it
44
fits in one line but the results of its execution remain exactly the same.
55

6-
For more structured and detailed information, you can refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/5932#simple-if-else).
6+
For more structured and detailed information, you can refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/5932#simple-if-else?utm_source=jba&utm_medium=jba_courses_links).

Data structures/Dictionaries/task.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ You can access a value in a dictionary similarly to how you would access a value
2525
but using a key instead of an index. More info about this data structure can be found
2626
<a href="https://docs.python.org/3/tutorial/datastructures.html#dictionaries">here</a>.
2727

28-
For more structured and detailed information, you can also refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/6481).
28+
For more structured and detailed information, you can also refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/6481?utm_source=jba&utm_medium=jba_courses_links).
2929

3030
### Task
3131
Add Jared's (`"Jared"`) number `570` to the phone book.

Data structures/Dictionary keys() and values()/task.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ followed by a dot.
1414

1515
Read more about the operations that dictionaries support <a href="https://docs.python.org/3/library/stdtypes.html#typesmapping">here</a>.
1616

17-
For more structured and detailed information, you can also refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/11096).
17+
For more structured and detailed information, you can also refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/11096?utm_source=jba&utm_medium=jba_courses_links).
1818

1919
### Task
2020
Print all values from the `phone_book` .

Data structures/In keyword/task.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ item. You can apply `in` to lists or dictionaries the same way you did it with s
88

99
Please complete the task in the specified order.
1010

11-
For more structured and detailed information, you can refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/11096).
11+
For more structured and detailed information, you can refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/11096?utm_source=jba&utm_medium=jba_courses_links).
1212

1313
<div class="hint">Use the <code>in</code> keyword.</div>
1414

Data structures/Join method/task.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ aa = bb = cc
3333
Python is a programming language
3434
```
3535

36-
For more structured and detailed information, you can refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/6972#join-a-list).
36+
For more structured and detailed information, you can refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/6972#join-a-list?utm_source=jba&utm_medium=jba_courses_links).
3737

3838
### Task
3939
Assign a value to the `joined` variable such that the `print` statement prints the following:

Data structures/Lists introduction/task.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ squares + [36, 49, 64, 81, 100]
1717

1818
You can explore lists in more detail by reading <a href="https://docs.python.org/3.9/tutorial/introduction.html#lists">this page</a>.
1919

20-
For more structured and detailed information, you can also refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/5979).
20+
For more structured and detailed information, you can also refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/5979?utm_source=jba&utm_medium=jba_courses_links).
2121

2222
### Task
2323
Use list slicing to print `[4, 9, 16]`.

Data structures/Lists operations/task.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ squares
3232

3333
Find out about many other useful list methods on <a href="https://docs.python.org/3/tutorial/datastructures.html#more-on-lists">this page</a>.
3434

35-
For more structured and detailed information, you can also refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/6031).
35+
For more structured and detailed information, you can also refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/6031?utm_source=jba&utm_medium=jba_courses_links).
3636

3737
### Task
3838
Replace `"dino"` with `"dinosaur"` in the `animals` list.

Data structures/Nested Lists/task.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Output:
3131
```text
3232
1
3333
```
34-
For more structured and detailed information, you can refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/6938).
34+
For more structured and detailed information, you can refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/6938?utm_source=jba&utm_medium=jba_courses_links).
3535

3636
### Task
3737
In the code editor, use indexing to access and print elements `9` and `10` from of the nested list `my_list`.

Data structures/Tuples/task.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ values `12345`, `54321`, and `hello!` are packed together in a tuple.
4141
Some other list methods are also
4242
applicable to tuples. You can read more about tuples <a href="https://docs.python.org/3/tutorial/datastructures.html#tuples-and-sequences">here</a>.
4343

44-
For more structured and detailed information, you can also refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/7462).
44+
For more structured and detailed information, you can also refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/7462?utm_source=jba&utm_medium=jba_courses_links).
4545

4646
### Task
4747
Print the length of the tuple `alphabet`. Then create a tuple with a single element `'fun_tuple'`.

File input output/Open file/task.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ True
2828
**Important**: If you’re not using the `with` keyword, then you should call `f.close()` to close the file and
2929
free up any system resources used by it. You cannot use the file object after it is closed, whether by a `with` statement or by calling `f.close()`.
3030

31-
For more structured and detailed information, you can refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/8691).
31+
For more structured and detailed information, you can refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/8691?utm_source=jba&utm_medium=jba_courses_links).
3232

3333
### Task
3434
- In the code editor, open the file `input1.txt` in read mode, properly using the `with` statement. The `input1.txt` file stores the name of the file where the string `Hello World` should be output. Reading this name is already implemented in the `outfile_name` variable.

File input output/Read all lines/task.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
### Task
44
Read all lines from the file input.txt into the list called `lines_list`. There are at least two different ways to do it.
55

6-
For more structured and detailed information, you can refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/8139#readlines).
6+
For more structured and detailed information, you can refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/8139#readlines?utm_source=jba&utm_medium=jba_courses_links).
77

88
<div class="hint">Two possible solutions are discussed in the previous task.</div>

File input output/Read file/task.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ If you want to read all the lines of a file in a list, you can also use `list(f)
5252

5353
For more details, check out the section [Methods of File Objects](https://docs.python.org/3/tutorial/inputoutput.html#methods-of-file-objects) in Python Tutorial.
5454

55-
For more structured and detailed information, you can also refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/8139).
55+
For more structured and detailed information, you can also refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/8139?utm_source=jba&utm_medium=jba_courses_links).
5656

5757
### Task
5858
Print the contents of "input.txt" to output by iterating over the lines of the file and printing each one.

File input output/Write to file/task.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ f.write('\n' + 'string,' + ' ' + 'another string')
3636
```
3737
This will add a new line and write `'string, another string'`.
3838

39-
For more structured and detailed information, you can refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/8334).
39+
For more structured and detailed information, you can refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/8334?utm_source=jba&utm_medium=jba_courses_links).
4040

4141
### Task
4242
In the code editor, **append** one new line to `output.txt` with all elements from the `zoo` list separated by `' and '`.

Functions/Args and kwargs/task.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ after the `*args` parameter are [‘keyword-only’](https://peps.python.org/pep
2424
rather than positional arguments. Another way to call this function is shown in call 2, and it will give
2525
us the same output.
2626

27-
For more structured and detailed information, you can refer to [this ](https://hyperskill.org/learn/step/8560) and [this](https://hyperskill.org/learn/step/9544) Hyperskill knowledge base pages.
27+
For more structured and detailed information, you can refer to [this ](https://hyperskill.org/learn/step/8560?utm_source=jba&utm_medium=jba_courses_links) and [this](https://hyperskill.org/learn/step/9544?utm_source=jba&utm_medium=jba_courses_links) Hyperskill knowledge base pages.
2828

2929
### Task
3030

Functions/Default parameters/task.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Do not put spaces around the `=` symbol in function calls and definitions.
1919
Explore this topic further by reading <a href="https://docs.python.org/3/tutorial/controlflow.html#default-argument-values">this section</a>
2020
of Python Documentation.
2121

22-
For more structured and detailed information, you can also refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/10295).
22+
For more structured and detailed information, you can also refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/10295?utm_source=jba&utm_medium=jba_courses_links).
2323

2424
### Task
2525
Add parameters to the `hello()` function and set a default value for the `name` parameter.

Functions/Definition/task.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ my_function() # function call
2121

2222
Read more about defining functions in <a href="https://docs.python.org/3/tutorial/controlflow.html#defining-functions">this section</a> of Python Documentation.
2323

24-
For more structured and detailed information, you can also refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/5900).
24+
For more structured and detailed information, you can also refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/5900?utm_source=jba&utm_medium=jba_courses_links).
2525

2626
### Task
2727
- Call the function `my_function` inside the loop to repeat its invocation 5 times

Functions/Docstrings/task.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ A docstring for a function or method should summarize its behavior and document
66

77
Docstrings should also generally be written for module, class and method definitions (you will learn about these things later on in the course). Read more about docstring conventions in the [Python PEP Guide](https://peps.python.org/pep-0257/).
88

9-
For more structured and detailed information, you can also refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/11869).
9+
For more structured and detailed information, you can also refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/11869?utm_source=jba&utm_medium=jba_courses_links).
1010

1111
### Task
1212
Add the following docstring to the function defined in the code editor:

Functions/Parameters and call arguments/task.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ TypeError Traceback (most recent call last)
3535
3636
TypeError: my_function() missing 1 required positional argument: 'surname'
3737
```
38-
For more structured and detailed information, you can refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/7248).
38+
For more structured and detailed information, you can refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/7248?utm_source=jba&utm_medium=jba_courses_links).
3939

4040
### Task
4141
In the code editor, define a function that prints the square of a passed parameter.

0 commit comments

Comments
 (0)