''' Purpose: introduce variable reassignment ---- ''' generation = 1 # first generation nbr_rabbits = 2 print( 'Generation: ', generation ) print( 'Number of rabbits:', nbr_rabbits ) reply = input( 'Enter when ready: ' ) # waits until user enters something print( reply ) # this is why it printed hocus pocus # So now we have set a variable reply to the value of the input statement # Whatever the user types into the console, it is stored in reply # and when we print reply, it prints the value of reply (the string "hocus pocus") # Python stops here and waits for user input to move on and go to the next lines. generation = 2 # next generation nbr_rabbits = 4 print( 'Generation: ', generation ) print( 'Number of rabbits:', nbr_rabbits ) # Arguments separated by commas have spaces between each argument outputted. # input("Type something! ") You can put anything between the input and it will # be in the output waiting for user input. # Does input do anything else other than pause the program? Yes! # input will display in the console whatever is inside the parantheses # and wait for user input to move on or act based on that input and # we'll see how to manipulate input later on. # Does input just respond to enter? no. you can put anything you want in there # IFFFFF the input doesn't care and just wants to move on which is # for the purposes of this assignment. input( 'Enter when ready: ' ) # waits until user enters something generation = 3 # next generation nbr_rabbits = 8 print( 'Generation: ', generation ) print( 'Number of rabbits:', nbr_rabbits ) input( 'Enter when ready: ' ) # waits until user enters something generation = 4 # next generation nbr_rabbits = 16 print( 'Generation: ', generation ) print( 'Number of rabbits:', nbr_rabbits ) input( 'Enter when ready: ' ) # waits until user enters something generation = 5 # next generation nbr_rabbits = 32 print( 'Generation: ', generation ) print( 'Number of rabbits:', nbr_rabbits )