Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

So Igot the code down but its producing a bunch of characters and theanswers are right just that it need to output just the city

So Igot the code down but its producing a bunch of characters and theanswers are right just that it need to output just the city orspecial characters that the user asks for. this code produces abu try: \( f= \) open ("cities.txt", " \( r \) ", encoding = "cp1252") lines \( =f \).readlines () for line in lines: parts \( =1 \) ine. \( \operatorname{strip}() \cdot \operatorname{split}\left({ }^{\p 1 answer

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Systems analysis and design

Authors: Alan Dennis, Barbara Haley Wixom, Roberta m. Roth

5th edition

978-1118057629, 1118057627, 978-111880817

More Books

Students also viewed these Programming questions