''' Purpose: deepen variable manipulation understanding ''' # first generation generation = 1 nbr_rabbits = 2 #generation = generation + 1 #nbr_rabbits = nbr_rabbits * 2 # Any red stuff is usually a syntax error, but can be other kinds of error like this traceback error. print( 'Generation: ', generation ) # An identifier ends when it sees a character that is not a letter or a number. print( 'Rabbits: ', nbr_rabbits ) # Identifiers in good looking code end in a space. input() # next generation generation = generation + 1 # Python evaluates the right side of the equals sign first. Right associative nbr_rabbits = nbr_rabbits * 2 # This works because = assigns in programming. It is not the traditional algebraic equals. print( 'Generation: ', generation ) print( 'Rabbits: ', nbr_rabbits ) input() # next generation generation = generation + 1 # You could do this faster, but you haven't learned it yet. We will get there. :) nbr_rabbits = nbr_rabbits * 2 print( 'Generation: ', generation ) print( 'Rabbits: ', nbr_rabbits ) input() # next generation generation = generation + 1 nbr_rabbits = nbr_rabbits * 2 print( 'Generation: ', generation ) print( 'Rabbits: ', nbr_rabbits ) input() # next generation generation = generation + 1 nbr_rabbits = nbr_rabbits * 2 print( 'Generation: ', generation ) print( 'Rabbits: ', nbr_rabbits ) input() # Whats in the bottom window is a description of the output. # It does not necessarily have the same number of lines as the actual program.