Skip to content
Merged
Show file tree
Hide file tree
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
Expand Up @@ -4,4 +4,3 @@ 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?utm_source=jba&utm_medium=jba_courses_links).
1 change: 0 additions & 1 deletion Classes and objects/Class and Instance Variables 2/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@ 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?utm_source=jba&utm_medium=jba_courses_links).
1 change: 0 additions & 1 deletion Classes and objects/Class and Instance Variables/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ 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?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
Expand Down
1 change: 0 additions & 1 deletion Classes and objects/Definition/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ 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?utm_source=jba&utm_medium=jba_courses_links).

### Task
Assign a value to `variable` inside `MyClass` and create an object `my_object` of the class `MyClass()`.
Expand Down
1 change: 0 additions & 1 deletion Classes and objects/Special __init__ method/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ 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?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
Expand Down
1 change: 0 additions & 1 deletion Classes and objects/The self parameter/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ 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?utm_source=jba&utm_medium=jba_courses_links).

### Task
In the code editor, implement the `add` method of the `Calculator` class. It should
Expand Down
1 change: 0 additions & 1 deletion Classes and objects/Update variable/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ 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?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>
Expand Down
1 change: 0 additions & 1 deletion Classes and objects/Variable access/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ 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?utm_source=jba&utm_medium=jba_courses_links).

### Task
Check out our example and print the value of `variable1` from `my_object`.
Expand Down
1 change: 0 additions & 1 deletion Classes and objects/__str__ vs __repr__/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ 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 `ComplexNumber` 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?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:
Expand Down
1 change: 0 additions & 1 deletion Condition expressions/Boolean operators order/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
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?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`.
Expand Down
3 changes: 1 addition & 2 deletions Condition expressions/Boolean operators/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ Boolean operators compare statements and return results in boolean values. The b
operator `and` returns `True` when the expressions on both sides of `and` are `True`.
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?utm_source=jba&utm_medium=jba_courses_links).


### Task
Write an expression that evaluates to `True` if `name` is equal to `"John"` and
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ can be written as
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?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.
Expand Down
1 change: 0 additions & 1 deletion Condition expressions/If statement/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ 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?utm_source=jba&utm_medium=jba_courses_links).

### Task
Print `"Not an empty list!"` if the `tasks` list is not empty.
Expand Down
2 changes: 0 additions & 2 deletions Condition expressions/Single-line if-else statement/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,3 @@ Rewrite the statement in the code editor so that it
fits in one line but the results of its execution remain exactly the same:
- If `my_random_number` is greater than 50, the program should print the value of `my_random_number`.
- Otherwise, it should print the message `"Too small!"`.

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).
1 change: 0 additions & 1 deletion Data structures/Dictionaries/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ 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?utm_source=jba&utm_medium=jba_courses_links).

### Task
Add Jared's (`"Jared"`) number `570` to the phone book.
Expand Down
1 change: 0 additions & 1 deletion Data structures/Dictionary keys() and values()/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ 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?utm_source=jba&utm_medium=jba_courses_links).

### Task
Print all values from the `phone_book` .
Expand Down
1 change: 0 additions & 1 deletion Data structures/In keyword/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ 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?utm_source=jba&utm_medium=jba_courses_links).

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

Expand Down
1 change: 0 additions & 1 deletion Data structures/Join method/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ 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?utm_source=jba&utm_medium=jba_courses_links).

### Task
Assign a value to the `joined` variable such that the `print` statement prints the following:
Expand Down
1 change: 0 additions & 1 deletion Data structures/Lists introduction/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ 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?utm_source=jba&utm_medium=jba_courses_links).

### Task
Use list slicing to print `[4, 9, 16]`.
Expand Down
1 change: 0 additions & 1 deletion Data structures/Lists operations/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ 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?utm_source=jba&utm_medium=jba_courses_links).

### Task
Replace `"dino"` with `"dinosaur"` in the `animals` list.
Expand Down
2 changes: 1 addition & 1 deletion Data structures/Nested Lists/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -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?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`.
Expand Down
1 change: 0 additions & 1 deletion Data structures/Tuples/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ 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?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'`.
Expand Down
1 change: 0 additions & 1 deletion File input output/Open file/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ 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?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.
Expand Down
1 change: 0 additions & 1 deletion File input output/Read all lines/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@
### 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?utm_source=jba&utm_medium=jba_courses_links).

<div class="hint">Two possible solutions are discussed in the previous task.</div>
1 change: 0 additions & 1 deletion File input output/Read file/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ 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?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.
Expand Down
4 changes: 1 addition & 3 deletions File input output/What next/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ Now that you’ve explored the basics of Python programming, you can dive deeper
- Learn about the most widely used Python library with our [course on NumPy](https://plugins.jetbrains.com/plugin/18302-python-libraries--numpy).
- Find out how to build an [AMazing](https://plugins.jetbrains.com/plugin/17519-amazing) maze with Python.
- Discover the basics of [Machine Learning](https://plugins.jetbrains.com/plugin/18392-machine-learning-101).
- Check out the projects in the [Python Core](https://hyperskill.org/tracks/2) or [Python for Beginners](https://hyperskill.org/tracks/6) track at JetBrains Academy on Hyperskill.

You can also find a huge number of other courses in the [JetBrains Academy catalog](https://academy.jetbrains.com/)!

Expand All @@ -20,9 +19,8 @@ Stay tuned for new courses and updates!
- At the moment, 37 Python projects and 348 topics are available for learning, and the number keeps growing.
Other programming languages, such as Kotlin and Java, are also available.
- Projects of varying difficulty levels provide a flexible learning experience for all.
- Comprehensive learning tracks are augmented with a detailed [Knowledge Map](https://hyperskill.org/knowledge-map?utm_source=ide&utm_medium=ide&utm_campaign=ide&utm_content=last-task).
- Learn anywhere: you can start learning on your tablet or mobile phone via a browser and continue on your
laptop or PC; you can even build the projects [right in your IDE](https://hyperskill.org/plugin#python?utm_source=ide&utm_medium=ide&utm_campaign=ide&utm_content=last-task).
laptop or PC; you can even build the projects right in your IDE.

### Contribution
If you want to contribute, feel free to create a pull request or an issue in the course’s [GitHub repo](https://github.com/jetbrains-academy/introduction_to_python).
1 change: 0 additions & 1 deletion File input output/Write to file/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ 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?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 '`.
Expand Down
1 change: 0 additions & 1 deletion Functions/Args and kwargs/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ 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?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

Expand Down
1 change: 0 additions & 1 deletion Functions/Default parameters/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ 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?utm_source=jba&utm_medium=jba_courses_links).

### Task
Add parameters to the `hello()` function and set a default value for the `name` parameter.
Expand Down
1 change: 0 additions & 1 deletion Functions/Definition/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ 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?utm_source=jba&utm_medium=jba_courses_links).

### Task
- Call the function `my_function` inside the loop to repeat its invocation 5 times
Expand Down
1 change: 0 additions & 1 deletion Functions/Docstrings/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ 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?utm_source=jba&utm_medium=jba_courses_links).

### Task
Add the following docstring to the function defined in the code editor:
Expand Down
1 change: 0 additions & 1 deletion Functions/Parameters and call arguments/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ 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?utm_source=jba&utm_medium=jba_courses_links).

### Task
In the code editor, define a function that prints the square of a passed parameter.
Expand Down
1 change: 0 additions & 1 deletion Functions/Recursion/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ Keep in mind that recursion isn’t useful in every situation. For some problems
possible, will be awkward rather than elegant. Recursive implementations often consume more
memory than non-recursive ones and in some cases may result in slower execution.

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

### Task
In the code editor, implement a recursive function that calculates the [factorial](https://en.wikipedia.org/wiki/Factorial) of a positive integer.
Expand Down
1 change: 0 additions & 1 deletion Functions/Return value/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ without a `return` statement do return a value. This value is
called `None` (it’s a built-in name). Writing the value `None` is normally suppressed by
the interpreter, but if you really want to see it, you can use `print(some_func())`.

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

><i>The first statement of the function body can optionally be a string literal; this string
literal is the function’s documentation string, or docstring (more about docstrings can
Expand Down
1 change: 0 additions & 1 deletion Introduction/Comments/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ You can read more about proper commenting in <a href="https://www.python.org/dev

You can also comment a line or a block of code if you don't want to delete it, but it's not needed at the moment.

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

### Task
In the code editor, comment the line with the `print` statement that says it should not be printed.
Expand Down
12 changes: 0 additions & 12 deletions Introduction/Our first program/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,3 @@ To run this script, right-click anywhere in the **Editor** view so you can see t
Alternatively, you can use the &shortcut:RunClass; shortcut.

For more information, check out [our help](https://www.jetbrains.com/help/pycharm/running-and-rerunning-applications.html).

## JetBrains Academy on Hyperskill

If this task seems too hard, or you are looking for a more structured and detailed curriculum, we suggest trying [JetBrains Academy on Hyperskill](https://hi.hyperskill.org?utm_source=ide&utm_medium=ide&utm_campaign=ide&utm_content=first-task).

There are many reasons for you to try JetBrains Academy. Here are just a few of them:

- Comprehensive learning tracks with a detailed [Knowledge Map](https://hyperskill.org/knowledge-map?utm_source=ide&utm_medium=ide&utm_campaign=ide&utm_content=first-task).
- Projects with different difficulty levels that provide a flexible learning experience to match your skill level.
- You can practice with and master [professional development tools](https://hyperskill.org/plugin?utm_source=ide&utm_medium=ide&utm_campaign=ide&utm_content=first-task).

Join JetBrains Academy on Hyperskill [here](https://hyperskill.org/onboarding?track=python&utm_source=ide&utm_medium=ide&utm_campaign=ide&utm_content=first-task) and try it yourself.
Loading
Loading