Answered step by step
Verified Expert Solution
Question
1 Approved Answer
code(python) A person wanted to move between cities according to the following map: Required : Create a class named Cities that contains the following: A
code(python)
A person wanted to move between cities according to the following map:
Required :
Create a class named Cities that contains the following:
A function to create a dictionary named createCities
Create a heuristic called createH
Create the A * function inside the class
Create the function for calculating greeay inside the class
*When calling function A* or greeay the output is saved in a JSON file
The main menu of the project consists of:
1- Add city and history
2- A* algorithm
3- Greedy algorithm
4- Exit
\begin{tabular}{|c|r|} \hline \multicolumn{2}{|c|}{ heuristic } \\ \hline Gaza & 75 \\ \hline Cairo & 60 \\ \hline Amman & 45 \\ \hline Makkah & 45 \\ \hline Dubai & 25 \\ \hline Damascus & 40 \\ \hline Yafa & 30 \\ \hline Morocco & 0 \\ \hline \end{tabular}
Step 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