Home › coding › python › py numbers

Py Numbers — Free Python Tutorial

Learn Py Numbers in Python with a free, beginner-friendly tutorial, examples and practice for Indian students on Syllab.in.

✓ 100% Free ✓ No Login Needed ✓ NCERT / CBSE Aligned ✓ Download as PDF

TL;DR: Learn Py Numbers in Python with a free, beginner-friendly tutorial, examples and practice for Indian students on Syllab.in.

Written & reviewed by the Syllab.in Academic Team (CBSE/NCERT subject experts) · Updated Jul 14, 2026

🤖 Stuck on any question? Ask Syllab's free AI Tutor for a step-by-step explanation — instant, unlimited, no login.

Py Numbers in Python

Python has three numeric types: int (whole numbers like 5, -3, 1000), float (decimals like 3.14, -0.5, 2.0), and complex (for advanced maths like 3+4j — rarely needed at school level).

Type casting converts one type to another: int("42") converts string "42" to integer 42. float(7) converts integer 7 to float 7.0. str(100) converts integer 100 to string "100". This is essential when reading user input (always comes as string) and doing arithmetic.

Python arithmetic operators: + (add), - (subtract), * (multiply), / (true divide — always returns float), // (floor divide — drops decimal), % (modulo — remainder), ** (power/exponent).

Py Numbers — Syntax

int(x)     # convert to integer
float(x)   # convert to float
str(x)     # convert to string
round(x, n) # round to n decimal places

Learn Py Numbers step by step with Syllab's free interactive Python tutorial — runnable code examples, practice exercises and instant AI feedback, all free with no signup. Explore the full Python course →

Explore:

  • Syllabus
  • Practice
  • Mock Tests
  • NCERT Solutions
  • Coding
  • GK Quiz
  • Career Predictor
  • AI Tutor
  • Live Quiz
  • Doubt Solver
  • Microlearning
  • Free Alternatives
  • Kids Zone
  • Study Room
  • Calculators
  • Worksheets

Syllab.in — Free learning for Indian students, Class 1–12