Creating a variable in Python and assigning it to the last call of a function without calling the function again -
Then I am creating a very simple temperature class which can change the temperature given from Celsius to Fahrenheit and its Adverse. The problem is that I have to create a "convert" method within a client which executes if it is called directly, but one variable is not assigned. Here is my code: class temperature: def __init __ (self, temp = none, cf = 'C'): if temp == none: self.temp = float ('0.0 'Other': Try: self.temp = float ("{0: .2f}". Exclude format (temp)): Print ('Your temperature should be a number!') If not CF ['C' 'C' 'F', 'F']: Print ('You should identify temperature as F for Fahrenheit or C Celsius!') Other: self.cf = cf.upper () def (self) : Self-self.cf == 'F': self.temp = float ("{0: .2f}" format (self.temp - 32) * 5/9)) self.cf = 'C' return Yes) elif self Cf == 'C': self.temp = float ("{0: .2f}" format ((9/5) * self.temp + 32) se...