ME 3350 -Engineering Computing HW 4 Submission: Submit your final Python code(s) on CANVAS. 1. The text file “HW4_StatesANC.txt" contains the name, abbreviation, nickname, and capital of each state in the United States in alphabetical order. Write a program that displays the states (and their capitals) for which the name of the state and its capital begin with the same letter. Instruction: Use for loop to access the lines of the text file. Your program output should look as follows: Dover, Delaware Honolulu, Hawaii Indianapolis, Indiana Oklahoma City, Oklahoma >>> 2. The text file "HW4_StatesANC.txt" contains the name, abbreviation, nickname, and capital of each state in the United States in alphabetical order. Write a program that requests the name of a state as input and displays the abbreviation, nickname, and capital of the state. Example Input and Output: Enter the name of a state: Utah Abbreviation: UT Nickname: Beehive State Capital: Salt Lake City >>>

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Topic Video
Question

Hi this a txt.file below please write a python code that uses same instruction with the picture file below

Alabama,AL,Cotton State,Montgomery
Alaska,AK,The Last Frontier,Juneau
Arizona,AR,Grand Canyon State,Phoenix
Arkansas,AK,Land of Opportunity,Little Rock
California,CA,Golden State,Sacramento
Colorado,CO,Centennial State,Denver
Connecticut,CT,Constitution State,Hartford
Delaware,DE,Diamond State,Dover
Florida,FL,Sunshine State,Tallahassee
Georgia,GA,Peach State,Atlanta
Hawaii,HI,Aloha State,Honolulu
Idaho,ID,Gem State,Boise
Illinois,IL,Prairie State,Springfield
Indiana,IN,Hoosier State,Indianapolis
Iowa,IA,Hawkeye State,Des Moines
Kansas,KS,Sunflower State,Topeka
Kentucky,KY,Bluegrass State,Frankfort
Louisiana,LA,Pelican State,Baton Rouge
Maine,ME,Pine Tree State,Augusta
Maryland,MD,Old Line State,Annapolis
Massachusetts,MA,Bay State,Boston
Michigan,MI,Wolverine State,Lansing
Minnesota,MN,Gopher State,Saint Paul
Mississippi,MI,Magnolia State,Jackson
Missouri,MS,Show Me State,Jefferson City
Montana,MT,Treasure State,Helena
Nebraska,NE,Cornhusker State,Lincoln
Nevada,NV,Silver State,Carson City
New Hampshire,NH,Granite State,Concord
New Jersey,NJ,Garden State,Trenton
New Mexico,NM,Land of Enchantment,Santa Fe
New York,NY,Empire State,Albany
North Carolina,NC,Tar Heel State,Raleigh
North Dakota,ND,Flickertail State,Bismark
Ohio,OH,Buckeye State,Columbus
Oklahoma,OK,Sooner State,Oklahoma City
Oregon,OR,Beaver State,Salem
Pennsylvania,PA,Keystone State,Harrisburg
Rhode Island,RI,Little Rhody,Providence
South Carolina,SC,Palmetto State,Columbia
South Dakota,SD,Coyote State,Pierre
Tennessee,TN,Volunteer State,Nashville
Texas,TX,Lone Star State,Austin
Utah,UT,Beehive State,Salt Lake City
Vermont,VT,Green Mountain State,Montpelier
Virginia,VA,Old Dominion,Richmond
Washington,WA,Evergreen State,Olympia
West Virginia,WV,Mountain State,Charleston
Wisconsin,WI,Badger State,Madison
Wyoming,WY,Equality State,Cheyenne

ME 3350 -Engineering Computing
HW 4
Submission: Submit your final Python code(s) on CANVAS.
1. The text file "HW4_StatesANC.txt" contains the name, abbreviation, nickname, and capital
of each state in the United States in alphabetical order. Write a program that displays the
states (and their capitals) for which the name of the state and its capital begin with the same
letter.
Instruction: Use for loop to access the lines of the text file. Your program output should look as
follows:
Dover, Delaware
Honolulu, Hawaii
Indianapolis, Indiana
Oklahoma City, Oklahoma
>>>
2.
The text file "HW4_StatesANC.txt" contains the name, abbreviation, nickname, and capital
of each state in the United States in alphabetical order. Write a program that requests the
name of a state as input and displays the abbreviation, nickname, and capital of the state.
Example Input and Output:
Enter the name of a state: Utah
Abbreviation: UT
Nickname: Beehive State
Capital: Salt Lake City
>>>
Transcribed Image Text:ME 3350 -Engineering Computing HW 4 Submission: Submit your final Python code(s) on CANVAS. 1. The text file "HW4_StatesANC.txt" contains the name, abbreviation, nickname, and capital of each state in the United States in alphabetical order. Write a program that displays the states (and their capitals) for which the name of the state and its capital begin with the same letter. Instruction: Use for loop to access the lines of the text file. Your program output should look as follows: Dover, Delaware Honolulu, Hawaii Indianapolis, Indiana Oklahoma City, Oklahoma >>> 2. The text file "HW4_StatesANC.txt" contains the name, abbreviation, nickname, and capital of each state in the United States in alphabetical order. Write a program that requests the name of a state as input and displays the abbreviation, nickname, and capital of the state. Example Input and Output: Enter the name of a state: Utah Abbreviation: UT Nickname: Beehive State Capital: Salt Lake City >>>
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Instruction Format
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education