Using the celsius_to_kelvin function as a guide, create a new function, changing the name to kelvin_to_celsius, and modifying the function accordingly 1 def celsius_to_kelvin(value_celsius): value_kelvin -. 4 value_kelvin- value_celsius 273.15 return value_kelvin Your solution goes here 9 value_c 0.e 10 valuek=0.0 - 12 value_c 10.8 13 15 16 print (value-c, 'Cis', celsius-to-kelvin(value-c), "K.) valuek# 283.15 print (value-k, .İS', kelvin-to-celsíus (value-k), 'C') -

Answer :

Answer:

# kelvin_to_celsius function is defined

# it has value_kelvin as argument

def kelvin_to_celsius(value_kelvin):

   # value_celsius is initialized to 0.0

   value_celsius = 0.0

   

   # value_celsius is calculated by

   # subtracting 273.15 from value_kelvin

   value_celsius = value_kelvin - 273.15

   # value_celsius is returned

   return value_celsius

   

# celsius_to_kelvin function is defined

# it has value_celsius as argument

def celsius_to_kelvin(value_celsius):

   # value_kelvin is initialized to 0.0

   value_kelvin = 0.0

   

   # value_kelvin is calculated by

   # adding 273.15 to value_celsius

   value_kelvin = value_celsius + 273.15

   # value_kelvin is returned

   return value_kelvin

   

value_c = 0.0

value_k = 0.0

value_c = 10.0

# value_c = 10.0 is used to test the function celsius_to_kelvin

# the result is displayed

print(value_c, 'C is', celsius_to_kelvin(value_c), 'K')

value_k = 283.15

# value_k = 283.15 is used to test the function kelvin_to_celsius

# the result is displayed

print(value_k, 'is', kelvin_to_celsius(value_k), 'C')

Explanation:

Image of celsius_to_kelvin function used as guideline is attached

Image of program output is attached.

${teks-lihat-gambar} ibnahmadbello
${teks-lihat-gambar} ibnahmadbello

Other Questions