Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write the following in Prolog program. There are the following cars: BMW, Ford, Datsun , Toyota. The first car BMW ran 130000 km, 3 years

Write the following in Prolog program.

There are the following cars: BMW, Ford, Datsun , Toyota. The first car BMW ran 130000 km, 3 years old,

red, and $12000. The second car Ford ran 90000 km, 4 years old, gray, and $25000. The third car Datsun ran

8000 km, 1 year old, red, and $ 30000. The fourth car Ford ran 80000 km, 6 years old, blue, and $8000. The

fifth car Datsun ran 50000km, 5 years old, orange, and $20000. The sixth car Toyota ran 25000 km, 2 years

old, black, and $ 25000.

From all the queries for the above program if you would like to find:

1.only cars with red color and price less than 17000;

2. only colors of the car Ford ;

3.only cars whose color is black and age more than 1.

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

Oracle Database 19c DBA By Examples Installation And Administration

Authors: Ravinder Gupta

1st Edition

B09FC7TQJ6, 979-8469226970

More Books

Students also viewed these Databases questions

Question

How do Data Types perform data validation?

Answered: 1 week ago

Question

How does Referential Integrity work?

Answered: 1 week ago