Question: What am I doing wrong? I cant figure it out Write a program that requests the name of a state as input and displays the
on 3.7.2 (3.7.2:9a3ffc8492, Dec 24 2018, e2:44:43) ng 6.e (clang-600.0.57)] on darwin def mainO: #create progran that gives you the states abbreviation, nickname and capita state-input("Enter the name of state infile open("StotesANC.txt"r) "help, copyright"credits" or "licenseOf for more information. RESTART: /Users/luis/Desktop/Python /State.py.............- for line in infile: er the nome of a stote:Nevado reviation: WY knome: Equality State ital: Cheyenne dato line.splitc state dotetejte:1 if doto[1] startswith(state): print ("abbreviation:dato[1]) print("Nicknome:, dato2)) printC Copital:doto[31) infile close) naino on 3.7.2 (3.7.2:9a3ffc8492, Dec 24 2018, e2:44:43) ng 6.e (clang-600.0.57)] on darwin def mainO: #create progran that gives you the states abbreviation, nickname and capita state-input("Enter the name of state infile open("StotesANC.txt"r) "help, copyright"credits" or "licenseOf for more information. RESTART: /Users/luis/Desktop/Python /State.py.............- for line in infile: er the nome of a stote:Nevado reviation: WY knome: Equality State ital: Cheyenne dato line.splitc state dotetejte:1 if doto[1] startswith(state): print ("abbreviation:dato[1]) print("Nicknome:, dato2)) printC Copital:doto[31) infile close) naino
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
