Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
With a quick glance at the function and parameter name, is it not obvious that the function takes a year and returns the century it is in?
This comment is hidden because it contains spoiler information about the solution
crazy, I did this same exact solution and there were a few that failed still
Why do you say not best practice?
Damn. Thank you B1ts!
Please don't force users to round values, it is a bad practice.
Use proper testing of floating point numbers instead.
In this case there is even some ambiguity on where to use rounding (taking the square root can produce non-rational numbers)
I think a good rule for rounding is to use it only to display values with a reasonable number of digits.
Rounding values without apparent need is considered bad practice.
I assume that these challenges have educational relevance for many participants.
My suggestion: drop the requirement to round the results and use proper testing methods instead
Parameter naming is wrong, should be "message" instead of "greetings"
Also the function should be called "contains_greetings"
This is clever but definitely not best practice
Came here to report the same.
Revised an APPROVED
The note about single digit numbers being automorphic should be removed, as it is contradicted by tests as well as mathematical definition