''' Purpose: demonstrate the end optional parameter for print() ''' import time SECONDS_PER_MIN = 60 NBR_SECONDS_TO_PAUSE = 2.5 # time.sleep() takes in time in seconds. It's just a default thing. # So if you want mins just multiply our seconds per min # to get the time you want in minutes. print( 'Wa-Hoo-Wa' ) print( 'Rah-Rah-Rah' ) print() time.sleep( NBR_SECONDS_TO_PAUSE ) print( 'Wa-Hoo-Wa', end='!!!' ) print( 'Rah-Rah-Rah' ) print() time.sleep( NBR_SECONDS_TO_PAUSE ) print( 'Wa-Hoo-Wa', end=' !!! ' ) print( 'Rah-Rah-Rah' ) print() time.sleep( NBR_SECONDS_TO_PAUSE ) for ch in 'tattarrattat' : print( ch, end='-' ) print() print() time.sleep( NBR_SECONDS_TO_PAUSE ) for ch in 'saippuakivikauppias' : print( ch ) print() print() # We want to show you the functionality of end= # end= allows you to print multiple things on one line # So when we run through the sequence, we can attach # and end = " (whatever we want) " and it will # print that out and print everything on the same line. # So maybe you could try: # print("CS", end = "") # print("1112") Notice it'll be on the same line! # You CAN print it all on one line and just print # out the word but we wanna show you how to # print a bunch of things on one line.