Which one of the following prolog programs

Assignment Help Basic Computer Science
Reference no: EM131013039

Which one of the following prolog programs correctly implement "if G succeeds then execute goal P else execute goal q ?"

(A) if-else (G, P, q) :- !, call(G), call(P).

if-else (G, P, q) :- call(q).

(B) if-else (G, P, q) :- call(G), !, call(P).

if-else (G, P, q) :- call(q).

(C) if-else (G, P, q) :- call(G), call(P), !.

if-else (G, P, q) :- call(q).

(D) All of the above

Reference no: EM131013039

Questions Cloud

Show how the basic eps you calculated should be reported : Calculate diluted earnings per share for 2013 and the incremental EPS of the preferred stock and convertible bonds. If required, round your answers to the nearest cent.
In your own words define standard deviation : The standard deviation is one of the most important concepts in the area of statistics. In your own words, define standard deviation. Give an example of how you have used the concept of standard deviation in your life
Show that the area under the curve is infinite : Show that the area under the curve is infinite. Show that the volume of the solid of revolution enclosed by the curve is finite, and compute it. [This solid of revolution is known as Gabriel's Horn.]
Jess transfers the note for value to pam : Gil makes out a $900 negotiable promissory note payable to Ben. By special indorsement, Ben transfers the note for value to Jess. By blank indorsement, Jess transfers the note for value to Pam.
Which one of the following prolog programs : Which one of the following prolog programs correctly implement "if G succeeds then execute goal P else execute goal q ?"(A) if-else (G, P, q) :- !, call(G), call(P).if-else (G, P, q) :- call(q).
The area of a right-angled triangle is computed : The area of a right-angled triangle is computed by multiplying the length of side a by the length of side b and then multiplying the result by 0.5. Define a function that accepts two arguments of an appropriate data type for the length of side a and ..
Determine the speed of the collar after the applied force : The collar has a mass of 30 kg and is supported on the rod having a coefficient of kinetic friction mu k = 0.4. The attached spring has an unstretched length of 0.2 m and a stiffness k = 50 N/m. Determine the speed of the collar after the applied ..
Write expression to represent total number of graphic novels : Alexis, Brian, and Carli collect graphic novels. Brian has 5 more graphic novels than Alexis and Carli has twice as many as Alexis. Define a variable and write an expression to represent the total number of graphic novels for the three people
Based on the statement you have prepared : Based on the statement you have prepared, do you agree with the decision to eliminate the cocoa powder? Explain your answer.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Components-protocols to support management of certificates

A Public Key Infrastructure (PKI) is a collection of components and protocols to support the management of certificates that bind a user name to a public key.

  Possibility-using fiber optic cable instead of twisted pair

Discuss the possibility of using fiber optic cable instead of either twisted pair cable or staying with the existing coax wiring structure.

  Write an application that reads a series of pairs of numbers

A website sells three products whose retail prices are as follows: product 1, $2.98; product 2 $4.50; and product 3, $9.98. Write an application that reads a series of pairs of numbers.

  Compare and contrast the use of leased lines in a wan or lan

Research the Internet for an article, publication, or online document written in the last 12 months that describes how DSL and cable modems use multiplexing. Be prepared to discuss. From the e-Activity, analyze the multiplexing techniques of DSL and ..

  Modify the btod procedure

Modify the BTOD procedure so that leading zeros are replaced by blanks. For example, if the result is "0" - "5" - "9," the leading 0 in the hundreds position gets replaced by a blank, giving " " - "5" - "9."

  Designing structured cyclic scheduler with fixed frame size

Executed according to structured cyclic scheduler with fixed frame size. We require to make three types of design decisions according to: i) Select suitable frame size based on constraints.

  What would be the best way for an electrical

What would be the best way for an electrical engineer to enter the automotive industry?

  Determining minimum size of control bus

Determine the minimum size of the control bus?

  Write a function called parkingcharge

Write a function called parkingCharge that, given the type of vehilce (c = car, b = bus, t = truck) and the hours a vehicle spent in the parking lot, retruns the parking charge based on the rates shown below.

  Work with classes as reusable code

Objective: Work with classes as reusable code and random numbers. Instructions: A slot machine is a device that the user inserts money into and then pulls a lever (or presses a button).

  Business environment impacted development telecommunication

Describe in scholarly detail how business environment has influenced development of telecommunications technology.

  Write analogous steps in dimensioning computer network

Write four steps which you think a transportation engineer takes when dimensioning such highway. What are the analogous steps in dimensioning computer network?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd