55.5k views
0 votes
Assume that to_the_power_of is a function that expects two integer parameters and returns the value of the first parameter raised to the power of the second parameter. Write a statement that calls to_the_power_of to compute the value of cube_side raised to the power of 3 and that associates this value with cube_volume.

User Mayada
by
5.3k points

1 Answer

3 votes

Answer:

The statement in python is as follows:

to_the_power_of(cube_side,3)

Step-by-step explanation:

As stated as the requirement of the code segment, the statement takes as parameters a variable cube_side and a constant 3.

It then returns the volume of the cube; i.e. cube raise to power 3

See full program below

def to_the_power_of(val,powe):

result = val**powe

print(result)

cube_side = float(input("Cube side: "))

to_the_power_of(cube_side,3)

User Mete
by
5.2k points