Challenge: Creating a Structure
Task
Create a structure named Car
with fields company
, owner
, miles
, and year
in the same order. Assign appropriate data types to them based on the provided code.
index.go
12345678910111213141516package main import "fmt" // Write code below this line // Write code above this line func main() { var car1 Car car1.company = "Tesla" car1.owner = "Tegmark" car1.miles = 10.7 car1.year = 2021 fmt.Println(car1) }
¿Todo estuvo claro?
¡Gracias por tus comentarios!
Sección 6. Capítulo 8
Pregunte a AI
Pregunte a AI
Pregunte lo que quiera o pruebe una de las preguntas sugeridas para comenzar nuestra charla
Awesome!
Completion rate improved to 1.96
Challenge: Creating a Structure
Desliza para mostrar el menú
Task
Create a structure named Car
with fields company
, owner
, miles
, and year
in the same order. Assign appropriate data types to them based on the provided code.
index.go
12345678910111213141516package main import "fmt" // Write code below this line // Write code above this line func main() { var car1 Car car1.company = "Tesla" car1.owner = "Tegmark" car1.miles = 10.7 car1.year = 2021 fmt.Println(car1) }
¿Todo estuvo claro?
¡Gracias por tus comentarios!
Sección 6. Capítulo 8