1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
pashok25 [27]
3 years ago
15

Write the following statements as Prolog clauses, in the order given: If it is raining or snowing, then there is precipitation.

If it is freezing and there is precipitation, then it is snowing. If it is not freezing and there is precipitation, then it is raining. It is snowing. What answer does Prolog give to the following queries: Is it freezing
Engineering
1 answer:
Anika [276]3 years ago
8 0

Answer:

a. See Explanation Below

b. No

Explanation:

a.

Interpreting the statements line by line.

First, the prolog clauses need to be initialised, as follows:

:- dynamic freezing/0, precipitation/0, snowing/0, raining/0.

If it is raining or snowing, then there is precipitation.

The statement is splited in two.

1st, if it is raining then there is precipitation

Or

2nd, if it is raining, then there is precipitation.

So, both statements are given as:

precipitation :- raining.

precipitation :- snowing.

If it is freezing and there is precipitation, then it is snowing.

This is a conditional statement that checks if it is freezing AND there's is precipitation.

If true, then it is snowing.

The above statement is given as:

snowing :- freezing, precipitation.

If it is not freezing and there is precipitation, then it is raining.

This is a conditional statement that checks if it is not freezing AND there's is precipitation.

If true, then it is raining.

The not clause is represented as \+

The above statement is the given as:

raining :- \+ freezing, precipitation.

It is snowing.

This is represented as follows

snowing.

So, the full prolog clause is as follows

:- dynamic freezing/0, precipitation/0, snowing/0, raining/0.

precipitation :- raining.

precipitation :- snowing.

snowing :- freezing, precipitation.

raining :- \+ freezing, precipitation.

snowing.

b. What answer does Prolog give to the following queries:

Is it freezing

No

Reason;

All of the conditions above point to raining or snowing; none points to freezing.

Hence, it is no.

You might be interested in
NEED HELPASAP what is the moisture content of a board if a test sample that originally weighed 11. 5 oz was found to weigh 10 oz
Viefleur [7K]

Answer:

11.5-10/10= 0.15x100 =15%

Explanation:

3 0
2 years ago
Which two pieces of evidence best support the statement: “Germs do not always cause disease”?
Ratling [72]

Answer:

1) "Most germs are too small to cause disease"   http://ecufrog.weebly.com/uploads/8/6/7/7/8677638/850_meet_the_microbes.pdf

2) "Some bacteria that live in your body are helpful. For instance, Lactobacillus acidophilus... helps you digest food, destroys some disease-causing organisms and provides nutrients." https://www.mayoclinic.org/diseases-conditions/infectious-diseases/in-depth/germs/art-20045289

8 0
3 years ago
To produce cooling the refrigerant much
lawyer [7]
Yes that is correct good job ❤️
7 0
3 years ago
You often experiment with everyday materials around you, trying to create new and unique items. You enjoy designing and creating
Archy [21]

answer:D. problem-solver

8 0
3 years ago
Read 2 more answers
How could you nonverbally express interest while speaking to a customer in person? Check all of the boxes that apply.
JulijaS [17]

Answer: B,D,E, and G or 2,4,5,7

Explanation: Hope this helps Trust the answer I took the test!

5 0
3 years ago
Other questions:
  • Talc and graphite are two of the lowest minerals on the hardness scale. They are also described by terms like greasy or soapy. B
    14·1 answer
  • A budding electronics hobbyist wants to make a simple 1.0-nF capacitor for tuning her crystal radio, using two sheets of aluminu
    10·1 answer
  • What kind of volcano usually forms over a hot spot?
    15·2 answers
  • For a body moving with simple harmonic motion state the equations to represent: i) Velocity ii) Acceleration iii) Periodic Time
    11·1 answer
  • Homes may be heated by pumping hot water through radiators. What mass of water (in g) will provide the same amount of heat when
    8·1 answer
  • A clutch is chattering. Technician A says that uneven wear on the flywheel could be the cause. Technician B says that worn or br
    5·1 answer
  • what is the expected life 1 inch diameter bar machined from AISI 1020 CD Steel is subjected to alternating bending stress betwee
    9·1 answer
  • a poorly tighten terminal is often the cause of a/an ? a) open circuit b) circuit breaker interrupt c)short circuit d) ground fa
    10·1 answer
  • Joinn my zo om lets play some blookets<br> 98867 708157<br> 9dPQPW
    14·1 answer
  • List two ways you can make an informal survey
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!