class Thermostat:
def __init__(self, temp):
self.temp = temp
def check_status(self):
if self.temp >= 28:
print("에어컨 가동")
elif self.temp <= 18:
print("히터 가동")
temperature = Thermostat(30)
temperature.check_status()
temperature = Thermostat(15)
temperature.check_status()
To embed this project on your website, copy the following code and paste it into your website's HTML: