Question: Please help with this simple question ASAP I have the following prolog code and need to write just two rules. the first rule is to
Please help with this simple question ASAP
I have the following prolog code and need to write just two rules. the first rule is to see which city has altitude higher than 1000 ft and the second rule is to convert from feet to metres. please help me this is due in a couple hours and im stuck on it.
city_altitude(tempe, az, 1318).
city_altitude(atlanta, ga, 894).
city_altitude(chicago, il, 583).
city_altitude(denver, co, 5280).
city_altitude(seattle, wa, 260).
city_altitude(boise, id, 2704).
city_altitude(saltlakecity, ut, 4226).
those are my facts. here are the 2 rules needed:
Write a prolog rule that confirms the following statement: City is a high city if its altitude in feet is greater than 1000 ft. i.e., define the new predicate: high_city(City):- ...... b) Write a prolog rule to compute each citys altitude in meters. Note that an altitude in meters can be computed as 0.3048 * altitude in feet. i.e., define the new predicate: city_altitude_in_meters(City, State, Feet, Meters):- ......
PLEASE HELP ME THIS IS THE SECOND TIME I AM POSTING THIS QUESTION
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
