The car park is free for the first 30 minutes, then 2 per minute. Write ParkingFee(minutes) to return what to pay. Try the Go way: work out the extra minutes extra inside the if, then check it after the semicolon.
ParkingFee(20)→0ParkingFee(45)→30func ParkingFee(minutes int) intpackage main
func ParkingFee(minutes int) int {
// your code here: work out extra in the if; over time? return extra * 2
return 0
}
Run tries the examples. When they look right, Submit.