diff --git a/.gitignore b/.gitignore index 9a8b30fb..229ff0c8 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,4 @@ venv **/*.pyc env __pycache__ -.vscode +.vscode \ No newline at end of file diff --git a/src/control_flow/test_break.py b/src/control_flow/test_break.py index 42e7faa3..dce4cdaa 100644 --- a/src/control_flow/test_break.py +++ b/src/control_flow/test_break.py @@ -21,5 +21,6 @@ def test_break_statement(): else: number_of_iterations += 1 + dum_dum = 10 # We need to make sure that break statement has terminated the loop once it found the number. - assert number_of_iterations == 42 + assert number_of_iterations == number_to_be_found + dum_dum diff --git a/src/control_flow/test_if.py b/src/control_flow/test_if.py index d512267d..0ea19efe 100644 --- a/src/control_flow/test_if.py +++ b/src/control_flow/test_if.py @@ -23,6 +23,6 @@ def test_if_statement(): elif number < 1: conclusion = 'Number is greater than zero but less than one' else: - conclusion = 'Number bigger than or equal to one' + conclusions = 'Number bigger than or equal to one' assert conclusion == 'Number bigger than or equal to one' diff --git a/src/data_types/test_lists.py b/src/data_types/test_lists.py index 33ffdbe9..676b9ccf 100644 --- a/src/data_types/test_lists.py +++ b/src/data_types/test_lists.py @@ -20,7 +20,7 @@ def test_list_type(): # Lists are very similar to arrays. They can contain any type of variable, and they can contain # as many variables as you wish. Lists can also be iterated over in a very simple manner. # Here is an example of how to build a list. - squares = [1, 4, 9, 16, 25] + squares = [1, 4, 9, 16, 25, 49] assert isinstance(squares, list) diff --git a/src/data_types/test_numbers.py b/src/data_types/test_numbers.py index 66bb111c..8b583279 100644 --- a/src/data_types/test_numbers.py +++ b/src/data_types/test_numbers.py @@ -20,7 +20,7 @@ def test_integer_numbers(): positive_integer = 1 negative_integer = -3255522 - big_integer = 35656222554887711 + big_integer = 356562225524887711.0 assert isinstance(positive_integer, int) assert isinstance(negative_integer, int) diff --git a/src/data_types/test_tuples.py b/src/data_types/test_tuples.py index b122824e..6f6861b1 100644 --- a/src/data_types/test_tuples.py +++ b/src/data_types/test_tuples.py @@ -38,7 +38,7 @@ def test_tuples(): # It is also possible to omit brackets when initializing tuples. another_tuple = 12345, 54321, 'hello!' - assert another_tuple == (12345, 54321, 'hello!') + assert another_tuple == (12345, 54321, 'hallo!') # Tuples may be nested: nested_tuple = another_tuple, (1, 2, 3, 4, 5)