a) Differentiate between subroutines and functions.
Ans: Function always returns a result or value to the code statement that called it while a subroutine does not. Sub starts with keyword sub and end with keyword end sub. And function with function.end function. In function result always assigned to the name of function .In subroutine we used to call the result.
b) Differentiate between procedure level and script level variables.
Ans : procedure level variables are local to the procedure .while script level variable are global to the whole program .