miscellaneous topics iii one nice use of the exec function is to let program' user define math functions to use while the program is running here is the code to do thats input'enter function'exec'def ( )return si have used this code in graph plotting program that allows users to enter equations to be graphedand have used it in program where the user can enter function and the program will numerically approximate its roots you can use exec to have your program generate all sorts of python code while it is running this allows your program to essentially modify itself while it is running note in python exec is statementnot functionso you may see it used without parentheses in older code security issue the eval and exec functions can be dangerous there is always the chance that your users might input some code that could do something dangerous to the machine they could also use it to inspect the values of your variables (which could be bad iffor some reasonyou were storing passwords in variablesoyou will want to be careful about using these functions in code where security is important one option for getting input without eval is to do something like thisnum int(input'enter number')this assumes num is an integer use float or list or whatever is appropriate to the data you are expecting enumerate and zip the built-in enumerate function takes an iterable and returns new iterable consisting of pairs ( ,xwhere is an index and is the corresponding element from the iterable for examples 'abcde for ( ,xin enumerate( )print( + the object returned is something that is like list of pairsbut not exactly the following will give list of pairslist(enumerate( )