Question: Open a blank R Script file and do the following: Write a function that has two integer input parameters. ( 3 pts ) a .

Open a blank R Script file and do the following:
Write a function that has two integer input parameters. (3pts)
a. Make sure that both parameters are integers (i.e. use as.integer() function)
b. Assigns whichever integer is larger to a variable called larger, and assigns the other one
to a variable called smaller.
c. Then prints all prime numbers between smaller and larger.
Write a function that calculates the hypotenuse of a right triangle. (2 pts)
a. The function has two numeric parameters. The first parameter is called first_side and
the default value is 3. The second parameter is called second_side and the default value
is 4.
b. The function prints the length of the hypotenuse of the triangle by using the
Pythagorean's theorem, i.e hypothenuse = sqrt(first_side ???2+ second_side ?2)
Please save your file as an R Script file (.R), and submit to Canvas.
Open a blank R Script file and do the following:

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 Programming Questions!