Section B
|
*****CYLINDER_VOLUME***** Enter the radius: Enter the height: |
HINT: Volume of a Cylinder =
V=πr2
h,
π = 3.142
a) population (Zambia ,13 million)
b)landlocked country(Zambia)
c)soldiers(men, height, above 170m)
d) isWelsh, English, Scottish,Irish(You) :- British
e)sportspeople(play ,football, hockey rugby )
f)parents(Same):- Sibling
g)Same(lives):- Address
h)healthy, wealthy or wise(Simeone):-healthy
SECTION B:
predicates
start.
volume.
clauses
start:- volume,nl.
sum:- write(\"Enter the radius: \"),readreal(r),
write(\"Enter the height:"),readreal(h),
V = 3.1412*r*r*h
write(\"VOLUME=\"),write(V).
goal
start.
Represent each statement as a PROLOG statement: The population of Zambia is 13 million. [1 mark]...
Language: JAVAPart a: Write a class called Geniegotchi with:1. Private data fields: name (of String type, initialized to “Bob”), endurance (of int type, initialized to 4) and happiness (of int type, initialized to 3);2. Public methods:-void setName(String newName) : renames Genie with newName, printsnewName confirmation to screen;void setName(String newName) : renames Genie with newName, printsnewName confirmation to screen;- intgetEndurance() : returns current endurance;-intgetHappiness() : returns current happiness;-void feed() : this method increases current endurance by 1 if endurance is less...
Read about Cokes strategy in Africa in the article below and discuss the ethics of selling soft drinks to very poor people. Is this an issue that a company like Coke should consider? Africa: Coke's Last Frontier Sales are flat in developed countries. For Coke to keep growing, Africa is it By Duane Stanford Piles of trash are burning outside the Mamakamau Shop in Uthiru, a suburb of Nairobi, Kenya. Sewage trickles by in an open trench. Across the street,...
> what commands can you run in prolog so that it can calculate...?
Mangani Zulu Thu, Apr 21, 2022 2:08 AM