V3: [Python] Improve Concept Exercise: lists

Created on 30 Nov 2020  ยท  5Comments  ยท  Source: exercism/v3

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.

claimed good first issue typimprove-exercise

All 5 comments

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

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.

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._

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.

@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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ErikSchierboom picture ErikSchierboom  ยท  5Comments

tehsphinx picture tehsphinx  ยท  4Comments

fpetru picture fpetru  ยท  5Comments

kotp picture kotp  ยท  3Comments

TheLostLambda picture TheLostLambda  ยท  3Comments