I would use the state as the key just in case there could be two capitol cities with the same name:
[php]dic = {'mississippi': 'jackson', 'arizona': 'phoenix', 'iowa': 'desmoines',
'massachuettes': 'boston', 'michigan': 'lansing', 'virginia': 'richmond',
'oregon': 'salem', 'hawaii': 'honolulu', 'nebraska': 'lincoln',
'indiana': 'indianapolis', 'ohio': 'columbus', 'illnois': 'springfield'}
while True:
state = raw_input("Enter the name of a state (enter quit to exit): ").lower()
if state == 'quit':
break
try:
print "The capitol city of %s is %s" % (state.capitalize(), dic[state].capitalize())
except KeyError:
print "%s is not in the dictionary!" % state.capitalize()
[/php]