Question: 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!