Skip to content

BeatriceHN-A4#61

Open
BeatriceHN wants to merge 1 commit into
mainfrom
BeatriceHN-A4
Open

BeatriceHN-A4#61
BeatriceHN wants to merge 1 commit into
mainfrom
BeatriceHN-A4

Conversation

@BeatriceHN

Copy link
Copy Markdown
Collaborator

ready for review

@BeatriceHN BeatriceHN changed the title Uploading A4 BeatriceHN-A4 May 6, 2026
@the-other-thanos

Copy link
Copy Markdown
Collaborator

Code works and produces nice outputs for the test files used.
Your code is very simple and easy to follow, the output is also nicely formatted with the textwrapper. The way you split your functions separates the two cases, words and characters very nicely and makes for a clean script that is easy to read. I am a bit torn on it though since the functions are fairly repetitive and could be adapted to handle both cases I think, but thats a matter of taste.
I like your approach of allowing the user to specify the max length and it would be even nicer if the output was printed in real time so that the user could see they are stuck in a cycle. It's funny reading your warning about running indefinitely while hearing your laptop fight for its life haha.
Last but not least, <3 the LotR text file! Well done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants