Test cases are done so bad!
It cant be possible that so many test cases which are correct rely on one solution.
For Example in Lesson 2 Type conversion
In the code given in the editor, we have three different variables, namely length, width and area.
To find the value of the area, you have to multiply the length and width values, but they are of different types.
So to do this you will have to convert one of the values to the other type.
The expected value of the area is 12. So please find the area and provide the code on line number 8.
This is also correct code and solves the case:
package main
import "fmt"
func main() {
var length float64 = 3.5
var width int = 4
var area int = width * int(length)
fmt.Println("Area is:",area)
}
What is wrong here??