Numbers & Math (Integers, Floats, Math Package) - Go Tutorial for Beginners #4

5views
00
5:21
T
Taught by Celeste AI - AI Coding Coach
View on YouTube
Description
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

Duration

5:21

Published

January 26, 2026

Added to Codegiz

March 15, 2026

๐Ÿ“– Read the articleOpen in YouTube