Skip to content

Latest commit

 

History

History
58 lines (30 loc) · 581 Bytes

Ch6.md

File metadata and controls

58 lines (30 loc) · 581 Bytes
alien_0 = {'color': 'green', 'points' : 5}
print(alien_0['color'])
print(alien_0['points'])
green
5

Working with Dictionaries

new_points = alien_0['points']
print("Your new point is "+ str(new_points) + " points!")
Your new point is 5 points!
alien_0 = {'x-position': 5, 'y-position': 10}
alien_0['color'] = 'green'
alien_0['points'] = 10
alien_0
{'color': 'green', 'points': 10, 'x-position': 5, 'y-position': 10}