>> def check_values(a, b):
>> if all(number >= 0 for number in range(a, b)):
>> return True
>> else:
>> raise ValueError("negative number")
>>
>> And:
>> def PositiveCalculator(a, b):
>> if a > 0 and b > 0:
>> return a + b
>> else:
>> raise ValueError("negative number")
>
>
> So zero is now considered a negative number?
Thanks ;-)
if a >= 0 and b >= 0
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor