Welcome to the Python Fundamentals repository! This is a comprehensive, step-by-step learning guide containing beginner-friendly Python programs. It covers core syntax, logic building, data structures, and file operations.
The building blocks of Python. Covers how to store data and output information to the console.
helloWorld.pyβ Your very first Python script.variable.pyβ Variable declaration and assignment basics.datatype.pyβ Exploring fundamental types (int,float,str,bool).comment.pyβ Documenting code using single-line and multi-line comments.
Taking user inputs and performing operations on variables.
- Basic Arithmetic:
sum.py,subtraction.py,division.py,modulo.py,power.py - Operators:
assignmentop.py,logicalop.py,relationalop.py - User Input & Conversions:
inputop.py,nameinput.py,num.py,typeconv.py - Practical Math:
rectanglearea.py,squarearea.py,floatavg.py
Manipulating text and making decisions based on specific conditions.
- Strings:
concatenation.py,count.py,indexing.py,slicing.py,strfunction.py,lengthofstr.py,inputstrlength.py - Formatting:
newline.py,tab.py - Conditional Logic:
oddeven.py,grades.py,greatestof3.py,multipleof7.py,trafficsignal.py,nesting.py
π 04-Lists-And-Tuples
Working with ordered sequences of data (both mutable and immutable).
- Lists:
list1.py,list2.py,listmethods.py,listslicing.py - Tuples:
tup1.py - Practice Questions:
listsquestion.py,listsquestion2.py,listsquestion3.py,tupquestion1.py
Storing data in unique and unordered collections using key-value pairs and sets.
π 06-Loops
Mastering repetition structures to write efficient code.
- While Loops:
while1.pytowhile4.py,whileque1.pytowhileque4.py,sumwithwhile.py,factorialwithwhile.py - For Loops:
for1.py,forpass.py,evenwithfor.py,oddwithfor.py,sumwithfor.py,factorialwithfor.py - Range & Practice:
forrange1.py,forrange2.py, Loops questions (forque1.pythroughforque7.py)
Breaking down code into reusable blocks and resolving problems via self-calling functions.
- Functions:
func1.py,func2.py, Practice questions (funcque1.pythroughfuncque8.py) - Recursion:
recur1.py,recur2.py, Practice questions (recurque1.py,recurque2.py)
π 08-File-Input-Output
Interacting with persistent data through reading, writing, and modifying external files.
- File Basics:
fileio1.pytofileio5.py - The
withSyntax:fileiowith1.pytofileiowith6.py - File Operations:
filedelete.py - Practice Questions:
fileioque1.pytofileioque5.py
- Clone the Repository:
git clone [https://github.com/dpuwar08/Python-Fundamentals.git](https://github.com/dpuwar08/Python-Fundamentals.git)