Retired
Summation of Square & Cube of an array (retired)
Loading description...
Fundamentals
Numbers
Data Types
Arrays
Arithmetic
Mathematics
Algorithms
Logic
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
There's nothing new in summing list elements with a trivial callback.
the description is unclear about the step where one's supposed to apply the
abs
I have mentioned in the description that the final solution needs to be positive.
Rounding issues are still not solved, just changed:
Take a look at the (invalid) solutions. Or maybe just ask for
x
digits rouning. Or something.Use round function upto 4 digits I have mentioned in the description.
how about use
approx_equal
with appropriate epsilon?Fine.
snake_case
, notPascalCase
function name is still non-pythonic
So can you please suggest me with a good pythonic name.
SquareCube
isPascalCase
square_cube
issnake_case
Ohh I got it ! I was thinking of something else. But too thanks for help.
Rounding issues:
Why not just use integers?
Thanks for mentioning the issues ,I have fixed that.
I have mentioned in the description to use predefined function for rounding off upto 4 digits.
needs random tests