Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

how do I do this. can you do it without adding the cities text file. is there a

ID: 3754104 • Letter: H

Question

how do I do this. can you do it without adding the cities text file. is there a way to do it or set it up so I can see what it looks like ?

Part 1: Python nces ations 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 "82°30N" 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. al Grades Enter the city you are looking for: Caracas Caracas is 10 degrees 30 minutes N and 66 de grees 55 minutes W Enter the city you are looking for: Merced City not found!

Explanation / Answer

AS u said no file needed so added dictionary for city and created file , you can add the additional city as you want

save the below code as city.py or any name that needed.

#output

python city.py
Enter the city you are looking for : Merced
City not found!
python city.py
Enter the city you are looking for : Caracas
10 degress 30 N and 66 degress 55 W
  

Please do let me know if u want any kind of help , will helping you want.

Best of luck