note python review use of main routine in the textwe only use main(function when the driver module contains multiple functions as illustrated by the diceroll py program below if the driver module does not contain multiple functionsas illustrated by the driver py modulewe omit the main(function and list all executable statements at the file level file level are executed during the loading process if function is called at file level before the function has been definedas illustrated in the following code segmentthe interpreter does not know about the function and has no way of executing itcallit def callitnum )return pownum the order in which functions are listed within file is not importantbut the order of executable statements at file level is when subdividing program into various functions using top-down designit is good programming practice to place all executable statements within functions and to specify one function as the driveras illustrated in the following code segment with this approachthe driver functionwhich is commonly named main(due to that name being used in other languagescan be defined first with the remaining definitions following it at the bottom of the filea single file-level statement (not including constant variablesis used to call the driver function diceroll py simulate the rolling of two dice from random import minimum number of sides on die min_sides our very own main routine for top-down design def main()print"dice roll simulation numsides intinput("how many sides should the die have"if numsides min_sides numsides min_sides value rolldicenumsides print"you rolled "value simulate the rollowing of two nsided dice def rolldicensides )die randint nsides die randint nsides return die die call the main routine which we defined first main(