help here with python below prigram

Sigchi4life
Category:
Computer Science
Price: $30 USD

Question description

For this assignment, you'll be working with strings. You will be writing a program to convert National Weather Service warnings into a more readable form. For instance,one warninglooks like this:

157 PM EST MON NOV 2 2015 
 
...A FLOOD WARNING REMAINS IN EFFECT UNTIL 830 PM EST MONDAY FOR 
HALL...BANKS...CLAYTON...GWINNETT...FAYETTE...JACKSON...BARROW... 
FORSYTH...DEKALB AND FULTON COUNTIES... 
 
AT 145 PM EST...DOPPLER RADAR AND AUTOMATED RAIN GAUGES INDICATE 
ONLY PATCHY LIGHT RAIN CONTINUES OVER THE WARNED AREA. STORM TOTAL 
RAINFALL AMOUNTS OF 3 TO 6 INCHES HAVE OCCURRED SINCE SATURDAY NIGHT. 
NO SIGNIFICANT ADDITIONAL RAINFALL IS EXPECTED OVER THE WARNED 
AREA FOR THE REST OF THIS AFTERNOON AND EVENING. 
NUMEROUS STREAMS...CREEKS AND SMALL RIVERS EXPERIENCED MINOR 
FLOODING TODAY. THE BIG CREEK FROM CUMMING THROUGH ALPHARETTA TO 
ROSWELL...SUWANEE CREEK NEAR SUWANEE...SWEETWATER CREEK NEAR LILBURN 
 
...THE LOWER PORTION OF NANCY CREEK NEAR ATLANTA AND THE UPPER 
PORTION OF THE ALCOVY RIVER SOUTHEAST OF LAWRENCEVILLE REMAIN IN 
FLOOD.

As you can see, all of the text in this warning is upper case. You will need to convert this text so that it follows typical sentence capitalization rules. In other words, the first character of the first word of each sentence should be capitalized. However, you will need to make sure that you don't capitalize the first character after ellipses (the...things) since these are used in place of commas.

You can find additional weather warnings at this website:http://alerts.weather.gov/cap/us.php?x=1

Your program should read from a file namedwarning.txtand write output to the screen usingprint.

After conversion, the warning text should look like this:

157 pm est mon nov 2 2015 
 
...A flood warning remains in effect until 830 pm est monday for 
hall...banks...clayton...gwinnett...fayette...jackson...barrow... 
forsyth...dekalb and fulton counties... 
 
At 145 pm est...doppler radar and automated rain gauges indicate 
only patchy light rain continues over the warned area. Storm total 
rainfall amounts of 3 to 6 inches have occurred since saturday night. 
No significant additional rainfall is expected over the warned 
area for the rest of this afternoon and evening. 
Numerous streams...creeks and small rivers experienced minor 
flooding today. The big creek from cumming through alpharetta to 
roswell...suwanee creek near suwanee...sweetwater creek near lilburn 
 
...the lower portion of nancy creek near atlanta and the upper 
portion of the alcovy river southeast of lawrenceville remain in 
flood.

You have the option of attempting extra credit for this assignment. As you can probably tell, there are a number of elements in the warning that we aren't properly taking care of. Ellipses (...) in the middle of a sentence typically represent a comma. Some words, such as PM, EST, and Monday, should not be lower-cased, and should instead be either all uppercase or title-cased. Finally, there are a number of proper nouns in these warnings that should be properly capitalized. Extra credit will be awarded based on how well you are able to perform these transformations (along with any other transformations you think would be appropriate), with a maximum of five extra points being awarded.

As an example, some of the modifications you could perform would make the message looks like this:

157 PM EST Mon Nov 2 2015 
 
...A flood warning remains in effect until 830 PM EST Monday for 
hall, banks, clayton, gwinnett, fayette, jackson, barrow, 
forsyth, dekalb and fulton counties... 
 
At 145 PM EST, doppler radar and automated rain gauges indicate 
only patchy light rain continues over the warned area. Storm total 
rainfall amounts of 3 to 6 inches have occurred since Saturday night. 
No significant additional rainfall is expected over the warned 
area for the rest of this afternoon and evening. 
Numerous streams, creeks and small rivers experienced minor 
flooding today. The big creek from cumming through alpharetta to 
roswell, suwanee creek near suwanee, sweetwater creek near lilburn 
 
...the lower portion of nancy creek near atlanta and the upper 
portion of the alcovy river southeast of lawrenceville remain in 
flood.

Tutor Answer

(Top Tutor) Daniel C.
(997)
School: Boston College
PREMIUM TUTOR
Studypool has helped 1,244,100 students
Ask your homework questions. Receive quality answers!

Type your question here (or upload an image)

1824 tutors are online

Brown University





1271 Tutors

California Institute of Technology




2131 Tutors

Carnegie Mellon University




982 Tutors

Columbia University





1256 Tutors

Dartmouth University





2113 Tutors

Emory University





2279 Tutors

Harvard University





599 Tutors

Massachusetts Institute of Technology



2319 Tutors

New York University





1645 Tutors

Notre Dam University





1911 Tutors

Oklahoma University





2122 Tutors

Pennsylvania State University





932 Tutors

Princeton University





1211 Tutors

Stanford University





983 Tutors

University of California





1282 Tutors

Oxford University





123 Tutors

Yale University





2325 Tutors