Skip to content

Hyperskill links. UTM tags added #232

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -4,4 +4,4 @@ As we discussed before, methods may call other methods by using method attribute
Use this knowledge to complete the `exponentiate` method of the `Calculator` class. It should
call the `multiply` method to calculate the result.

For more structured and detailed information, you can refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/6931).
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).
2 changes: 1 addition & 1 deletion Classes and objects/Class and Instance Variables 2/task.md
Original file line number Diff line number Diff line change
@@ -9,4 +9,4 @@ Implement the method `add_city` that will append a city name to the `all_cities`

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

For more structured and detailed information, you can refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/6981).
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).
2 changes: 1 addition & 1 deletion Classes and objects/Class and Instance Variables/task.md
Original file line number Diff line number Diff line change
@@ -36,7 +36,7 @@ one object, it will be changed for all objects of the class (check out the examp
editor – see what `print(barsik.favorite_food)` will print). If you intend using a list to keep track
of features unique to each instance, you need to make it an instance attribute.

For more structured and detailed information, you can refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/6677).
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).

### Task
In the code editor, complete the implementation of the `Animals` class so that the `print` statement
2 changes: 1 addition & 1 deletion Classes and objects/Definition/task.md
Original file line number Diff line number Diff line change
@@ -43,7 +43,7 @@ variable `x`.
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>
of Python Documentation.

For more structured and detailed information, you can also refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/6661).
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).

### Task
Assign a value to `variable` inside `MyClass` and create an object `my_class` of the class `MyClass()`.
2 changes: 1 addition & 1 deletion Classes and objects/Special __init__ method/task.md
Original file line number Diff line number Diff line change
@@ -36,7 +36,7 @@ x.num
(3-4.5j)
```

For more structured and detailed information, you can refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/6669#def-__init).
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).

### Task
In the code editor, add parameters to the`__init__()` method of the `Car` class, so we can
2 changes: 1 addition & 1 deletion Classes and objects/The self parameter/task.md
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ class Bag:
self.add(x)
```

For more structured and detailed information, you can refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/6669#self).
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).

### Task
In the code editor, implement the `add` method of the `Calculator` class. It should
2 changes: 1 addition & 1 deletion Classes and objects/Update variable/task.md
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ In this exercise, create a new `Car` object `car2` and then set `color`
of `car2` to `"red"`. Print the descriptions of `car1` and `car2` by calling the
`description` method.

For more structured and detailed information, you can refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/6677#changing-attributes).
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).

<div class='hint'>Remember how we instantiated objects in the previous task by
"calling" the class.</div>
2 changes: 1 addition & 1 deletion Classes and objects/Variable access/task.md
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ then `MyClass.year` and `MyClass.say_hello` are valid attribute references retur
integer and a function object, respectively. Class attributes can be
assigned to, so you can change the value of `MyClass.year` by assignment.

For more structured and detailed information, you can refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/6661#class-attribute).
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).

### Task
Check out our example and print the value of `variable1` from `my_object`.
2 changes: 1 addition & 1 deletion Classes and objects/__str__ vs __repr__/task.md
Original file line number Diff line number Diff line change
@@ -27,7 +27,7 @@ Also, if we think it would be useful to have a string representation for users,
a `__str__` function. Check out another implementation of the class `Complex` in the code editor. Run the code
to see what each of the two `print` statements prints.

For more structured and detailed information, you can refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/7139#str__-vs-__repr).
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).

### Task
Implement `__str__` and `__repr__` methods for the class `Cat`. `__str__` method should return a string like this:
2 changes: 1 addition & 1 deletion Condition expressions/Boolean operators order/task.md
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
Boolean operators are not evaluated from left to right. There's an order of operations for
boolean operators: `not` is evaluated first, `and` is evaluated next, and `or` is evaluated last.

For more structured and detailed information, you can refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/6025).
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).

### Task
Write an expression that evaluates to `True` if `name` is either `"John"` or `"Jane"` who are `16` or older, but younger than `25`.
2 changes: 1 addition & 1 deletion Condition expressions/Boolean operators/task.md
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ operator `and` returns `True` when the expressions on both sides of `and` are `T
The boolean operator `or` returns `True` when at least one expression on either side
of `or` is `True`. The boolean operator `not` inverts the boolean expression it precedes.

For more structured and detailed information, you can refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/6025).
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).

### Task
Write an expression that evaluates to `True` if `name` is equal to `"John"` and
Original file line number Diff line number Diff line change
@@ -41,7 +41,7 @@ a += 1 if a > b else a -= 1
```
</details>

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.
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.

### Task
Print `True` if `name` is equal to `"John"` and `False` otherwise.
2 changes: 1 addition & 1 deletion Condition expressions/If statement/task.md
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@ If you have only one statement to execute, you can put it on the same line as th
if a > b: print("a is greater than b")
```

For more structured and detailed information, you can refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/5953).
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).

### Task
Print `"Not an empty list!"` if the `tasks` list is not empty.
Original file line number Diff line number Diff line change
@@ -3,4 +3,4 @@
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
fits in one line but the results of its execution remain exactly the same.

For more structured and detailed information, you can refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/5932#simple-if-else).
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).
2 changes: 1 addition & 1 deletion Data structures/Dictionaries/task.md
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@ You can access a value in a dictionary similarly to how you would access a value
but using a key instead of an index. More info about this data structure can be found
<a href="https://docs.python.org/3/tutorial/datastructures.html#dictionaries">here</a>.

For more structured and detailed information, you can also refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/6481).
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).

### Task
Add Jared's (`"Jared"`) number `570` to the phone book.
2 changes: 1 addition & 1 deletion Data structures/Dictionary keys() and values()/task.md
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@ followed by a dot.

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

For more structured and detailed information, you can also refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/11096).
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).

### Task
Print all values from the `phone_book` .
2 changes: 1 addition & 1 deletion Data structures/In keyword/task.md
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ item. You can apply `in` to lists or dictionaries the same way you did it with s

Please complete the task in the specified order.

For more structured and detailed information, you can refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/11096).
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).

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

2 changes: 1 addition & 1 deletion Data structures/Join method/task.md
Original file line number Diff line number Diff line change
@@ -33,7 +33,7 @@ aa = bb = cc
Python is a programming language
```

For more structured and detailed information, you can refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/6972#join-a-list).
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).

### Task
Assign a value to the `joined` variable such that the `print` statement prints the following:
2 changes: 1 addition & 1 deletion Data structures/Lists introduction/task.md
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ squares + [36, 49, 64, 81, 100]

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

For more structured and detailed information, you can also refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/5979).
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).

### Task
Use list slicing to print `[4, 9, 16]`.
2 changes: 1 addition & 1 deletion Data structures/Lists operations/task.md
Original file line number Diff line number Diff line change
@@ -32,7 +32,7 @@ squares

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>.

For more structured and detailed information, you can also refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/6031).
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).

### Task
Replace `"dino"` with `"dinosaur"` in the `animals` list.
2 changes: 1 addition & 1 deletion Data structures/Nested Lists/task.md
Original file line number Diff line number Diff line change
@@ -31,7 +31,7 @@ Output:
```text
1
```
For more structured and detailed information, you can refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/6938).
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).

### Task
In the code editor, use indexing to access and print elements `9` and `10` from of the nested list `my_list`.
2 changes: 1 addition & 1 deletion Data structures/Tuples/task.md
Original file line number Diff line number Diff line change
@@ -41,7 +41,7 @@ values `12345`, `54321`, and `hello!` are packed together in a tuple.
Some other list methods are also
applicable to tuples. You can read more about tuples <a href="https://docs.python.org/3/tutorial/datastructures.html#tuples-and-sequences">here</a>.

For more structured and detailed information, you can also refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/7462).
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).

### Task
Print the length of the tuple `alphabet`. Then create a tuple with a single element `'fun_tuple'`.
2 changes: 1 addition & 1 deletion File input output/Open file/task.md
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ True
**Important**: If you’re not using the `with` keyword, then you should call `f.close()` to close the file and
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()`.

For more structured and detailed information, you can refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/8691).
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).

### Task
- 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.
2 changes: 1 addition & 1 deletion File input output/Read all lines/task.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,6 @@
### Task
Read all lines from the file input.txt into the list called `lines_list`. There are at least two different ways to do it.

For more structured and detailed information, you can refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/8139#readlines).
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).

<div class="hint">Two possible solutions are discussed in the previous task.</div>
2 changes: 1 addition & 1 deletion File input output/Read file/task.md
Original file line number Diff line number Diff 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)

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.

For more structured and detailed information, you can also refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/8139).
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).

### Task
Print the contents of "input.txt" to output by iterating over the lines of the file and printing each one.
2 changes: 1 addition & 1 deletion File input output/Write to file/task.md
Original file line number Diff line number Diff line change
@@ -36,7 +36,7 @@ f.write('\n' + 'string,' + ' ' + 'another string')
```
This will add a new line and write `'string, another string'`.

For more structured and detailed information, you can refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/8334).
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).

### Task
In the code editor, **append** one new line to `output.txt` with all elements from the `zoo` list separated by `' and '`.
2 changes: 1 addition & 1 deletion Functions/Args and kwargs/task.md
Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@ after the `*args` parameter are [‘keyword-only’](https://peps.python.org/pep
rather than positional arguments. Another way to call this function is shown in call 2, and it will give
us the same output.

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.
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.

### Task

2 changes: 1 addition & 1 deletion Functions/Default parameters/task.md
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ Do not put spaces around the `=` symbol in function calls and definitions.
Explore this topic further by reading <a href="https://docs.python.org/3/tutorial/controlflow.html#default-argument-values">this section</a>
of Python Documentation.

For more structured and detailed information, you can also refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/10295).
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).

### Task
Add parameters to the `hello()` function and set a default value for the `name` parameter.
2 changes: 1 addition & 1 deletion Functions/Definition/task.md
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ my_function() # function call

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

For more structured and detailed information, you can also refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/5900).
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).

### Task
- Call the function `my_function` inside the loop to repeat its invocation 5 times
2 changes: 1 addition & 1 deletion Functions/Docstrings/task.md
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ A docstring for a function or method should summarize its behavior and document

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/).

For more structured and detailed information, you can also refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/11869).
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).

### Task
Add the following docstring to the function defined in the code editor:
2 changes: 1 addition & 1 deletion Functions/Parameters and call arguments/task.md
Original file line number Diff line number Diff line change
@@ -35,7 +35,7 @@ TypeError Traceback (most recent call last)

TypeError: my_function() missing 1 required positional argument: 'surname'
```
For more structured and detailed information, you can refer to [this Hyperskill knowledge base page](https://hyperskill.org/learn/step/7248).
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).

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