Python Variables, Data Types and Input/Output Explained for Beginners

Python Variables, Data Types and Input/Output

Author: Gursehbaj Singh | Blog: DevMode

What is a Variable?

A variable stores data in memory.


age = 18
name = "Gursehbaj"

Common Data Types

  • int → integer numbers
  • float → decimal numbers
  • str → string text
  • bool → True / False
  • list, tuple, dict → collections

Taking User Input


name = input("Enter your name: ")
age = int(input("Enter your age: "))
print("Hello", name, "you are", age, "years old.")

Conclusion

Understanding variables, data types, and input/output is the first step in Python programming. Practice by creating simple programs like a calculator or greeting messages.

Comments

Popular posts from this blog

Top 10 Free Coding Websites Every Beginner Should Use in 2026

Graph Data Structure – Complete Beginner to Advanced Guide with BFS, DFS and Examples

5 JavaScript Console Methods You're Not Using (But Should Be)