## Debug celsius converter

Your friend is traveling abroad to the United States so he wrote a program to convert fahrenheit to celsius. Unfortunately his code has some bugs.

Find the errors in the code to get the celsius converter working properly.

To convert fahrenheit to celsius:
```
celsius = (fahrenheit - 32) * (5/9)
```
```if-not:ruby,typescript
Remember that typically temperatures in the current weather conditions are given in whole numbers. It is possible for temperature sensors to report temperatures with a higher accuracy such as to the nearest tenth. Instrument error though makes this sort of accuracy unreliable for many types of temperature measuring sensors. 
```

```if:ruby
Please round to 5dp (use `.round(5)`)
```

```if:typescript
Please round to 5dp (use `Math.round()`)
```

Difficulty: EASY

Starter code:
def weather_info (temp):
	

Solutions:
def weather_info(temp):
	c = convertToCelsius(temp)
	if c <= 0:
		return str(c) + ' is freezing temperature'
	else:
		return str(c) + ' is above freezing temperature'

def convertToCelsius(temperature):
	celsius = (temperature - 32) * (5.0 / 9.0)
	return celsius


def weather_info(t):
	c = (t - 32) * (5.0 / 9)
	return str(c) + ' is freezing temperature' if c <= 0 else str(c) + ' is above freezing temperature'


def weather_info(temp):
	c = convertToCelsius(temp)
	return '{} {}'.format(c, 'is freezing temperature' if c < 0 else 'is above freezing temperature')

def convertToCelsius(temp):
	return (temp - 32) * 5 / 9.0


def weather_info(temp):
	cels = (temp - 32) * (5 / 9)
	if cels > 0:
		return f'{cels} is above freezing temperature'
	else:
		return f'{cels} is freezing temperature'


def weather_info(temp):
	celsius = (temp - 32) * (5 / 9)
	if celsius > 0:
		return '%s is above freezing temperature' % celsius
	elif celsius < 0:
		return '%s is freezing temperature' % celsius


def weather_info(temp):
	c = convert_to_celsius(temp)
	if c > 0:
		return str(c) + ' is above freezing temperature'
	else:
		return str(c) + ' is freezing temperature'

def convert_to_celsius(temperature):
	return (temperature - 32) * (5 / 9)


def weather_info(temp):
	c = round((temp - 32) * (5 / 9), 16)
	return f'{c} is above freezing temperature' if c > 0 else f'{c} is freezing temperature'


def weather_info(temp):
	r = (temp - 32) * (5 / 9)
	return '{} {}'.format(r, ('is freezing temperature', 'is above freezing temperature')[r > 0])


weather_info = lambda t: (lambda c: '{} is{} freezing temperature'.format(c, ' above' if c >= 0 else ''))((t - 32) * 5 / 9.0)


def weather_info(temperature):
	c = convert_to_celsius(temperature)
	if c < 0:
		return str(c) + ' is freezing temperature'
	else:
		return str(c) + ' is above freezing temperature'

def convert_to_celsius(temperature):
	celsius = (temperature - 32) * (5 / 9)
	return celsius
print(weather_info(50))
print(weather_info(23))


def weather_info(temp):
	c = (temp - 32) * (5 / 9)
	return '%s is freezing temperature' % c if c < 0 else '%s is above freezing temperature' % c


def weather_info(temp):
	res = (temp - 32) * (5 / 9)
	if res > 0:
		return str(res) + ' is above freezing temperature'
	else:
		return str(res) + ' is freezing temperature'


def convert_to_celsius(temp):
	celsius = (temp - 32) * (5 / 9)
	return celsius

def weather_info(temp):
	x = convert_to_celsius(temp)
	if x > 0:
		return f'{x} is above freezing temperature'
	else:
		return f'{x} is freezing temperature'


def weather_info(temp):
	c = convert_to_celsius(temp)
	if c > 0:
		return '{} is above freezing temperature'.format(c)
	else:
		return '{} is freezing temperature'.format(c)

def convert_to_celsius(temperature):
	var_celsius = (temperature - 32) * (5 / 9)
	var_celsius = float(var_celsius)
	return var_celsius


def convert_to_celsius(temperature):
	pass

def weather_info(celsius):
	celsius = (celsius - 32) * (5 / 9)
	if celsius < 0:
		return f'{celsius} is freezing temperature'
	else:
		return f'{celsius} is above freezing temperature'


def weather_info(temp):
	c = convert_to_celsius(temp)
	result = f'{c} is above freezing temperature'
	result2 = f'{c} is freezing temperature'
	if c > 0:
		return result
	else:
		return result2

def convert_to_celsius(temperature):
	celsius = (temperature - 32.0) * (5.0 / 9.0)
	return celsius


def weather_info(temp):
	temp1 = (temp - 32) * (5 / 9)
	if temp1 > 0:
		return '{} is above freezing temperature'.format(temp1)
	else:
		return '{} is freezing temperature'.format(temp1)


def weather_info(temp):
	a = float((temp - 32) * (5 / 9))
	if a >= 0:
		return f'{a} is above freezing temperature'
	else:
		return f'{a} is freezing temperature'


ABOVE_FREEZING_TEMP_MSG = '{} is above freezing temperature'
FREEZING_TEMP_MSG = '{} is freezing temperature'

def weather_info(temp):

	def convert_to_celsius(temperature):
		return (temperature - 32) * (5 / 9)
	result = convert_to_celsius(temp)
	return ABOVE_FREEZING_TEMP_MSG.format(result) if result > 0 else FREEZING_TEMP_MSG.format(result)


def weather_info(temperature):
	c = convert_to_celsius(temperature)
	if c > 0:
		return f'{c} is above freezing temperature'
	else:
		return f'{c} is freezing temperature'

def convert_to_celsius(temperature):
	c = (temperature - 32) * (5 / 9)
	return c


def weather_info(temp_fahrenheit):
	temp_celsius = convert_to_celsius(temp_fahrenheit)
	return f'{temp_celsius} is freezing temperature' if temp_celsius < 0 else f'{temp_celsius} is above freezing temperature'

def convert_to_celsius(fahrenheit):
	return (fahrenheit - 32) * (5 / 9)


def weather_info(temp):
	x = (temp - 32) * (5 / 9)
	if x > 0:
		return str(x) + ' is above freezing temperature'
	elif x < 0:
		return str(x) + ' is freezing temperature'


weather_info = lambda temp: f"{(temp - 32) * (5 / 9)} is {['', 'above '][temp > 32]}freezing temperature"