Skip to content
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

Create mentoring.md for Say #2211

Merged
merged 11 commits into from
Feb 16, 2024
Merged

Create mentoring.md for Say #2211

merged 11 commits into from
Feb 16, 2024

Conversation

roxgib
Copy link
Contributor

@roxgib roxgib commented Aug 4, 2022

This exercise currently has no mentoring notes

@github-actions github-actions bot added track/python Python track type/mentor-notes Mentor notes labels Aug 4, 2022
tracks/python/exercises/say/mentoring.md Outdated Show resolved Hide resolved
tracks/python/exercises/say/mentoring.md Show resolved Hide resolved
tracks/python/exercises/say/mentoring.md Outdated Show resolved Hide resolved
tracks/python/exercises/say/mentoring.md Outdated Show resolved Hide resolved
tracks/python/exercises/say/mentoring.md Outdated Show resolved Hide resolved
tracks/python/exercises/say/mentoring.md Outdated Show resolved Hide resolved
tracks/python/exercises/say/mentoring.md Outdated Show resolved Hide resolved

There are a wide variety of valid approaches to this problem, which gives students a lot of opportunity to experiment and encounter new ways of manipulating data.
Some useful techniques that students might not have encountered are listed below.
Students will not need or want to use all of these, but mentors should look for opportunities in the student's code to introduce one or more of them.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this list of functions is super helpful when mentoring an exercise. As a mentor, I'd want to see discussions on approaches and solutions at a higher level, not specific string methods which may or may not be useful here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do see your point about the specificity of some lines - 97, 99-101 are probably unnecessary. But since there's a lot going on in this exercise, I figured having a list of suggested techniques would be helpful as a quick reference - if a mentor scans this list before reading the student's code they'll more likely spot that a certain piece of code might make use of something here and be a good opportunity to introduce it to the student. Otherwise many of these wouldn't come to mind without more time spent on the exercise. I think it can be quite helpful to be introduced to a technique through a real example where it improves the code you've already written - getting a sense of when some of these would be useful is harder in contrived examples imo, but for slightly less common constructions it's easy to miss good opportunities to teach them.

tracks/python/exercises/say/mentoring.md Outdated Show resolved Hide resolved
digits = [""] + "one two three four five six seven eight nine".split()
teens = "ten eleven twelve thir four fif six seven eigh nine".split()
tens = ["", ""] + "twenty thirty forty fifty sixty seventy eighty ninety".split()
denominations = (9, 'billion'), (6, 'million'), (3, 'thousand'), (2, 'hundred')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code uses both double quotes and single quotes. Either is fine, but avoid mixing and matching! Consistent code is good code.

I'm also not sure what the value of this code block is. Is there something specific this is calling to a mentor's attention?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I've fixed the quotes.

Basically since there's a lot of different techniques that can be applied here I wanted to give a third example to cover some more of them. It isn't necessarily intended to show best practice, but some of the techniques used would be suitable for a student to use. I put it at the end because there's already two examples at the top.

* Integer division and modulo operators, and the divmod function
* Recusion

Students who wish to extend the exercise can rewrite the function to include 'and' as a seperator as well as handle negative or larger numbers.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seperator -> separator

def say(n):
if 0 > n or n > 999999999999:
raise ValueError("input out of range")
if n < 20 and n >= 10:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

10 <= n < 20

tracks/python/exercises/say/mentoring.md Outdated Show resolved Hide resolved
tracks/python/exercises/say/mentoring.md Outdated Show resolved Hide resolved
tracks/python/exercises/say/mentoring.md Outdated Show resolved Hide resolved
tracks/python/exercises/say/mentoring.md Outdated Show resolved Hide resolved
tracks/python/exercises/say/mentoring.md Outdated Show resolved Hide resolved
tracks/python/exercises/say/mentoring.md Outdated Show resolved Hide resolved
tracks/python/exercises/say/mentoring.md Outdated Show resolved Hide resolved
tracks/python/exercises/say/mentoring.md Show resolved Hide resolved
tracks/python/exercises/say/mentoring.md Outdated Show resolved Hide resolved
tracks/python/exercises/say/mentoring.md Outdated Show resolved Hide resolved
@SleeplessByte SleeplessByte merged commit 329d882 into exercism:main Feb 16, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
track/python Python track type/mentor-notes Mentor notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants