Hi again! I really like coding
package main
import "fmt"
type Info struct {
Name string
Age int
IsStudent bool
}
type InfoAboutMe struct {
Info
Hobby string
}
var introduce = InfoAboutMe{
Info: Info{Name: "Willie Parrot", Age: 21, IsStudent: true}, // Um actually I'm 13 ☝🤓
Hobby: "Origami (折り紙), Kirigami (切り紙) and Kumiko (組子), and I'm not Japanese",
}
func main() {
amIaStudent := "no"
if introduce.IsStudent {
amIaStudent = "yes"
}
fmt.Println("My name is ", introduce.Name)
fmt.Println("I am ", introduce.Age, " years old")
fmt.Println("Am I a student? ", amIaStudent)
fmt.Println("My hobbies are ", introduce.Hobby)
}You don't know the output? Let me help you :)
Output:
My name is Willie Parrot
I am 21 years old
Am I a student? yes
My hobbies are Origami (折り紙), Kirigami (切り紙) and Kumiko (組子), and I'm not Japanese
