exercism / v3

The work-in-progress project for developing v3 tracks
https://v3.exercism.io
Other
170 stars 162 forks source link

[Python] Implement new Concept Exercise: str methods #2175

Closed DavidGerva closed 3 years ago

DavidGerva commented 4 years ago

This issue describes how to implement the str method concept exercise for the Python track, which should explain how basic str methods work for text processing in python.

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 python sequence type str contains a number of useful methods for text processing and this concept exercise should make the student aware of those methods, and teach how to use them with strings to return new (changed) strings.

Learning objectives

NOTE: the above is just a subset of methods: it is not necessary that you use every single one in the creation of the exercise. Please also feel free to add any other str methods you deem important for student understanding.

Out of scope

Concepts

Prerequisites

Resources to refer to

Hints

Concept Description

(a variant of this can be used for the v3/languages/python/concepts/<concept>.md doc and introduction.md)

A str in Python is an immutable sequence of Unicode code points which can include letters, numbers, symbols, punctuation, etc. Strings implement all of the common sequence operations, along with iteration using the for item in <string> syntax.

Python provides many convenient string methods for cleaning, splitting, translating, and otherwise working with the str type. New strings can be created based on method arguments, and/or additional information can be returned. Strings can be concatenated using the + operator or by using str.join().

Because strings are immutable (a string's value doesn't change); methods that appear to modify a string actually return a new instance of str.

Representer

No changes required.

Analyzer

No changes required.

Implementing

Tests should be written using unittest.TestCase and the test file named comparisons_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.

kimolivia commented 4 years ago

Hi, I would like to work on this issue. Is this still okay to work on? (I noticed help-wanted was removed)

BethanyG commented 4 years ago

Hi @kimolivia - we're in the process of re-working these issues and concepts, so we're "on hold" for a bit, which is why the "help wanted" labels were removed. But we would ❤️ some contribution help! We should be up and ready for contributors by Halloween/first week of November, so please check back then.

BethanyG commented 4 years ago

@kimolivia -- if you are still up for writing up a concept exercise, this one is ready for you! Just give a shout if you are still interested, or if you have any questions or issues.

OMEGA-Y commented 4 years ago

Hi, I would like to work on this issue. It is labeled by good first issue. But, I couldn't find which section I can help although reading contents. Please let me know or guide.

kimolivia commented 4 years ago

@BethanyG yes, I would love to take this issue! I'll reach out with any questions!

BethanyG commented 4 years ago

Hi @OMEGA-Y,

Thanks so much for stepping forward and volunteering! ❤️ 🎉

This issue has already been claimed by @kimolivia (she expressed interest before we re-wrote the issue) - but we're going to be putting up more today -- and in the days to come. We've got a lot of issues of this type we would LOVE help on!

Most of the issues in this repo describe new concept exercises (programing problems) for different programming languages that need to be created/written for the next version of the exercism website. If you are familiar with the current version of exercism, these practice problems are a variation of the ones there -- except they will be focused on a single concept in the programming language like loops, or str-methods, or classes.

Each exercise we're making includes an introduction to the concept, a story/problem, example code for a solution, a related test suite that a student can use to test their solution to the problem, and a set of links the student can use to learn more. There are other files -- but those are the main ones we need to create. Each issue is intended to give an exercise writer the pieces they need to start writing those files.

I want to apologize ahead of time for our current documentation - you've caught us in a bit of a re-org with how our concept exercises are put together, so the issues and the current structure don't exactly match up with the documentation. We are working on updating everything this week. All that being said, the easiest way to get started is with the existing documentation links and video at the top of each issue:

  1. concept exercises
  2. what are the new features?
  3. why are we changing things?

video on concept exercises

Here is an example of a "completed" Python concept exercise: ghost-gobble-arcade-game & the related concept files -- bools

We're also very happy to chat and help with ideas and setup in our Slack channel. My username is @BethanyG there, and I would be very happy to walk you through how to fork the repo and get started. 😄

OMEGA-Y commented 4 years ago

@BethanyG Thanks for answering! I don't know if I can ask more here...

Is it possible to add a new exercise to the problem-specification repository now? Or is it better to make a new concept exercise in this repo now? And can you tell me the Slack channel url?

BethanyG commented 3 years ago

Hi @OMEGA-Y - apologies for the delay. I've sent an invite to Slack to the email listed on your GitHub profile. Let me know if there is a different email you'd like me to use. It might be better to ask additional questions there or in a new issue, so that we don't spam kimolivia with our discussions. 😄

The problem-specification repository is for exercises we've made/are making for the current version of the exercism website, and for the more open-ended "practice" problems that will be in place once we switch to V3. If you have an idea/improvement to those exercises, you would make it in that repository. We'd be delighted if you wanted to propose a new exercise for the Python track (or another track) there!

This repository is for the new concept exercises for V3, and for now it is a combination of all language tracks. I know we're a little behind getting issues up for Python in particular -- if you have a subject you really want to take on, we can always discuss it in Slack and then I can put up an issue for you. But there are also issues available in other languages/tracks like Type Script, JavaScript, C, Ruby, etc. We may not have labeled many "good first issues" -- but if you ask questions on those you are interested in, I am sure that one of the maintainers would be happy to answer any questions you have.

BethanyG commented 3 years ago

@kimolivia - do you need an invite to our Slack channel? Just let me know if you do need one. 😄

BethanyG commented 3 years ago

Closing as this exercise has been merged successfully. Thank you @kimolivia and @valentin-p ! 🎉