time sleep( pause for little bit print backspaces to move the text cursor to the line' start print('\blen(barstr)end=''flush=true def getprogressbar(progresstotalbarwidth= ) """returns string that represents progress bar that has barwidth bars and has progressed progress amount out of total amount "" progressbar 'the progress bar will be string value progressbar +'[create the left end of the progress bar make sure that the amount of progress is between and total if progress total progress total if progress progress calculate the number of "barsto display numberofbars int((progress totalbarwidth progressbar +bar numberofbars add the progress bar progressbar +(barwidth numberofbarsadd empty space progressbar +']add the right end of the progress bar calculate the percentage complete percentcomplete round(progress total progressbar +str(percentcomplete'%add percentage add the numbers progressbar +str(progress'/str(total return progressbar return the progress bar string if the program is run (instead of imported)run the game if __name__ ='__main__' main(after entering the source code and running it few timestry making experimental changes to it on your ownyou can also try to figure out how to do the followingcreate one-line animation of spinner that alternates between the characters |/-and to produce rotating effect create program that can display scrolling marquee of text moving from left to right create one-line animation that displays set of four equal signs moving back and forth as single unitsimilar to the red scanning light on the robot car from the tv show knight rider or the cylon robot face from the tv show battlestar galactica progress bar