Emma has created a function circleArea that calculates the area of a circle ⭕ and then writes it to a file circle_area.txt:
package main
import (
"fmt"
"log"
"math"
"os"
)
func circleArea(radius float64) {
area := math.Pi * math.Pow(radius, 2)
file, err := os.Create("circle_area.txt")
if err != nil {
log.Fatal(err)
}
_, err = ? // the selected code line goes here
if err != nil {
log.Fatal(err)
}
}
Can you help Emma select the correct code line required to write the area to the file with 3 decimal places?