Skip to content
Open
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
1 change: 1 addition & 0 deletions about_bool.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ def test_has_false_literal():
assert not a



def test_python_can_calculate_bool_expressions():
"""
Python может проверять, является выражение истиной или ложью
Expand Down
1 change: 1 addition & 0 deletions about_compound_conditions.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ def test_and_returns_one_of_the_operands():
assert r == 'b' # попробуйте такие варианты: True, False, 'a', 'b'



def test_or_returns_one_of_the_operands():
"""
Оператор or выполняет булевы операции, но возвращает не булево
Expand Down
1 change: 1 addition & 0 deletions about_conditions.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ def test_start_if():
assert a == 3



def test_if_and_else():
"""
Использование конструкции if и else
Expand Down
1 change: 1 addition & 0 deletions about_dictionaries.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ def test_create_dictionary_with_literal():
assert dict_comparator(d, {'a':1, 'b':2}) # попробуйте подстваить объект вида {key1: value1, key2: value2,...}



def test_create_dictionary_with_constructor():
"""
Словарь в Python можно создать с помощью конструктора словаря
Expand Down
1 change: 1 addition & 0 deletions about_floats.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ def test_can_sum_up():
assert 2.5 + 1.2 == 3.7



def test_can_assign_to_variables():
"""
Вещественные числа можно записывать в переменные
Expand Down
1 change: 1 addition & 0 deletions about_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ def test_format_simple():
assert str2 == 'Hello, world! 123'



def test_format_indeces():
"""
Плейсхолдеры могут быть пронумерованы
Expand Down
1 change: 1 addition & 0 deletions about_integers.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ def test_can_sum_up():
assert 1 + 1 == 2 # Вставьте вместо __ такое значение, чтобы оно совпадало с результатом выполнения 1 + 1



def test_can_deduct():
"""
Целые числа можно вычитать
Expand Down
1 change: 1 addition & 0 deletions about_lists.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ def test_create_list_with_literal():
assert my_list == ['Hello', 'world'] # попробуйте ввести такие варианты: list(), ['Hello', 'world'], {'Hello'}



def test_create_list_with_constructor():
"""
Список в Python также можно создать с помощью функции list()
Expand Down
1 change: 1 addition & 0 deletions about_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ def test_create():
P.S пустое множество невозможно создать как {}, так-как синтаксис совпадёт с созданием словаря.
"""


my_set = set() # попробуйте такие варианты: set(), {1, 2, 3}, {'qwerty'}, set((1, 2, 3))
assert isinstance(my_set, set)

Expand Down
1 change: 1 addition & 0 deletions about_slices.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ def test_slice_with_index():
assert str1[2] == 't'



def test_slice_with_index_minus_one():
"""
Если задать индекс со значением -1, то мы получим срез с последним символом строки
Expand Down
1 change: 1 addition & 0 deletions about_strings.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ def test_string_indexes():
assert str1[5] == ','



def test_string_slice():
"""
Из строки можно брать срез
Expand Down
1 change: 1 addition & 0 deletions about_variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ def test_can_assign_to_variable():
assert a + 3 == 15



def test_can_assign_different_types():
"""
В одну переменную можно записывать значения разных типов.
Expand Down
2 changes: 1 addition & 1 deletion koans_plugs.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ class ___(Exception):

____ = "-=> TRUE OR FALSE? <=-"

_____ = 0
_____ = 0