-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[New Concept Exercise] : generators #2293
Comments
@djjohnsongeek is going to take this on. 🎉 🌟 |
Heya, I am going to work on this. My ideaAn airline needs your help with assigning seats for passengers, to do this they need you to make them a generator for that. First, clarification: The exercise consists (prone to change) out of these functions/generators:
I think these should cover most of |
Yeah sorry I realize I never got to this. My personal life sorta blew up right after I started contributing. |
No worries @djjohnsongeek! We're happy you are back, and hopefully everything is going well for you. But there are also other issues (open issues) you can take on as well (if you'd like) -- just let us know! 😄 |
@BethanyG |
@djjohnsongeek -- WOW 😮 That is a LOT of new! Congratulations! 🌟 ...and just give a shout when you want to ease back into contributing. 😄 |
Wowie, congratulations on the kid! I wish you good night's rest! 😛 Enjoy every moment, and we'll see you around! |
Thank you both! |
Closing this issue, since we've merged the |
This issue describes how to implement the
generators
concept exercise for the Python track.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:
Please also watch the following video:
Goal
The goal of this exercise is to teach the syntax and use of
generators
in Python.Learning objectives
loops
anditerators
yield
keyword__next__()
methodOut of scope
throw(type, value=None, traceback=None)
close()
generator expressions
yield from
generators
used as coroutinesConcepts covered
generators
yield
__next__()
iterators
Prerequisites
conditionals
dicts
functions
higher-order-functions
lists
loops
iteration
iterators
sequences
Resources to refer to
Hints
Generators
section of the Python Docs Functional How to tutorial: GeneratorsConcept Description
(a variant of this can be used for the
v3/languages/python/concepts/<concept>/about.md
doc and this exercisesintroduction.md
doc.)Concept Description Needs to Be Filled In Here/Written
Some "extras" that we might want to include as notes in the concept description, or as links in
links.json
:Generator-iterator methods
, such asgenerator.send()
andgenerator.throw()
generator expressions
generators
used as coroutinesRepresenter
No changes required.
Analyzer
No changes rquired.
Implementing
The general Python track concept exercise implantation guide can be found here.
Tests should be written using
unittest.TestCase
and the test file namedgenerators_test.py
.Code in the
.meta/example.py
file should only use syntax & concepts introduced in this exercise or one of its prerequisites. Please do not use comprehensions, generator expressions, or other syntax not previously covered. Please also follow PEP8 guidelines.Help
If you have any questions while implementing the exercise, please post the questions as comments in this issue, or contact one of the maintainers on our Slack channel.
The text was updated successfully, but these errors were encountered: