Source code documentation

Examples module

Module with exercises for the workshop

Examples module API


Return the closest odd number to n

Parameters:n – An integer
Returns:The same integer if it is odd. The next integer otherwise
Return type:int
Raises ValueError:
 If the parameter is not inteer

Sum all elements in list

Parameters:l – List containing elements to sum
Returns:The sum of all elements in the list
Return type:int
Raises ValueError:
 If there is any non-integer element on the list