functionsscopingand abstraction when the code in figure is runit will print try doggod ispal called with doggod ispal called with oggo ispal called with gg ispal called with about to return true from base case about to return true for gg about to return true for oggo about to return true for doggod true try dogood ispal called with dogood ispal called with ogoo ispal called with go about to return false for go about to return false for ogoo about to return false for dogood false divide-and-conquer is very old idea julius caesar practiced what the romans referred to as divide et impera (divide and rulethe british practiced it brilliantly to control the indian subcontinent benjamin franklin was well aware of the british expertise in using this techniqueprompting him to say at the signing of the declaration of independence"we must all hang togetheror assuredly we shall all hang separately global variables if you tried calling fib with large numberyou probably noticed that it took very long time to run suppose we want to know how many recursive calls are madewe could do careful analysis of the code and figure it outand in we will talk about how to do that another approach is to add some code that counts the number of calls one way to do that uses global variables until nowall of the functions we have written communicate with their environment solely through their parameters and return values for the most partthis is exactly as it should be it typically leads to programs that are relatively easy to readtestand debug every once in whilehoweverglobal variables come in handy consider the code in figure