Numbers & Math (Integers, Floats, Math Package) - Go Tutorial for Beginners #4
5views
005:21
T
Taught by Celeste AI - AI Coding Coach
View on YouTubeDescription
Learn how to work with numbers and math in Go! ๐ข
In this lesson, you will learn:
โ
Integer arithmetic operations
โ
Floating point numbers (float32, float64)
โ
Integer vs float division
โ
The math package (Sqrt, Pow, Round, Floor, Ceil)
โ
Type conversions between numeric types
๐ Timestamps:
0:00 - Introduction
0:24 - Integer Arithmetic
1:12 - Floating Point Numbers
2:05 - Math Package
3:00 - Type Conversions
3:57 - Recap
4:27 - End
๐ป Source Code: https://github.com/GoCelesteAI/go_numbers
๐ Code from this lesson:
// Integer arithmetic
a := 17
b := 5
fmt.Println("Div:", a/b) // 3 (truncates)
fmt.Println("Mod:", a%b) // 2 (remainder)
// Float types
var price float64 = 19.99
fmt.Printf("Total: $%.2f\n", price*1.08)
// Math package
math.Sqrt(16) // 4
math.Pow(2, 8) // 256
math.Round(3.7) // 4
Back to tutorials๐ Read the articleOpen in YouTube
Duration
5:21
Published
January 26, 2026
Added to Codegiz
March 15, 2026