Aug-26-2018, 04:06 PM
(This post was last modified: Aug-26-2018, 04:06 PM by TheMusicMan.)
Im still on my book and got stuck at this code.
![[Image: cQ0pua9.png]](https://i.imgur.com/cQ0pua9.png)
I tried moving the elif and else more left or right but it just changes the error then.
Any ideas i'm still newish at this but having trouble with making sure the (if, elif and else) are in the right places.
alien_0 = {'x_position': 0, 'y_poaition': 25, 'speed': 'medium'} print('original x-position: ' + str(alien_o['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']))Comes up with this
![[Image: cQ0pua9.png]](https://i.imgur.com/cQ0pua9.png)
I tried moving the elif and else more left or right but it just changes the error then.
Any ideas i'm still newish at this but having trouble with making sure the (if, elif and else) are in the right places.