This repository contains Python basics that cover all the essential topics for absolute beginners in programming. These notes and code examples are designed to help you understand the building blocks of Python, which is the backbone of Data Analytics and Data Science.
When I first started learning Python, I created this notebook to understand and practice fundamental concepts. Today, whenever I revisit this code, it helps me revise and refresh my Python basics — and I hope it does the same for you!
📁 You can find the complete notebook with working code here:
👉 GitHub Repository
- Using
'single',"double", and'''triple'''quotes - Printing strings, numbers, and special characters
- Single-line comments using
# - Multi-line comments using
''' '''or""" """
- Naming conventions
- Assigning different types of values
- Case sensitivity
- Input from user using
input() - Type conversion with
int(),float(), andeval() - Using
type()to identify data types
- Implicit and Explicit conversions
- Converting between strings, integers, and floats
- Arithmetic:
+,-,*,/,//,%,** - Comparison:
==,!=,<,>,<=,>= - Logical:
and,or,not - Assignment:
=,+=,-=, etc. - Identity:
is,is not - Membership:
in,not in - Bitwise:
&,|,^,~,<<,>>
if,else,elif- Nested if statements
- Short-hand if and if-else
- Displaying a person’s name, age, and address
- Swapping variables (two methods)
- Converting float to integer
- Creating a student ID card form
- Type conversions from int to float
- Checking if number is positive or negative
- Odd or even number checker
- Area calculator (circle, rectangle, triangle)
- Vowel checker
- Digit count checker (1–5 digits)
Python is the backbone of modern Data Analytics. Mastering these basics builds a strong foundation for advanced libraries like NumPy, Pandas, and tools like Power BI, SQL, and Excel. This is a part of my learning journey, and I'm sharing it to help others who are just starting.
Feel free to explore the code and star the repo if you find it helpful ⭐
📁 python-basics/
│
├── python_basics.ipynb # Jupyter Notebook with all examples and problems
├── README.md # You’re here!