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
Calculate the amount of current flowing through a 75-watt light bulb that is connected to a 120-volt circuit in your home.
vodomira [7]

Answer:

I = 0.625 A

Explanation:

Given that,

Power of the light bulb, P = 75 W

Voltage of the circuit, V = 120 V

We need to find the current flowing through it. We know that, Power is given by :

P=V\times I

I is the electric current

I=\dfrac{P}{V}\\\\I=\dfrac{75\ W}{120\ V}\\\\I=0.625\ A

So, the current is 0.625 A.

5 0
3 years ago
Tensile Strength (MPa) Number-Average Molecular Weight (g/mol)
IceJOKER [234]

Answer:

\mathbf{T_{S \infty } \ \approx 215.481 \ MPa}

\mathbf{M_n = 49163.56431  \ g/mol }

Explanation:

The question can be well structured in a table format as illustrated below:

Tensile Strength (MPa)            Number- Average Molecular Weight  (g/mol)

82                                                  12,700

156                                                 28,500

The tensile strength and number-average molecular weight for two polyethylene materials given above.

Estimate the number-average molecular weight that is required to give a tensile strength required above. Using the data given find TS (infinity) in MPa.

<u>SOLUTION:</u>

We know that :

T_S = T_{S \infty} - \dfrac{A}{M_n}

where;

T_S = Tensile Strength

T_{S \infty} = Tensile Strength (Infinity)

M_n = Number- Average Molecular Weight  (g/mol)

SO;

82= T_{S \infty} - \dfrac{A}{12700} ---- (1)

156= T_{S \infty} - \dfrac{A}{28500} ---- (2)

From equation (1) ; collecting the like terms; we have :

T_{S \infty} =82+ \dfrac{A}{12700}

From equation (2) ; we have:

T_{S \infty} =156+ \dfrac{A}{28500}

So; T_{S \infty} = T_{S \infty}

Then;

T_{S \infty} =82+ \dfrac{A}{12700} =156+ \dfrac{A}{28500}

Solving by L.C.M

\dfrac{82(12700) + A}{12700} =\dfrac{156(28500) + A}{28500}

\dfrac{1041400 + A}{12700} =\dfrac{4446000 + A}{28500}

By cross multiplying ; we have:

({4446000 + A})*  {12700} ={28500} *({1041400 + A})

(5.64642*10^{10} + 12700A) =(2.96799*10^{10}+ 28500A)

Collecting like terms ; we have

(5.64642*10^{10} - 2.96799*10^{10} ) =( 28500A- 12700A)

2.67843*10^{10}  = 15800 \ A

Dividing both sides by 15800:

\dfrac{ 2.67843*10^{10} }{15800} =\dfrac{15800 \ A}{15800}

A = 1695208.861

From equation (1);

82= T_{S \infty} - \dfrac{A}{12700} ---- (1)

Replacing A = 1695208.861 in the above equation; we have:

82= T_{S \infty} - \dfrac{1695208.861}{12700}

T_{S \infty}= 82 + \dfrac{1695208.861}{12700}

T_{S \infty}= \dfrac{82(12700) +1695208.861 }{12700}

T_{S \infty}= \dfrac{1041400 +1695208.861 }{12700}

T_{S \infty}= \dfrac{2736608.861 }{12700}

\mathbf{T_{S \infty } \ \approx 215.481 \ MPa}

From equation(2);

156= T_{S \infty} - \dfrac{A}{28500} ---- (2)

Replacing A = 1695208.861 in the above equation; we have:

156= T_{S \infty} - \dfrac{1695208.861}{28500}

T_{S \infty}= 156 + \dfrac{1695208.861}{28500}

T_{S \infty}= \dfrac{156(28500) +1695208.861 }{28500}

T_{S \infty}= \dfrac{4446000 +1695208.861 }{28500}

T_{S \infty}= \dfrac{6141208.861}{28500}

\mathbf{T_{S \infty } \ \approx 215.481 \ MPa}

We are to also estimate the number- average molecular weight that is required to give a tensile strength required above.

If the Tensile Strength (MPa) is 82 MPa

Definitely the average molecular weight will be = 12,700 g/mol

If the Tensile Strength (MPa) is 156 MPa

Definitely the average molecular weight will be = 28,500 g/mol

But;

Let us assume that the Tensile Strength (MPa) = 181 MPa for example.

Using the same formula:

T_S = T_{S \infty} - \dfrac{A}{M_n}

Then:

181 = 215.481- \dfrac{1695208.861 }{M_n}

Collecting like terms ; we have:

\dfrac{1695208.861 }{M_n} = 215.481-  181

\dfrac{1695208.861 }{M_n} =34.481

1695208.861= 34.481 M_n

Dividing both sides by 34.481; we have:

M_n = \dfrac{1695208.861}{34.481}

\mathbf{M_n = 49163.56431  \ g/mol }

5 0
3 years ago
BE-40 What is a characteristic of a catamaran hull?
Nat2105 [25]

Answer:

<em>A stable ride</em>

Explanation:

A Catamaran hull is a form of sea craft invented by the Austronesian peoples, the invention of the Catamaran hull enabled these people to sail across the sea in their expansion to the islands of the Indian and Pacific Oceans. Catamaran has multiple hulls, usually two parallel hulls of equal size. This geometric feature gives the craft an increased stability because,<em> it derives extra stability from its wide beam, in the place of a ballasted keel employed in a regular monohull sailboat. </em>A Catamaran hull will require four times the force needed to capsize it, when compared to an equivalent monohull.

8 0
3 years ago
Air is compressed in a reversible, isothermal, steady- flow process from 15 psia, 100°F to 100 psia. Calculate the work of compr
mixas84 [53]

Answer:

|W|=169.28 KJ/kg

ΔS = -0.544 KJ/Kg.K

Explanation:

Given that

T= 100°F

We know that

1 °F = 255.92 K

100°F = 310 .92 K

P _1= 15 psia

P _1= 100 psia

We know that work for isothermal process  

W=mRT\ln \dfrac{P_1}{P_2}

Lets take mass is 1 kg.

So work per unit mass

W=RT\ln \dfrac{P_1}{P_2}

We know that for air R=0.287KJ/kg.K

W=RT\ln \dfrac{P_1}{P_2}

W=0.287\times 310.92\ln \dfrac{15}{100}

W= - 169.28 KJ/kg

Negative sign indicates compression

|W|=169.28 KJ/kg

We know that change in entropy at constant volume

\Delta S=-R\ln \dfrac{P_2}{P_1}

\Delta S=-0.287\ln \dfrac{100}{15}

ΔS = -0.544 KJ/Kg.K

3 0
3 years ago
What is the primary function of NCEES?
joja [24]
National Council of Examiners for engineering and surveying a nonprofit organization
7 0
4 years ago
Other questions:
  • A 50-kN hydraulic press performs pressing and clamping actions. The clamping cylinder force is 4 kN. The pressing cylinder strok
    13·1 answer
  • What must engineers keep in mind so that their solutions will be appropriate? O abstract knowledge O context O scientists persev
    12·1 answer
  • Hey, I have a question, I was thinking that if you have engineering skills or drawing skill you could help me to start a project
    15·1 answer
  • Estudio de caso Teorema de Bayes. Las historias de casos clínicos indican que diversas enfermedades producen sistemas similares.
    14·1 answer
  • Consider a space shuttle weighing 100 kN. It is travelling at 310 m/s for 30 minutes. At the same time, it descends 2200 m. Cons
    6·1 answer
  • One of the disadvantages of the test of the hypothesis is that the final decision cannot be said to be completely correct eviden
    13·1 answer
  • Air is to be heated steadily by an 8-kW electric resistance heater as it flows through an insulated duct. If the air enters at 5
    10·1 answer
  • A car accelerates from rest with an acceleration of 5 m/s^2. The acceleration decreases linearly with time to zero in 15 s, afte
    7·1 answer
  • Consider a machine of mass 70 kg mounted to ground through an isolation system of total stiffness 30,000 N/m, with a measured da
    9·1 answer
  • Basic C++ For Loop I'm trying to learn. Replit tells me that the for in the forloop is an error, but I don't know what's wrong.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!