Functions Mixed-Up Code QuestionsΒΆ

Create a function called exp that takes in two parameters, num1 and num2, and returns num1 raised to the power of num2. For example, exp(2,3) should return 8.

Write a function called exp that takes in two parameters, num1 and num2, and returns num1 raised to the power of num2. For example, exp(2,3) should return 8.

Create a function called poly_perimeter that takes in two parameters, len_side and num_sides, and returns the perimeter of the polygon. The perimeter of a polygon is the length of each side times the number of sides. For example, poly_perimeter(4,5) should return 20.

Write a function called poly_perimeter that takes in two parameters, len_side and num_sides, and returns the perimeter of the polygon. The perimeter of a polygon is the length of each side times the number of sides. For example, poly_perimeter(4,5) should return 20.

Create a function called sphere_volume that takes in one parameter, radius, and returns the volume of a sphere with the given radius. The volume of a sphere is 4 / 3 times PI (in which 3.14 should be used) times the radius cubed. For example, sphere_volume(3) should return 113.04.

Write a function called sphere_volume that takes in one parameter, radius, and returns the volume of a sphere with the given radius. The volume of a sphere is 4 / 3 times PI (in which 3.14 should be used) times the radius cubed. For example, sphere_volume(3) should return 113.04.

Create a function called circle_circumference that takes in one parameter, radius, and returns the circumference of a circle with the given radius. The circumference of a circle is 2 times PI (in which 3.14 should be used) times the radius. For example, circle_circumference(3) should return 18.84.

Write a function called circle_circumference that takes in one parameter, radius, and returns the circumference of a circle with the given radius. The circumference of a circle is 2 times PI (in which 3.14 should be used) times the radius. For example, circle_circumference(3) should return 18.84.

Create a function called slope that takes in four parameters, x1, x2, y1, and y2, and returns the slope of a line formed by the two points. The slope is y2 minus y1 divided by x2 minus x1. For example, slope(4, 3, 7, 8) should return -1.

Write a function called slope that takes in four parameters, x1, x2, y1, and y2, and returns the slope of a line formed by the two points. The slope is y2 minus y1 divided by x2 minus x1. For example, slope(4, 3, 7, 8) should return -1.

You have attempted of activities on this page