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
What is the 16 diget code to downlod pokemon ultra sun for free on ds
Kazeer [188]

Answer:

2468962218527611

Explanation:

7 0
3 years ago
Read 2 more answers
Explain briefly the power analogy between the fluid “water” and the Word of God.
melomori [17]

Throughout the Word of God, water is a symbol, a "type," of the spirit of God, and is ... to represent holy spirit, that is, the divine nature and power of God. ... The average person can go about 60 days without food before he ... record illustrating the analogous relationship between water and the holy spirit.

3 0
3 years ago
A plane surface 25 cm wide has its temperature maintained at 80°C. Atmospheric air at 25°C ows parallel to the surface
Gre4nikov [31]

Answer:

See the detailed answer in attached file.

Explanation :

Download docx
3 0
3 years ago
java Your program class should be called RomanNumerals Write a program that asks the user to enter a number within the range of
Ann [662]

Answer:

// Scanner class is imported to allow program

// receive input

import java.util.Scanner;

// RomanNumerals class is defined

public class RomanNumerals {

   // main method that signify beginning of program execution

   public static void main(String args[]) {

       // Scanner object scan is created

       // it receive input via keyboard

       Scanner scan = new Scanner(System.in);

       // Prompt is display asking the user to enter number

       System.out.println("Enter your number: ");

       // the user input is stored at numberOfOrder

       int number = scan.nextInt();

     

           // switch statement which takes number as argument

           // the switch statement output the correct roman numeral

           // depending on user input

          switch(number){

           case 1:

               System.out.println("I");

               break;

           case 2:

               System.out.println("II");

               break;

           case 3:

               System.out.println("III");

               break;

           case 4:

               System.out.println("IV");

               break;

           case 5:

               System.out.println("V");

               break;

           case 6:

               System.out.println("VI");

               break;

           case 7:

               System.out.println("VII");

               break;

           case 8:

               System.out.println("VIII");

               break;

           case 9:

               System.out.println("IX");

               break;

           case 10:

               System.out.println("X");

               break;

           // this part is executed if user input is not between 1 to 10

           default:

               System.out.println("Error. Number must be between 1 - 10.");

     }

   }

}

Explanation:

The program is well commented. A sample image of program output is attached.

The switch statement takes the user input (number) as argument as it goes through each case block in the switch statement and match with the corresponding case to output the roman version of that number. If the number is greater 10 or less than 1; the default block is executed and it display an error message telling the user that number must be between 1 - 10.

6 0
3 years ago
Read 2 more answers
A building window pane that is 1.44 m high and 0.96 m wide is separated from the ambient air by a storm window of the same heigh
sdas [7]

Answer:

the rate of heat loss by convection across the air space = 82.53 W

Explanation:

The film temperature

T_f = \frac{T_1+T_2}{2} \\\\= \frac{20-10}{2}\\\\= \frac{10}{2}\\\\= 5^0\ C

to kelvin = (5 + 273)K = 278 K

From  the " thermophysical properties of gases at atmospheric pressure" table; At T_f = 278 K ; by interpolation; we have the following

\frac{278-250}{300-250}= \frac{v-11.44(10^{-6})}{15.89(10^{-6})-11.44(10^{-6})}  → v 13.93 (10⁻⁶) m²/s

\frac{278-250}{300-250}= \frac{k-22.3(10^{-3}}{26.3(10^{-3}-22.3(10^{-3})} → k = 0.0245 W/m.K

\frac{278-250}{300-250}= \frac{\alpha - 15.9(10^{-6})}{22.5(10^{-6}-15.9(10^{-6})} → ∝ = 19.6(10⁻⁶)m²/s

\frac{278-250}{300-250}= \frac{Pr-0.720}{0.707-0.720} → Pr = 0.713

\beta = \frac{1}{T_f} \\=\frac{1}{278} \\ \\ = 0.00360 \ K ^{-1}

The Rayleigh number for vertical cavity

Ra_L  = \frac{g \beta (T_1-T_2)L^3}{\alpha v}

= \frac{9.81*0.00360(20-(-10))*0.06^3}{19.6(10^{-6})*13.93(10^{-6})}

= 8.38*10^5

\frac{H}{L}= \frac{1.44}{0.06} \\ \\= 24

For the rectangular cavity enclosure , the Nusselt number empirical correlation:

Nu_L = 0.42(8.38*10^5)^{\frac{1}{4}}(0.713)^{0.012}(24){-0.3}

NU_L= \frac{hL}{k}= 4.878

\frac{hL}{k}= 4.878

\frac{h*0.06}{0.0245}= 4.878

h = \frac{4.878*0.0245}{0.06}

h = 1.99 W/m².K

Finally; the rate of heat loss by convection across the air space;

q = hA(T₁ - T₂)

q = 1.99(1.4*0.96)(20-(-10))

q = 82.53 W

3 0
4 years ago
Other questions:
  • Dr. Thermo, only has one bottle of neon. However, he needs to run two experiments, each requiring its own bottle. Therefore, he
    13·1 answer
  • When choosing a respirator for your job, you must conduct a _____ test.
    15·1 answer
  • To determine if a product or substance being used is hazardous, consult:__________.
    14·1 answer
  • An object of mass 521 kg, initially having a velocity of 90 m/s, decelerates to a final velocity of 14 m/s. What is the change i
    14·1 answer
  • Do not answer pls thank you
    14·2 answers
  • The 5 ft wide gate ABC is hinged at C and contacts a smooth surface at A. If the specific weight of the water is 62.4 lb/ft3 , f
    8·1 answer
  • What are some "vital signs" that we consider to tell us about the economy?
    12·2 answers
  • You are using a Jupyter Notebook to explore data in a DataFrame named productDF. You want to write some inline SQL by using the
    8·1 answer
  • What are the two (2) different design elements of scratch?
    10·1 answer
  • The project's criteria.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!