functions and branching this introduces two fundamental programming conceptsfunctions and branching we are used to functions from mathematicswhere we typically define function (xas some mathematical expression of xand then we can then evaluate the function for different values of xplot the curve ( )solve equations of the kind ( and so on similar function concept exists in programmingwhere function is piece of code that takes one or more variables as inputcarries out some operations using these variablesand produces output in return the function concept in programming is more general than in mathematicsand is not restricted to numbers or mathematical expressionsbut the general idea is exactly the same branchingor if-testsis another fundamental concept that exists in all common programming languages the idea is that decisions are made in the code based on the value of some boolean expression or variable if the expression evaluates to trueone set of operations is performedand if the expression is falsea different set of operations is such tests are essential for controlling the flow of computer program programming with functions we have already used number of python functions in the previous the mathematical functions from the math module are essentially the same as we are used to from mathematics or from pushing buttons on calculatorfrom math import sin( )*log(xadditionallywe used few non-mathematical functionssuch as len and range len(somelistfor in range( )(cthe author( sundnesintroduction to scientific programming with pythonsimula springerbriefs on computing