Question 1

Use and show R code to find √63,504

sqrt(63504)
## [1] 252

Question 2

Use and show R code to calculate log10 45,000

log10 (45000)
## [1] 4.653213

Question 3

Use and show R code to evaluate In 23.05

log(23.05)
## [1] 3.137666

Question 4

Use and show R code to write all integers from 15 to 1 in decreasing order

sort.default(15:1, decreasing = )
##  [1]  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15

Question 5

Use and show R code to find the mean of all prime numbers 3 to 17 inclusive

mean(3,5,7,11,13,17)
## [1] 3

Question 6

Use and show R code to round 17.3838 to the nearest hundredth

round(digits = 2,17.3838)
## [1] 17.38

Question 7

Use and show R code to evaluate the expression 7 × (53 − 2) × 2

eval(expr = 7*(53-2)*2)
## [1] 714

Question 8

Use R code to write a function that will calculate the volume of a cylinder. The following formula will be helpful, V = πr 2h. Then use your function to calculate the volume of a cylinder that has a radius of 25 and a height of 10. Equivalent to 19634.95

vol.cyl = function(r,h)
v = pi*r^2*h
vol.cyl(r=25,h=10)