Question: Part 1. Create a function pow_two(): it takes one argument and returns that number squared (that number times itself). pow_two

Part 1. Create a function pow_two():

it takes one argument and returns that number squared (that number times itself).

pow_two <- function(x){ return() }

# Part 2. Create a function sum_abs(), that takes two arguments and returns the sum of the absolute values of both arguments.

sum_abs <- function(y,z){ return() } #

Part 3. Write two test cases for each function to make sure they are working properly.

For example: pow_two(2) == 4 sum_abs(-1, -3) == 4

Please I need the code for these question !

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!