Question: Write a function birth state () that takes as input the full name of a recent U.S president (as a string) and return his birth
Write a function birth state () that takes as input the full name of a recent U.S president (as a string) and return his birth state. You should use this dictionary to store the birth state for each recent president.
{ ' Barack Hussein Obama II ' : ' Hawaii ' ,
' George Walker Bush" : ' Connecticut ' ,
' William Jefferson Clinton ' : Arkansas ' ,
' Gorge Herbert Walker Bush ' : ' Massachussetts ' ,
' Ronald Wilson Regan' : 'Illinois' ,
' James Earl Carter, Jr ' : ' Georgia ' }
>>> birth state ( ' Ronald Wilson Reagan ' )
' Illinois '
Containers and Randomness ( Python)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
