# %% Defintion of class Temp_conv: class Temp_conv(object): def c2f(self, c): f = c*(9/5) + 32 return f def c2k(self, c): k = c + 273.15 return k # %% Application of class Temp_Conversion: # Defining variables used in calling instance of class: c = 100 print('Results with named instance:') # Creating named instance: my_temp_conv = Temp_conv() print('Fahrenheit value =', my_temp_conv.c2f(c)) print('Kelvin value =', my_temp_conv.c2k(c)) print('-------------------------------') print('Results with unnamed instance:') print('Fahrenheit value =', Temp_conv().c2f(c)) print('Kelvin value =', Temp_conv().c2k(c))