Two Fer Prerequisites

Hi! This is my first post and I’m a beginner so I’m sorry if this has already been covered or if I’m misunderstanding something :dizzy_face:

I just finished a mentoring session on the Two Fer exercise and was a little confused about the prerequisites. It is listed as locked until “Guido’s Gorgeous Lasagna” and “Cater Waiter” are completed. “Cater Waiter” seems to be the concept exercise for sets, which itself requires completion of the concept exercises for dicts, lists, loops, and tuples. I thought it was a little strange to have this exercise locked behind all those when (to my very limited knowledge) this exercise could probably be completed after learning about strings/string methods.

The config.json file in the python repo on github currently says this:

  "slug": "two-fer",
  "name": "Two Fer",
  "uuid": "4177de10-f767-4306-b45d-5e9c08ef4753",
  "practices": ["function-arguments"],
  "prerequisites": ["basics", "sets"],
  "difficulty": 1

It looks like a previous version of the config had Two Fer listed as:

  "slug": "two-fer",
  "name": "Two Fer",
  "uuid": "4177de10-f767-4306-b45d-5e9c08ef4753",
  "practices": ["string-formatting", "function-arguments"],
  "prerequisites": ["basics"],
  "difficulty": 1

but was changed with PR #3487.

I’m not really sure if I’m suggesting a change, I just wanted to bring it up in case it was a mistake :sweat_smile:

Thank you!

Hello. Thanks for the nice post and welcome to the community!

At a glance your points seem entirely valid. However, ordering often takes into consideration other things, such as balancing different exercises to ensure each exercise is unlocking some reasonable set (e.g. you might want 3 exercises unlocking 10 things each, rather than the first unlock 26 and the next two unlocking 2 each). It might also take into considering secondary things taught in an exercise that aren’t explicitely listed in the config (for example if the sets mentioned optional paramaters for the first time).

But also, it’s really complex (as the PR you showed demonstrates! :sweat_smile:) so its easy to also overlook things. I’m sure Bethany will reply here, but I also know that ordering is a bit of a beast, and she’s very busy adding exercises and approaches etc, so this might be quite low down on the priority list, as I don’t think it coming too late really hurts anything (as opposed to it being too early!)

But let’s see what she says when she has time to reply :slight_smile:

Nice work on getting mentoring btw - I hope it proved useful! :slight_smile:

1 Like

Thanks for the response and the insight! :smile:

I don’t really have an issue with its position, especially since the exercises can be completed in any order. And I fully understand that there’s a lot more to do besides moving an exercise or two around hahah!

It was just something I noticed and the mentor suggested I make a post just in case it was something that wanted changing :slightly_smiling_face: Of course, if this sort of thing isn’t worth bothering with I won’t suggest things like it again in the interest of keeping the spam down aha.

You guys are doing great by the way! I’ll be sure to donate as soon as I finish student life and have an income… :sweat_smile:

1 Like

Suggestions are always welcome when they’re accompanied with your sort of positive, respectful attitude :slight_smile:


Hi @Mr-Lasagne :wave:

Welcome to Exercism, and thank you for the forum post! :smile:

I don’t have a whole lot to add to iHiD’s excellent answer, except to say that we’ve struggled quite a bit with the positioning of this exercise on the Python track.

On one hand, it is dead simple to write the function body once you become more familiar with strings and string manipulation in Python. It’s also excellent for working through tradeoffs between str.format(), string concatenation (+), and using something like f-strings to template the return.

But the sticky bit is how to handle the case where an empty string (or nothing) is passed as the name argument. The most ‘Pythonic’ way to handle that scenario is to assign a default value to the name parameter - but that requires that a student know that Python has many different ways of setting parameters & accepting arguments (a few too many, IMHO).

Without that knowledge, learners often resort to a lot of “guard” or “checking” logic that leads them to frustration when they are then told by a mentor that they should have used a default value in the function definition.

So our original solution to this was to require that a student learn about function arguments before they tackle this exercise. That’s the first configuration you list. But our “extended” function concept + exercise and the dependent function-arguments concept + exercise are further “down” the tree than even the sets concept, and are still being worked on. And then there is the mess that is Python function arguments - which is a LOT to hit someone with when they are first learning the syntax.

Requiring a concept that is not live has the effect of making the exercise not available to anyone until we get the concepts + exercises published. Leaving the prerequisite as only Lasagna – or even strings (we don’t have the string-formatting concept + exercise done yet) – leaves the student to struggle with setting the default value for the function parameter. So we split the difference and made the prerequisite sets, with the hope that practicing writing functions through the data structures (and reading more docs) would perhaps help.

Of course, what would really help is for us to get the string-formatting, functions , and function-arguments concepts + exercises completed. We’re working on it! :sweat_smile:

1 Like

It’s true, we really are working on it. Unfortunately, also on many other Exercism-related things that compete for attention…


Thank you for such a comprehensive response!

I figured there was most likely a pretty complex reason behind the placement after reading about Chesterton’s Fence but I’m glad I could get some clarification, so thank you for taking the time to comment :smile:

I understand it says on github that community contributions are currently paused and, on top of that, I’m relatively new to Python. Aside from these facts, is there anything I can do to help out? I completely understand if not, but I feel like I should ask, just in case :sweat_smile:

Thanks again!


A thread that might be of use.

1 Like

I think the first thing to say is that you have already helped (and can continue to help) by opening thoughtful discussion topics and asking good questions! :smile: And also asking about things you see on the track and in the exercises that don’t make sense to you. As iHiD has said – suggestions and discussions are always welcome when they are thoughtful and respectful.

For med - large track contributions, the best bet is to shoot me a DM invite on Discord or private message me here on the forum (same username for both), and we can discuss things. What we have on our priority list may not match your interests topic-wise or use your preferred skills (for example, we have a absolute TON of writing to get through, but writing may not be your bag – and that’s fine!!).

That being said, if you find code examples or writing that is incorrect/misspelled/confusing – you can always open a post here, and it is likely that a PR would be welcomed to correct those smaller pieces.

1 Like

Hey, you told me to get back at around new year. I’m cool with writing - shall I restart on approaches? Any specific exercises you’d like me to tackle?


I think right now I want to concentrate on approaches for the exercises that we’re doing for 48in24.

We have writers/reviewers for most of those for the next little while, but if you have an approach for an exercise you think is particularly good/important, you can go ahead and write that up. :slightly_smiling_face:

For reverse-string, raindrops, and roman-numerals (the next three), I ask that you wait until Colin or I get the general write-ups done before you PR to add an approach to them. I need to think about list-ops & liked-list more (some of the next upcoming exercises), so I think those should wait for a while before write-up.

There is zebra-puzzle and minesweeper proposed for May, if either of those look attractive to you for general write-up. kindergarten-garden looks like it is proposed for June. I have to take a longer look at the list to see what else is upcoming.

1 Like