Detailed python tutorial with examples.

Author: Sourav Singh (@sourav-codes104)
“Learning Python, one line at a time.”
This repository contains basic Python programs that cover the foundational concepts of Python programming — perfect for beginners and for quick revision of core topics.
It includes examples related to:
- Variables & Data Types
- Conditional Statements
- Loops
- Functions
- Recursion
- Modules
- Arithmetic & Logical Operations
- Number-based logic (prime, factorial, Fibonacci, etc.)
- String manipulation and methods
- Simple Python utilities (like temperature converter, calculator, etc.)
| File Name | Description |
|---|---|
variable.py |
Demonstrates Python variables and assignment |
typecasting.py |
Examples of type conversions |
input.py |
Taking input from user |
if - else statement.py |
Conditional branching examples |
logical operators.py |
Usage of logical (and, or, not) |
arithemetic operator.py |
Arithmetic operations demo |
factorial.py |
Recursive and iterative factorial programs |
fibonacci_series.py |
Fibonacci number generation |
prime_number_check.py |
Checks whether a number is prime |
print_prime_number.py |
Prints first N prime numbers |
string_reverse.py |
Reverses a string manually & using slicing |
string methods.py |
Built-in string methods in Python |
simple calculator.py |
A basic arithmetic calculator |
geometry.py |
Geometric formula examples |
import.py & import_2.py |
Demonstration of module imports |
math_module.py |
Math library examples |
linear search.py |
Search algorithm example |
decorators.py |
Basic decorator function example |
temperature converter.py |
Celsius ↔ Fahrenheit converter |
class.py |
Example of Python classes and OOP concepts |
Modules in Python/ |
Programs demonstrating module creation and import |
- Clone the repo:
git clone https://github.com/sourav-codes104/python-basics.git