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
Zolol [24]
4 years ago
13

Write the definition of a function powerTo which recieves two parameters, a double and an integer. If the second parameter is po

sitive, the function returns the value of the first parameter raised to the power of the second. Otherwise, the function returns 0.
Computers and Technology
1 answer:
FrozenT [24]4 years ago
5 0

Answer:

Following is the definition of the required function:

def powerTo( double first, int second);

if second > 0;

double result = pow(first,second);

return result;

else

return 0;

Explanation:

The explanation for above code is as follows:

  • A function named powerTo is defined, having two arguments with data type double and integer respectively.
  • A if condition is applied that checks the second parameter.
  • If the the condition: second > 0 gets true, a value is returned which is equal to first parameter raised to the second.
  • If the condition is if bracket gets false, 0 is returned as a result.

i hope it will help you!

You might be interested in
Does angular need to be installed on server.
lilavasa [31]

Answer:

No need in Install

Explanation:

Because, it's an advanced application

8 0
2 years ago
What laws are broken when you hack someone?
postnew [5]

Answer:

it depends

Explanation:

if you are hacking for a purpose that is benefiting the person being hacked, that is ethical hacking. ethical hacking is not illegal, as long as you get permission from the person being hacked.

if you hack someone without their knowledge, that is unethical hacking, and that is in many cases, a crime, and if it has enough of a detrimental effect on a companys process, it could land you into prison and earn you a hefty fine.

ethical hacking is good for testing a networks security, and if all is well, the ethical hacker shouldnt be able to get into a network if it is secured properly.

6 0
3 years ago
When I’m design view, Henrietta deleted a previous criterion, added a new column, and filtered patients’ age. Which best describ
BaLLatris [955]

Answer:

Explanation:

b

8 0
3 years ago
Is a house phone a computer?<br> And why??
aev [14]

Answer:

yes because they emit radio waves or radio frequency

Explanation:

8 0
3 years ago
Read 2 more answers
What does the format painter button in excel do
wlad13 [49]
The format painter button in excel copies formatting from one place and it applies it to another
7 0
4 years ago
Other questions:
  • The purpose of the _____ element is used to configure the footer information ona web page document
    6·1 answer
  • Sharon is thinking about opening a bakery. She knows she wants to set her own hours, reduce her stress and make a profit. But sh
    6·2 answers
  • Write an essay of at least 300 words explaining your position on a proposed ban of Wikipedia in your future college. You should
    12·1 answer
  • What is the default method of referencing cells in formulas?
    6·1 answer
  • An object is suspended in a wind tunnel and the force measured for various levels of wind velocity: v (m/s) 10 20 30 40 50 60 70
    10·1 answer
  • Which of the following is the path to the Zoom button?
    8·1 answer
  • Zahra's softball team needs money for team T-shirts. The coach makes some fundraising suggestions, while team members brainstorm
    5·2 answers
  • People who rely on others for financial support, such as children and the elderly, are referred to as 16 O A. recipients O B. be
    9·1 answer
  • What is the definition of shape
    14·2 answers
  • How many pages is 1500 words double spaced 12pt font?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!