first, you could have named the variables x1, x2, y1, y2 to make it more readable and second your solution doesn't solve the problem. I don't know how you submitted the solution, but it is just wrong, like @mmib already said. You return "5.0" but need to return just "5"

Confused, if i try this in Jupyter with a test case ([1,2,3],5) i get an error 'square_sum() takes 1 positional argument but 2 were given'. How do the test cases here work?

One liners may look impressive but they often aren't easily readable. My solution is identical to this one, except I assigned a couple variables to make it more easily understandable.

Also, there is no point on counting the length of digits for every digit.

Indeed ;). However the test is passed anyway since it check if the difference between your result and the expected result is < 1. But to properly answer the question (which is always better) you should indeed import math and apply the floor function to the result.

I learned a lot from this answer!! i had some of the parts but this clarified so much.

first, you could have named the variables x1, x2, y1, y2 to make it more readable and second your solution doesn't solve the problem. I don't know how you submitted the solution, but it is just wrong, like @mmib already said. You return "5.0" but need to return just "5"

Awesome!

beautiful

It should be consolidated with the solutions below (x*x)

Jenny can thank us later! lol

Thanks B1ts! i see the error in what i was doing - the test cases show what the sum should be, mistakenly thought that was an input.

Why are you passing in an extra 5? You're calling it with an array and a number, but it only expects an array.

Confused, if i try this in Jupyter with a test case ([1,2,3],5) i get an error 'square_sum() takes 1 positional argument but 2 were given'. How do the test cases here work?

whoops

It is called "List Comprehension"

You can easily learn it

One liners may look impressive but they often aren't easily readable. My solution is identical to this one, except I assigned a couple variables to make it more easily understandable.

Also, there is no point on counting the length of digits for every digit.

how is that correct if the string will be "5.0" instead of "5"?

and then how can i call the function and see the sum after squared?

Indeed ;). However the test is passed anyway since it check if the difference between your result and the expected result is < 1. But to properly answer the question (which is always better) you should indeed import math and apply the floor function to the result.

## Loading more items...