python-workout icon indicating copy to clipboard operation
python-workout copied to clipboard

Files for the Python Workout book

Results 20 python-workout issues
Sort by recently updated
recently updated
newest added

The statement of the exercise indicates: "Number of words (separated by whitespace)", however the last word of each line is separated by a '\n' instead of a ' ', therefore...

My suggestion: ```python def most_repeating_vowel_count(word): vowels = 'aieouAIEOU' vowel_dict = Counter({letter: count for letter, count in Counter(word).items() if letter in vowels}) if not vowel_dict: # if there are no vowels...

I think you are calculating the MD5 of the filename string... not of the content of the file... ``` for one_filename in glob.glob(f'{dirname}/*'): try: m = hashlib.md5() m.update(one_filename.encode()) output[one_filename] =...

would moving the if statement ahead of the for-loop would prevent the loop from checking the class attribute multiple times?

As a result, if the word we check is: Octopus, then output should be Uboctubopubus, not Octubopubus. I think the code can be something like this. ``` def ubbi_dubbi(string): output...

https://github.com/reuven/python-workout/blob/master/ch01-numbers/e03b1_before_after.py "preceding the d**E**cimal point"

https://github.com/reuven/python-workout/blob/d9ec04ca47aa92fa5d013610dd3bd0dbf8903a8f/ch01-numbers/e01b3_guess_word.py#L19 The user input is a word. We are guessing the word so we don't need to convert the user input into the integer.

Hi @reuven , very nice book, I'm really enjoying doing the "beyond the exercises". When you asked for writing the "enumerate" class passing an optional argument, did you mean to...

The solution on github returns sum of old and even numbers which is not in line with the idea in the book. The code can be like: ``` def ex9_ch4(list):...

Text problem says: Write a function that takes a list or tuple of numbers. Return a two-element list, containing (respectively) the sum of the even-indexed numbers and the sum of...