Jun-26-2020, 05:54 PM
Your program requires a lot of overhead because you are converting your string into lists of substrings unnecessarily, and also creating a dictionary that you don't need. Keep in mind that you don't need to store the values you are counting, you just need to count them and store that value. Also, don't forget that a string behaves like a list, in that you can iterate through it and use indexes with it.
With your current code, try your "BANANA" test case and have your subsConsonant() and subsVowels() functions print the length of the list they are returning. Notice anything about the length of the list returned by subsConsonant() and how it correlates to the player's scores?
I can think of one other hint to share, but it might make the solution too obvious. Let me know if you are still stuck.
With your current code, try your "BANANA" test case and have your subsConsonant() and subsVowels() functions print the length of the list they are returning. Notice anything about the length of the list returned by subsConsonant() and how it correlates to the player's scores?
I can think of one other hint to share, but it might make the solution too obvious. Let me know if you are still stuck.