Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program that uses string Indexing to generate the two character abbreviation for all fifty states. Your program should provide clear instructions to give

Write a program that uses string Indexing to generate the two character abbreviation for all fifty states. Your program should provide clear instructions to give the User an option to either key in a state of their choice to return the correct abbreviation or to print a complete list of all state names followed by their correct abbreviation (see below). Note that although all state abbreviations begin with the first letter of their respective state name, the second later varies. Experiment using both positive and negative index values in your program. Use the anyVariable.upper() method to capitalize your abbreviations (USE PYTHON CODE)

Alabama - AL Hawaii - HI Massachusetts - MA New Mexico - NM South Dakota - SD
Alaska - AK Idaho - ID Michigan - MI New York - NY Tennessee - TN
Arizona - AZ Illinois - IL Minnesota - MN North Carolina - NC Texas - TX
Arkansas - AR Indiana - IN Mississippi - MS North Dakota - ND Utah - UT
California - CA Iowa - IA Missouri - MO Ohio - OH Vermont - VT
Colorado - CO Kansas - KS Montana - MT Oklahoma - OK Virginia - VA
Connecticut - CT Kentucky - KY Nebraska - NE Oregon - OR Washington - WA
Delaware - DE Louisiana - LA Nevada - NV Pennsylvania - PA West Virginia - WV
Florida - FL Maine - ME New Hampshire - NH Rhode Island - RI Wisconsin - WI
Georgia - GA Maryland - MD New Jersey - NJ South Carolina - SC Wyoming - WY

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Spatial And Temporal Databases 11th International Symposium Sstd 2009 Aalborg Denmark July 8 10 2009 Proceedings Lncs 5644

Authors: Nikos Mamoulis ,Thomas Seidl ,Kristian Torp ,Ira Assent

2009th Edition

3642029817, 978-3642029813

More Books

Students also viewed these Databases questions

Question

2. Are you varying your pitch (to avoid being monotonous)?

Answered: 1 week ago

Question

3. Are you varying your speaking rate and volume?

Answered: 1 week ago