Answered step by step
Verified Expert Solution
Question
1 Approved Answer
please just write code mixed with csv please solve this question with this csv this is csv: city1,city2,distance Balkesir,anakkale,95 anakkale,stanbul,125 Balkesir,stanbul,155 zmir,Balkesir,140 zmir,Eskiehir,220 stanbul,Eskiehir,130 stanbul,Samsun,215
please just write code mixed with csv
please solve this question with this csv
this is csv:
city1,city2,distance
Balkesir,anakkale,95
anakkale,stanbul,125
Balkesir,stanbul,155
zmir,Balkesir,140
zmir,Eskiehir,220
stanbul,Eskiehir,130
stanbul,Samsun,215
Eskiehir,Ankara,70
Eskiehir,Konya,120
Ankara,Konya,95
zmir,Mula,190
Mula,Konya,85
Mula,Antalya,80
Antalya,Adana,80
Samsun,Trabzon,120
Ankara,Samsun,115
Kayseri,Konya,185
Kayseri,Trabzon,110
Trabzon,Rize,75
Kayseri,Diyarbakr,145
Kayseri,Adana,245
Rize,Diyarbakr,165
In this project, you are required to determine the shortest path between two cities using the Uniform Cost Search (UCS) algorithm. Figure 1 illustrates the road map provided for this assignment. Figure 1. A simplified road map of some Turkish cities. To-Do You are going to develop a Python application, which is expected to meet the following requirements: R1. The road map should be initialized from a CSV file. R2. The user should be able to specify the path of the road map file. R3. The user should be able to specify the start (current city). R4. The user should be able to specify the end (target city). R5. The application should present the shortest path and the distance between the start and end. R6. The application should be robust and able to handle exceptions (e.g., FileNotFoundError and CityNotFoundError) Modify the script file (submission.py) provided for you to meet the requirements described above. Create a PDF report describing UCS and your effort in this assignment. Furthermore, test your application with the following city pairs and include the outcomes in your report. Only submit the source code (submission.py) and your report in PDF format. Do not upload data files. Submitted file should be an archive (tar, zip, rar, etc.) named as your id-name-surname (e.g., 12345678910-alper-bilge.zip) Submit your own work. "Honesty is the best policy; I will stick to that." - Miguel de Cervantes. Test samples: - stanbul - Kayseri - Trabzon - zmir - anakkale - Konya - Balkesir - Adana - stanbul - Paris Data: The road map data file (cities.csv) contains 22 roads among 15 different cities. The roads are bidirectional. Also, the first row is the header; do not forget to skip it. Notes Please read this document very carefully. Submissions not complying with the To-Do list will be disqualifiedStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started