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
Which apparatus is likely to carry a ladder? (There may be more than one answer.)
Aloiza [94]
B and D
hope this helped
4 0
3 years ago
What would happen if an exposed film was accidentally placed in the fixer before being placed in the developer
Eduardwww [97]
Do you still want this answered
5 0
3 years ago
Why is it important to keep hand tools free of oil and grease?
Bezzdna [24]

Answer:

keeps it from rusting

Explanation:

5 0
3 years ago
What is the diffrence between a small block and a big block lets see if yall know
ivann1987 [24]

Answer:

The difference in weight and size?

Explanation:

It explains itself :P

5 0
2 years ago
t is desired to produce aligned carbon fiber-epoxy matric composite having a longitudinal tensile strength of 800 MPa. Given (a)
Nesterboy [21]

Answer:

The value of critical length = 3.46 mm

The value of volume of fraction of fibers = 0.43

Explanation:

Given data

\sigma_{T} =  800 M pa

D = 0.017 mm

L = 2.3 mm

\sigma_{f} = 5500 M pa

\sigma_{m} = 18 M pa

\sigma_c = 13.5 M pa

(a) Critical fiber length is given by

L_{c} = \sigma_{f} (\frac{D}{2 \sigma_{c} } )

Put all the values in above equation we get

L_{c} =5500 (\frac{0.017}{(2) (13.5)} )

L_{c} = 3.46 mm

This is the value of critical length.

(b).Since this  critical length is greater than fiber length Than the volume fraction of fibers is given by

V_{f} = \frac{\sigma_T - \sigma_m}{\frac{L\sigma_c}{D} - \sigma_m }

Put all the values in above formula we get

V_{f} = \frac{800-18}{\frac{(2.3)(13.5)}{0.017} - 18 }

V_{f} = 0.43

This is the value of volume of fraction of fibers.

3 0
3 years ago
Other questions:
  • A rigid 10-L vessel initially contains a mixture of liquid and vapor water at 100 °C, with a quality factor of 0.123. The mixtur
    11·1 answer
  • You are an engineer working in a auto crash test lab. Some members of your team have raised objections against the use of cadave
    10·1 answer
  • An inverting amplifier with +11 V supply voltages normally has a sinusoidal output of 10 Vpp. When checking the circuit with an
    11·1 answer
  • The minimum fresh air requirement of a residential building is specified to be 0.35 air changes per hour (ASHRAE, Standard 62, 1
    10·1 answer
  • 5. Create a function named second_a that uses a list comprehension. The function will take a single integer parameter n. Find ev
    7·1 answer
  • Consider two Carnot heat engines operating in series. The first engine receives heat from the reservoir at 1400 K and rejects th
    6·1 answer
  • 2=333=3= im single text in comment
    13·2 answers
  • A) Consider an air standard otto cycle that has a heat addition of 2800 kJ/kg of air, a compression ratio of 8 and a pressure an
    7·1 answer
  • The main function of a router is to
    14·2 answers
  • based on the graph shown, for any given output level, the veritcal distance between the avc and the atc curves represents
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!