We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.

You can't just say "Read the question properly". He said he doesn't understand the syntax of the question.

This is a type of mathematic short-hand that not all of us understand. I for one don't even know what this short-hand is called or I'd look it up myself.

Thank you for the follow-up shashank21j, your revision to the statement has been helpful, but I still have some questions about the way the question is worded and why.

1.Why must i+j+k not be equal to N and does this mean it can be greater than N?

2.Please define "lexicographic increasing order"

I for one agree that list comprehension in python is a fairly simple subject, the crux of this problem for me however, is bridging the communication gap/understanding the essance of the problem you're asking.

Many people who use your site are self taught in coding and do not have a formal discrete mathematics background.

i + j + k != N is just an added condition in this problem so you can use 1 if statement inside your list compehension syntax. It can be greater than N as long as i, j and k are in their respective limits.

Lexicographic order is sorted order where 1, 1, 1 comes before 1, 1, 2 and 2, 1, 2 comes before 2, 2, 1 etc. etc.

Shouldn't the statement include that X,Y,Z are integers that are possible maximums? It is a fairly important point no? For example dimensions of 2,2,2 given the statement as it currently is, means there is only 1 possible cube with 8 coordinates.

Where as if we said that 2 is the max integer value for X,Z,Y , we can have more than 1 possible cuboid. For example a 1,1,2 cuboid.

## List Comprehensions

You are viewing a single comment's thread. Return to all comments →

You can't just say "Read the question properly". He said he doesn't understand the syntax of the question.

This is a type of mathematic short-hand that not all of us understand. I for one don't even know what this short-hand is called or I'd look it up myself.

Try now, I have updated the statement :)

Thank you for the follow-up shashank21j, your revision to the statement has been helpful, but I still have some questions about the way the question is worded and why.

1.Why must i+j+k not be equal to N and does this mean it can be greater than N?

2.Please define "lexicographic increasing order"

I for one agree that list comprehension in python is a fairly simple subject, the crux of this problem for me however, is bridging the communication gap/understanding the essance of the problem you're asking.

Many people who use your site are self taught in coding and do not have a formal discrete mathematics background.

i + j + k != N is just an added condition in this problem so you can use 1 if statement inside your list compehension syntax. It can be greater than N as long as i, j and k are in their respective limits.

Thanks again shashank21j! :)

Shouldn't the statement include that X,Y,Z are integers that are possible maximums? It is a fairly important point no? For example dimensions of 2,2,2 given the statement as it currently is, means there is only 1 possible cube with 8 coordinates.

Where as if we said that 2 is the max integer value for X,Z,Y , we can have more than 1 possible cuboid. For example a 1,1,2 cuboid.