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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started