Skip to content

gabrielmaldonado164/master_python

Repository files navigation

master_python

func main() { //Declaracion de constantes const pi float64 = 3.14 const pi2 = 3.16

fmt.Println("Pi:", pi)
fmt.Println("Pi2:", pi2)

//Declaracion de varaibles
base := 12          //Primera forma
var altura int = 14 //Segunda forma
var area int        //Go no compila si las variables no son usadas

fmt.Println(base, altura, area)

//Zero values
//Go asigna vaalores a variables vacías
var a int
var b float64
var c string
var d bool

fmt.Println(a, b, c, d)

//Ejercicio
//Calcular el áera del cuadrado
const baseCuadrado = 10
areaCuadrado := baseCuadrado * baseCuadrado

fmt.Println("El área del cuadrado es:", areaCuadrado)

}```

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages