Aug-26-2018, 05:28 PM
Sorry, my bad. It was just lines 8-12. line 7 was OK. Note also there is misspelled variable name on line 2
alien_0 = {'x_position': 0, 'y_poaition': 25, 'speed': 'medium'} print('original x-position: ' + str(alien_0['x_position'])) #Move the alien to the right. #Determine how far to move the alien based on its current speed. if alien_0['speed'] =='slow': x_increment = 1 elif alien_0['speed'] == 'medium': x_increment = 2 else: # This must be a fast alien x_increment = 3 # The new position is the old position plus the increment. alien_0['x_position'] = alien_0['x_position'] + x_increment print('new x_position: ' +str(alien_0['x_position']))
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs