Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This Exercise involves pyton 3.7 using IDLE The cities.txt is formated like this: Latitude Longitude City Province/State Country 7855N 1156E Ny-lesund Svalbard Norway 7813N 1539E

image text in transcribed

This Exercise involves pyton 3.7 using IDLE

The cities.txt is formated like this:

Latitude Longitude City Province/State Country

7855N 1156E Ny-lesund Svalbard Norway

7813N 1539E Longyearbyen Svalbard Norway

7728N 6914W Qaanaaq Greenland Denmark

7625N 8254W Grise Fiord Nunavut Canada

Part 1: Python Exercise 1 (50 points) Write a program that tells the user what the coordinates are for a given city. Use the cities.txt file provided in the Files section of this class. Your program should read the data in that file, find the city given by the user, and return a message with the coordinates as shown in the example below. Your program should also change the coordinate format used in the data file to a plain text format. For example, the coordinate "8230N" should be converted to "80 degrees and 30 minutes N". If the city is not found in the data file, your program should write a message accordingly. See the output examples below in that file,find the city enge the coordinate format Enter the city you are looking for: Caracas Caracas is 10 degrees 30 minutes N and 66 degrees 55 minutes W Enter the city you are looking for: Merced City not found

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

Programming The Perl DBI Database Programming With Perl

Authors: Tim Bunce, Alligator Descartes

1st Edition

1565926994, 978-1565926998

More Books

Students also viewed these Databases questions

Question

Question Who can establish a Keogh retirement plan?

Answered: 1 week ago

Question

What is the purpose of the Salary Structure Table?

Answered: 1 week ago

Question

What is the scope and use of a Job Family Table?

Answered: 1 week ago