This issue describes how to implement the sets concept exercise for the Python track.
This will be closed by #2485
Getting started
Please please please read the docs before starting. Posting PRs without reading these docs will be a lot more frustrating for you during the review cycle, and exhaust Exercism's maintainers' time. So, before diving into the implementation, please read up on the following documents:
Hints should link to the Sets section of the Python docs tutorial: Sets
After
After, the student can explore comprehension syntax, although it will be taught in separate exercises. This would also be a good time to explore set comparisons via function &/or operator, or experimenting with the issuperset() & issubset() functions.
Representer
No changes required.
Analyzer
No changes required.
Implementing
Tests should be written using unittest.TestCase, and the test file named dicts_basic_test.py.
Help
If you have any questions while implementing the exercise, please post the questions as comments in this issue.
This issue has been automatically marked as abandoned because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue describes how to implement the
sets
concept exercise for the Python track. This will be closed by #2485Getting started
Please please please read the docs before starting. Posting PRs without reading these docs will be a lot more frustrating for you during the review cycle, and exhaust Exercism's maintainers' time. So, before diving into the implementation, please read up on the following documents:
Please also watch the following video:
Goal
The goal of this exercise is to teach the basics of the set (set type) in Python.
Learning objectives
set
via constructor (set()
) and literal ({}
)in
=<
,>=
,issubset()
,issuperset()
, etc.)union
,intersection
,difference
, andsymmetric_difference
)add()
discard()
for item in set
Out of scope
frozenset()
clear()
to delete all elements of a setlen()
remove
as opposed todiscard
(remove
tosses akeyerror
if the element is not present)update()
pop()
copy()
sorted()
,min()
, ormap()
with a setConcepts
sets
hashable
objectsset
comparisonsset
operationsPrerequisites
basics
booleans
comparisons
dicts
lists
loops
Resources to refer to
Hints
Hints should link to the
Sets
section of the Python docs tutorial: SetsAfter
After, the student can explore comprehension syntax, although it will be taught in separate exercises. This would also be a good time to explore set comparisons via function &/or operator, or experimenting with the
issuperset()
&issubset()
functions.Representer
No changes required.
Analyzer
No changes required.
Implementing
Tests should be written using unittest.TestCase, and the test file named dicts_basic_test.py.
Help
If you have any questions while implementing the exercise, please post the questions as comments in this issue.
Edits