|
For Homework 3, exercise 3, the specification is as follows:
My question is, do we have to handle an empty list input case ? (I mean, do we assume the list contains at least one element ?) |
|
I think the code should return 0 if it is empty [] but return the biggest if not empty. I have never heard of what you guys mean by the product of two zeros is 1. 1
Not the product, the exponentiation. 0 raised to the 0-th power is 1. @Eenvincible - I'm talking about HW 3.3, not 3.4 |
|
If we are supposed to handle it, what should the output be? Edit: now returning 1. Thanks @larry96 |
|
I have the same question, slothmaster. I currently have it returning 0, but would like some clarification. |
@PeterUdacity : as per standard english usage and mathematical meaning, shouldn't the procedure be called list_product instead ?