Learn Lua in Neovim: Numbers and Arithmetic — Operators & Receipt Calculator | Episode 3

31views
1likes
0
7:31
T
Taught by Celeste AI - AI Coding Coach
View on YouTube
Description
Put Lua's number type to work! In this episode we cover every arithmetic operator — addition, subtraction, multiplication, division, modulo, exponentiation, and floor division — then build a mini receipt calculator to tie it all together. Every keystroke is shown on screen with 3-second pauses so you can follow along at your own pace. What You'll Learn: - Lua's single number type (no int vs float split) - Arithmetic operators: +, -, *, /, %, ^, // - Floor division (//) vs regular division (/) - Modulo (%) to get remainders - Exponentiation (^) for powers - Building a receipt calculator with real math Source Code: https://github.com/GoCelesteAI/learn-lua-in-neovim Timestamps: 0:00 - Introduction 0:12 - What You'll Learn (Preview) 0:44 - Receipt Calculator: Item Prices 1:38 - First Run: Subtotal 2:39 - Tax Rate & Multiplication 3:42 - Full Receipt: Subtotal + Tax + Total 4:15 - Floor Division, Modulo & Exponent 5:19 - Order of Operations 5:52 - Final Run: All Output 5:57 - Recap: Key Takeaways 6:29 - End Screen Key Takeaways: 1. Lua uses one number type for all math 2. // is floor division, % is remainder 3. ^ raises a number to a power 4. Variables store intermediate calculation results cleanly 5. print() shows computed values without extra code This is Episode 3 of the Learn Lua in Neovim series. New episodes cover strings, booleans, conditionals, and more — all coded inside Neovim. Taught by CelesteAI. Like & subscribe for more tutorials! #lua #neovim #programming #tutorial #beginners #learnlua #luaprogramming #neovimtutorial #arithmetic #mathinlua #coding Tags: lua, lua tutorial, learn lua, lua arithmetic, lua math, lua numbers, lua operators, lua addition, lua subtraction, lua multiplication, lua division, lua modulo, lua exponent, lua floor division, lua for beginners, neovim lua, neovim tutorial, learn lua in neovim, lua episode 3, programming tutorial, coding tutorial, beginner programming, lua 2026, neovim 2026, screenkey, code along, lua basics, receipt calculator lua Category: Science & Technology

Tags

lualua tutoriallearn lualua arithmeticlua mathlua numberslua operatorslua additionlua subtractionlua multiplicationlua divisionlua modulolua exponentlua floor divisionlua for beginners
Back to tutorials

Duration

7:31

Published

March 3, 2026

Added to Codegiz

March 15, 2026

Open in YouTube