Deloitte Interview Questions | Write a function to convert Fahrenheit to Kelvin. You can use the internet to find the conversion

Question

Functions

in progress 0
TheDataMonk 55 years 2 Answers 822 views Grand Master 0

Answers ( 2 )

  1. fah_to_kelvin <- function(temp) {
    kelvin <- ((temp – 32) * (5 / 9)) + 273.15
    return(kelvin)
    }

  2. conv = function(t){
    as.numeric(t)
    K = ((t – 32) * 5/9 )+ 273.15
    return(paste0(“the temperature in kelvin is: “, K,” kelvin”))
    }

Leave an answer

Browse
Browse