You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey,
Just recently I got stuck on the Wordy exercise due to what seems like some quite arbitrary error requirements.
Largely the syntax of a correctly formed sentence seems to match the following regex:
^What is( (\d+ [+-*/]))* \d+?$
How come a value like "Who is the President of the United States?" is supposed to raise ValueError("unknown operation") when the syntax of the whole sentence mismatches a correctly formed question. It seems like a ValueError("syntax error") would be more fitting here.
Additionally we could argue the same for the "What is 52 cubed?". You could pose this question in a way that aligns with the syntax more using a statement like "What is 52 to power of 2". This way we could keep the syntax like and avoid having to use so many exceptions.
The text was updated successfully, but these errors were encountered:
At Exercism we use our Community Forum, not GitHub issues, as the primary place for discussion. That allows maintainers and contributors from across Exercism's ecosystem to discuss your problems/ideas/suggestions without them having to subscribe to hundreds of repositories.
This issue will be automatically closed. Please use this link to copy your GitHub Issue into a new topic on the forum, where we look forward to chatting with you!
If you're interested in learning more about this auto-responder, please read this blog post.
Hey,
Just recently I got stuck on the Wordy exercise due to what seems like some quite arbitrary error requirements.
Largely the syntax of a correctly formed sentence seems to match the following regex:
^What is( (\d+ [+-*/]))* \d+?$
How come a value like "Who is the President of the United States?" is supposed to raise ValueError("unknown operation") when the syntax of the whole sentence mismatches a correctly formed question. It seems like a ValueError("syntax error") would be more fitting here.
Additionally we could argue the same for the "What is 52 cubed?". You could pose this question in a way that aligns with the syntax more using a statement like "What is 52 to power of 2". This way we could keep the syntax like and avoid having to use so many exceptions.
The text was updated successfully, but these errors were encountered: