Solution Review: Temperature Conversion
Understand how to use Go's type aliases to represent Celsius and Fahrenheit temperature types. Learn to write a conversion function applying the standard formula and practice calling it in a main program. This lesson helps build foundational skills in Go function creation and type management.
We'll cover the following...
We'll cover the following...
-
Lines 7-8: We aliased the types of the temperature, i.e.,
float32toCelsiusandFahrenheit. At line 7, we alias the type float 32 by giving the nameCelsius. We need another type calledFahrenheit, ...