Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 26b4f55

Browse files
committedJan 4, 2023
renamed most task_py files to avoid identical module names in the project
1 parent 564a7a2 commit 26b4f55

File tree

34 files changed

+47
-46
lines changed

34 files changed

+47
-46
lines changed
 

‎Classes and objects/Call a method from another method/task-info.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
type: edu
22
files:
3-
- name: task.py
3+
- name: call_method.py
44
visible: true
55
placeholders:
66
- offset: 208
77
length: 12
8-
placeholder_text: '# TODO: set the exponentiation `base`, it should be equal to
9-
the current value.'
8+
placeholder_text: "# TODO: set the exponentiation `base`, it should be equal to\
9+
\ the current value."
1010
- offset: 268
1111
length: 19
12-
placeholder_text: '# TODO: use the `multiply` method with the parameter `base` to calculate
13-
the result.'
12+
placeholder_text: "# TODO: use the `multiply` method with the parameter `base`\
13+
\ to calculate the result."
1414
- name: tests/test_task.py
1515
visible: false
1616
- name: __init__.py

‎Classes and objects/Call a method from another method/tests/test_task.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import unittest
22

3-
from task import Calculator
3+
from call_method import Calculator
44

55

66
class TestCase(unittest.TestCase):

‎Classes and objects/Class and Instance Variables 2/task-info.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
type: edu
22
files:
3-
- name: task.py
3+
- name: class_instance2.py
44
visible: true
55
placeholders:
66
- offset: 16
77
length: 15
8-
placeholder_text: '# TODO: add a mutable class variable (all_cities list) to store
9-
all added city names'
8+
placeholder_text: "# TODO: add a mutable class variable (all_cities list) to store\
9+
\ all added city names"
1010
- offset: 185
1111
length: 15
12-
placeholder_text: '# TODO: call add_city method to add the city name to the list
13-
upon object initialization'
12+
placeholder_text: "# TODO: call add_city method to add the city name to the list\
13+
\ upon object initialization"
1414
- offset: 234
1515
length: 33
1616
placeholder_text: |-

‎Classes and objects/Class and Instance Variables 2/tests/test_task.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import unittest
22

3-
from task import City
3+
from class_instance2 import City
44

55

66
class TestCase(unittest.TestCase):

‎Data structures/Dictionary keys/task-info.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
type: edu
22
files:
3-
- name: task.py
3+
- name: dict_keys.py
44
visible: true
55
placeholders:
66
- offset: 0

‎Data structures/Dictionary keys/tests/test_task.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
class TestCase(unittest.TestCase):
55
def test_dict(self):
66
try:
7-
from task import ages_dict
7+
from dict_keys import ages_dict
88
test_dict1 = {
99
"Alice": 21,
1010
"Bob": 39,

‎File input output/Read all lines/task-info.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
type: edu
22
files:
3-
- name: task.py
3+
- name: read_all_lines.py
44
visible: true
55
placeholders:
66
- offset: 43
77
length: 31
8-
placeholder_text: '# TODO: read all lines from input.txt into the list called
9-
lines_list'
8+
placeholder_text: "# TODO: read all lines from input.txt into the list called\
9+
\ lines_list"
1010
- name: tests/test_task.py
1111
visible: false
1212
- name: __init__.py

‎File input output/Read all lines/tests/test_task.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import io
33
import unittest
44

5-
from task import lines_list
5+
from read_all_lines import lines_list
66

77

88
class TestCase(unittest.TestCase):
File renamed without changes.

‎Functions/Docstrings/task-info.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
type: edu
22
files:
3-
- name: task.py
3+
- name: docstrings.py
44
visible: true
55
placeholders:
66
- offset: 32
77
length: 54
8-
placeholder_text: '# TODO: add a docstring here'
8+
placeholder_text: "# TODO: add a docstring here"
99
- name: tests/test_task.py
1010
visible: false
1111
- name: __init__.py
1212
visible: false
1313
- name: tests/__init__.py
1414
visible: false
15-
feedback_link: https://docs.google.com/forms/d/e/1FAIpQLSfRlDlldKfuq-cHMNFfHMER61P1PRIan7KG6yp1GvaweDI7GA/viewform?usp=pp_url&entry.2103429047=Functions+/+Docstrings
15+
feedback_link: https://docs.google.com/forms/d/e/1FAIpQLSfRlDlldKfuq-cHMNFfHMER61P1PRIan7KG6yp1GvaweDI7GA/viewform?usp=pp_url&entry.2103429047=Functions+/+Docstrings

‎Functions/Docstrings/tests/test_task.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import unittest
22

3-
from task import increment_list
3+
from docstrings import increment_list
44

55

66
class TestCase(unittest.TestCase):

‎Loops/Else with loops 2/task-info.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
type: edu
22
files:
3-
- name: task.py
3+
- name: else_with_loops2.py
44
visible: true
55
placeholders:
66
- offset: 35

‎Loops/Else with loops 2/tests/test_task.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import io
44

55

6-
from task import contains_even_number
6+
from else_with_loops2 import contains_even_number
77

88

99
class TestCase(unittest.TestCase):

‎Loops/Fix infinite execution/task-info.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
type: edu
22
files:
3-
- name: task.py
3+
- name: infinite.py
44
visible: true
55
placeholders:
66
- offset: 146

‎Loops/Fix infinite execution/tests/test_task.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import wrapt_timeout_decorator
66

7-
from task import should_not_be_infinite
7+
from infinite import should_not_be_infinite
88

99

1010
class TestCaseWithTimeouts(unittest.TestCase):

‎Loops/List Comprehension/task-info.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
type: edu
22
files:
3-
- name: task.py
3+
- name: list_comprehension.py
44
visible: true
55
placeholders:
66
- offset: 194
@@ -12,4 +12,4 @@ files:
1212
visible: false
1313
- name: tests/__init__.py
1414
visible: false
15-
feedback_link: https://docs.google.com/forms/d/e/1FAIpQLSfRlDlldKfuq-cHMNFfHMER61P1PRIan7KG6yp1GvaweDI7GA/viewform?usp=pp_url&entry.2103429047=Loops+/+List+Comprehension
15+
feedback_link: https://docs.google.com/forms/d/e/1FAIpQLSfRlDlldKfuq-cHMNFfHMER61P1PRIan7KG6yp1GvaweDI7GA/viewform?usp=pp_url&entry.2103429047=Loops+/+List+Comprehension

‎Loops/List Comprehension/tests/test_task.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import unittest
22

3-
from task import *
3+
from list_comprehension import *
44

55

66
# todo: replace this with an actual test

‎Loops/Nested List Comprehension/task-info.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
type: edu
22
files:
3-
- name: task.py
3+
- name: nested_list_comprehension.py
44
visible: true
55
placeholders:
66
- offset: 33
@@ -12,4 +12,4 @@ files:
1212
visible: false
1313
- name: tests/__init__.py
1414
visible: false
15-
feedback_link: https://docs.google.com/forms/d/e/1FAIpQLSfRlDlldKfuq-cHMNFfHMER61P1PRIan7KG6yp1GvaweDI7GA/viewform?usp=pp_url&entry.2103429047=Loops+/+Nested+List+Comprehension
15+
feedback_link: https://docs.google.com/forms/d/e/1FAIpQLSfRlDlldKfuq-cHMNFfHMER61P1PRIan7KG6yp1GvaweDI7GA/viewform?usp=pp_url&entry.2103429047=Loops+/+Nested+List+Comprehension

‎Loops/Nested List Comprehension/tests/test_task.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import unittest
22

3-
from task import matrix, string
3+
from nested_list_comprehension import matrix, string
44

55

66
class TestCase(unittest.TestCase):
File renamed without changes.

‎Loops/Nested for Loop/task-info.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
type: edu
22
files:
3-
- name: task.py
3+
- name: nested_loop.py
44
visible: true
55
placeholders:
66
- offset: 61
77
length: 31
8-
placeholder_text: '# TODO: use a nested loop here.'
8+
placeholder_text: "# TODO: use a nested loop here."
99
- name: tests/test_task.py
1010
visible: false
1111
- name: __init__.py
1212
visible: false
1313
- name: tests/__init__.py
1414
visible: false
15-
feedback_link: https://docs.google.com/forms/d/e/1FAIpQLSfRlDlldKfuq-cHMNFfHMER61P1PRIan7KG6yp1GvaweDI7GA/viewform?usp=pp_url&entry.2103429047=Loops+/+Nested+For+Loop
15+
feedback_link: https://docs.google.com/forms/d/e/1FAIpQLSfRlDlldKfuq-cHMNFfHMER61P1PRIan7KG6yp1GvaweDI7GA/viewform?usp=pp_url&entry.2103429047=Loops+/+Nested+For+Loop

‎Loops/Nested for Loop/tests/test_task.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
f = io.StringIO()
66

77
with contextlib.redirect_stdout(f):
8-
from task import *
8+
from nested_loop import *
99
output = f.getvalue().split('\n')
1010

1111

‎Modules and packages/Executing modules as scripts/task-info.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ files:
77
length: 18
88
placeholder_text: '# Call func() from the imported module'
99
- offset: 107
10-
length: 100
11-
placeholder_text: print('This should be printed ONLY when task.py is called directly.')
10+
length: 105
11+
placeholder_text: print('This should be printed ONLY when dict_keys.py is called
12+
directly.')
1213
- name: tests/test_task.py
1314
visible: false
1415
- name: __init__.py

‎Modules and packages/Executing modules as scripts/task.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@
55

66
# Make a change here.
77
if __name__ == "__main__":
8-
print('This should be printed ONLY when task.py is called directly.')
8+
print('This should be printed ONLY when dict_keys.py is called directly.')
99

‎Modules and packages/Executing modules as scripts/tests/test_task.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ def test_some_main(self):
2424
msg='You should move the last print statement in some_module into the `main` block.')
2525

2626
def test_main_main(self):
27-
self.assertFalse("This should be printed ONLY when task.py is called directly." in output,
28-
msg='You should move the last print statement in task.py into the `main` block.')
27+
self.assertFalse("This should be printed ONLY when dict_keys.py is called directly." in output,
28+
msg='You should move the last print statement in dict_keys.py into the `main` block.')
2929

3030
def test_main_func(self):
3131
self.assertTrue('This is a message from the function in the imported module.' in output,

‎Variables/Comparison operators/task-info.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,18 @@ files:
99
- offset: 367
1010
length: 1
1111
placeholder_text: '?'
12-
- offset: 522
12+
- offset: 519
1313
length: 1
1414
placeholder_text: '?'
15-
- offset: 530
15+
- offset: 527
1616
length: 1
1717
placeholder_text: '?'
18-
- offset: 711
18+
- offset: 708
1919
length: 2
2020
placeholder_text: '?'
21-
- offset: 863
21+
- offset: 860
2222
length: 2
2323
placeholder_text: '?'
2424
- name: tests/test_task.py
2525
visible: false
26-
feedback_link: https://docs.google.com/forms/d/e/1FAIpQLSfRlDlldKfuq-cHMNFfHMER61P1PRIan7KG6yp1GvaweDI7GA/viewform?usp=pp_url&entry.2103429047=Variables+/+Comparison+Operators
26+
feedback_link: https://docs.google.com/forms/d/e/1FAIpQLSfRlDlldKfuq-cHMNFfHMER61P1PRIan7KG6yp1GvaweDI7GA/viewform?usp=pp_url&entry.2103429047=Variables+/+Comparison+Operators

0 commit comments

Comments
 (0)
Please sign in to comment.