You are viewing a single comment's thread from:

RE: [Idea] Who would like a series on a Python programming challenges posted weekly?

in #technology7 years ago

I'm sorry, but can you explain how that particular input (list of words you provided in your post) maps to output (4)?

If those were just the examples of the format in which you'll give your challenges, I think it'd be much better if you explained the challenge as clearly as possible, and gave working example.

Here, for example, the number of "tee" in the word Steem may mean "how many words containing tee there are in the input", or "how many words that mean Steem (i.e. with different case) that also contain tee there are in the input". In other word, it's ambiguous - or it's just me having issues with trying to understand it.

Sort:  

If I were to expand on this challenge, I would be more specific, at least in the early challenges. That's one of the programmer's enemies. What does the person mean and what is the problem they're trying to solve? Often times when people ask programmers to make a certain program, they will only have a broad description of what they want. This is where software requirements come into play and you will have formal meetings with the clients. You will have to gather all the information required to make said app.

The input could be a string, array, hashmap, or even trees. The visual representation does not mean anything other than being human readable.

So what you asked was a great question that some programmer may ask. A good start :)

In this case, I mean how many times you see the word tee IN the main word steem given this input. The input is a set of words separated by a comma. You would parse out each word in the list and try to find a subword of tee. Keep doing this as you count the occurrences until they are no more words to parse out.

You will see its 4, but looking at the description I did say the word "steem" specifically and I counted "Steeem" which isn't the word "steem" now is it? So, the correct answer is 3. But as the description is broad and doesn't mention anything about the spelling. I would think that 3 or 4 can be the correct answers. So confusing!

So, in my challenges I will be very specfic in what the actual problem is. As well as correcting or clarify my challenge if needed.

Thanks for asking. This is why I want to do some challenges, to make sure I'm concise and as well as teaching people with mistakes they find in my wording or logic. Everyone wins. :D

Coin Marketplace

STEEM 0.16
TRX 0.13
JST 0.027
BTC 59226.54
ETH 2603.16
USDT 1.00
SBD 2.42