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. pts
a Make sure that both parameters are integers ie use asinteger 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. pts
a The function has two numeric parameters. The first parameter is called firstside and
the default value is The second parameter is called secondside and the default value
is
b The function prints the length of the hypotenuse of the triangle by using the
Pythagorean's theorem, ie hypothenuse sqrtfirstside secondside
Please save your file as an R Script file R and submit to Canvas.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
