""" Purpose: introduce assignment """ # initialize variables # = means assignment operator # take what's on the right and store it in the variable on the left # variable = value # take value and store that in a spot called variable # python asks computer for a frame (little bit of memory) and will track # all of your variables in here. it will keep track of where x is, what type of # information is stored there, and what value is there # once the program is done, all of the memory is reallocated. no one know's what # x is or where it was for the last program run # VARIABLE NAMES DO NOT HAVE QUOTES # assignment statements have targets and values # target = value # take the value, store it in the target # target will always be on left x = 10 # 10 is an integer y = x # oh look, an x! python is going to go find x and take the value we stored # set aside some space for this new variable, y # y = x, what's stored in x - replace it so this becomes # y = 10 print( "x:", x ) # label string followed by the variable, which gets the value print( "y:", y ) # you can print multiple things in a print statement, even different types # 'x' is a string with the character x in it, not our variable x # we put literals in "strings" # the plus only works when we have the same data type # the comma lets us put any things together separated by a space