Answered step by step
Verified Expert Solution
Link Copied!

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:

image text in transcribed

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

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

Step: 3

blur-text-image

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

Building Database Driven Catalogs

Authors: Sherif Danish

1st Edition

0070153078, 978-0070153073

More Books

Students also viewed these Databases questions