Inkhmer LogoInKhmerBuilding the digital future
  • About
  • Projects
  • Blog
  • Tools
  • Learn
  • Contact
KMខ្មែរENEnglish

InKhmer.com — a personal Khmer Digital Hub curated by our team. Tools, Cambodia resources, Khmer culture, and digital projects. Practical, approachable, and built for everyone.

Social

FacebookTelegram

Quick Links

  • About
  • Projects
  • Blog
  • Tools
  • Learn
  • Contact

Explore

  • What We Build
  • How We Build
  • Roadmap
  • Experiments
  • Sitemap

Subscribe to our newsletter

Get the latest updates about Cambodia, new tools, and exclusive content delivered to your inbox.

  • Terms of Service
  • Privacy Policy
  • Cookie Policy

© 2026 InKhmer. All rights reserved.

LearnPython for AI and Data in KhmerValues and variables

Values and variables

A variable is a named box holding a value: price = 5000 means the box called price holds the number 5000.

The key value types:

  • int (whole number): quantity = 25
  • float (decimal): rate = 4100.5
  • str (text): province = "សៀមរាប" — in quotes
  • bool (true/false): in_stock = True

Operators: + - * / work like arithmetic. // gives the whole-part of division, % the remainder.

price_khr = 20000
rate = 4100
price_usd = price_khr / rate   # ~4.88
name = "ម្ហូបក្រៀម"
print(name, price_usd)

Naming rules: short and meaningful — price_khr beats x. Python is case-sensitive: Price and price differ.

Takeaways:

  • Variable = a named box holding a value
  • int, float, str, bool — the basic value types
  • Short meaningful names make code readable

Sign in to start tracking from this lesson