Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need help with this problem: need help writing a program that uses regular expressions to extract the following information: 1. California 2. Delaware 3. Texas

Need help with this problem:

need help writing a program that uses regular expressions to extract the following information:

1. California

2. Delaware

3. Texas

4. Arizona

5. Oregon

6. Maryland

7. Pennsylvania

8. Utah

9. Connecticut

10. Vermont

https://en.wikipedia.org/wiki/Delaware.

a) The political party alliance of the Governor for each state (Democratic, Republican

or the Independent party). This information can be found in the Wikipedia page for

each state beside the name of the Governor. Your output can return either D or

Democratic to signify the Democratic party and likewise for the other parties.

b) The gross state product for each state. Your output should contain only the dollar

amount.

The output of your program should be a TSV file where each new line/row corresponds to

a state. The first column should be the name of the state name, the second column should

be the political party of the state's Governor and the third should be the gross state product

(if any). (Note: You can use libraries/packages in your program, but regular expression

should be used to capture the political party and the gross state product.)

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

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions