Skip to content
This repository has been archived by the owner on Aug 31, 2021. It is now read-only.

[Python] Improve Concept Exercise: lists #2880

Closed
valentin-p opened this issue Nov 30, 2020 · 5 comments · Fixed by #2898
Closed

[Python] Improve Concept Exercise: lists #2880

valentin-p opened this issue Nov 30, 2020 · 5 comments · Fixed by #2898
Labels
claimed good first issue Good for newcomers type/improve-exercise Improve an existing exercise

Comments

@valentin-p
Copy link
Contributor

valentin-p commented Nov 30, 2020

This issue describes how to improve the lists concept exercise (elyses-enchantments)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 basics of the List (sequence type) data type in Python. The exercise will walk the student through how to create lists via various methods, iterate through lists via looping, and access items in various lists through indexing and forming/accessing list slices.

A draft version of this exercise is already implemented (it was completed when the specifications of v3 were not final) and should be used as a starting point for the fully functional exercise.

Learning objectives

  • Create a list via constructor (list()) & literal ([])
  • Combine two or more lists by concatenation via +
  • Check for an items membership/absence in a list using in and/or not in
  • Access items in a list via index (bracket notation)
  • Access a range of items in a list via list slicing ([start:stop:step])
  • Iterate through a list using for item in
  • Understand that lists can store mixed/any data types
  • Understand that lists are mutable. Assigning a new value to a list index will change the value at that index.

Out of scope

  • List Comprehensions (these will be covered in their own concept exercise)
  • List methods (copy(), append(), sort() etc)
  • How builtin functions relate to lists (len(), max(), min(), count(), sorted())
  • Construction of complex or nested lists (i.e a list of dicts, a list of lists, a list of tuples)
  • Consequences and considerations of mutability

Concepts

  • lists
  • indexing
  • slicing
  • concatenation
  • iteration

Prerequisites

  • basics
  • str
  • comparisons
  • conditionals

Resources to refer to

Hints

Hints should link/refer to one or more of the resources above or other equivalent resources as needed.

About Doc

The about.md file for this concept exercise can be found here. This doc can be used in whole or in part as the introduction.md for this concept exercise.

Representer

No changes needed

Analyzer

No changes needed

Implementing/Improving

The current implementation of this exercise can be found here. Note that the following files are currently missing, and need to be created:

  • .docs/hints.md
  • .docs/introduction.md
  • .meta/design.md
  • concepts/lists/links.json -- the links from Resources to refer to can be placed here, as well as any additional interesting or helpful links for the understanding or application of lists in Python.

Additionally, the following existing files can be Improved and simplified:

  • .meta/example.py
  • lists_test.py
  • lists.py

These files need to be proofread for understanding, grammar, and spelling:

  • .docs/instructions.md

Help

If you have any questions while implementing the exercise, please post the questions as comments in this issue, or reach out on our Slack channel.

@valentin-p valentin-p added status/help-wanted Extra attention is needed type/new-exercise Add a new exercise good first issue Good for newcomers labels Nov 30, 2020
@BethanyG BethanyG added type/improve-exercise Improve an existing exercise and removed type/new-exercise Add a new exercise labels Nov 30, 2020
@serenalucca
Copy link
Contributor

Hello, if it is possible, I would like to work on this feature.

@serenalucca
Copy link
Contributor

I have a few questions for this issue.

  • For the hints, should I be precise and put an example when possible or should I rather put the link to a ressource and let them - look by themselves?
  • For the introduction file I just copied the whole about doc, should I do something else?
  • In the design file should I put the ressources?

Thanks in advance.

@BethanyG
Copy link
Member

BethanyG commented Dec 7, 2020

Hi @serenalucca,

Apologies - I didn't see your comments here, or I would have replied earlier. First, thank you so much for taking on this issue. We really appreciate it. ⭐

To answer your questions:

For the hints, should I be precise and put an example when possible or should I rather put the link to a ressource and let them - look by themselves?

As I commented in your PR, this is a balance. On one hand, we want the hints to "unstick" the student. On the other, we don't want to give away exact answers. I am on the fence with the way your hints are written -- they're good, but some are pretty detailed. Part of me wants to remove direct code examples. I've pinged the other Python maintainers to get their feedback.

For the introduction file I just copied the whole about doc, should I do something else?

Copying in this case was totally fine. It gives us an opportunity to remove the pieces that aren't directly relevant to the exercise. Typically, the about.md files are more detailed/comprehensive than the introduction.md files -- which are intended to focus the student only on the syntax needed to complete the exercise.

In the design file should I put the ressources?

You don't have to. Typically, I do include in the design doc the resources I worked from when I was writing/designing the concept exercise, in order to point future maintainers to what my data/starting point was. But for many of these, the starting point is the Python docs, so its not super-important.

@serenalucca
Copy link
Contributor

Thank you very much for your precise answer and for your kindness, I really appreciate it! I'm going to check the PR for the modifications.

BethanyG added a commit that referenced this issue Dec 8, 2020
* [Python] Improve Concept Exercise: lists #2880

Hi! This is my very first contribution to an open-source project, I need feedback, especially for the hints file.
Thanks in advance.

* [Python] Improve Concept Exercise: lists #2880

applied prettier

* Update languages/python/exercises/concept/elyses-enchantments/.docs/introduction.md

Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>

* Update languages/python/exercises/concept/elyses-enchantments/.docs/introduction.md

Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>

* Update languages/python/exercises/concept/elyses-enchantments/.docs/introduction.md

Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>

* Update languages/python/exercises/concept/elyses-enchantments/.docs/introduction.md

Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>

* Update languages/python/exercises/concept/elyses-enchantments/.docs/introduction.md

Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>

* Update languages/python/exercises/concept/elyses-enchantments/.docs/introduction.md

Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>

* Update languages/python/exercises/concept/elyses-enchantments/.docs/introduction.md

Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>

* Update languages/python/exercises/concept/elyses-enchantments/.meta/design.md

Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>

* Update languages/python/exercises/concept/elyses-enchantments/.docs/introduction.md

Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>

* slice notation in introduction and about file

* modification of hint and introduction file + format of comments

* prettier format

* Update hints.md

* Update languages/python/concepts/lists/about.md

Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>

* Update languages/python/concepts/lists/about.md

Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>

* Update languages/python/concepts/lists/about.md

Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>

* Update languages/python/concepts/lists/about.md

Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>

* Update about.md

* Update introduction.md

* prettier

Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>
@BethanyG
Copy link
Member

BethanyG commented Dec 10, 2020

@valentin-p - Thoughts? Are we OK to close this? Ooops. Sorry. Didn't see the automation close it - but it is closed. Apologies for pinging you.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
claimed good first issue Good for newcomers type/improve-exercise Improve an existing exercise
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants