Skip to content

mraza007/Python-for-beginners

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

190 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🐍 Python for Beginners

A free, hands-on course that takes you from zero to confident with Python — no prior experience needed. Every lesson is short and practical, with runnable examples and exercises (and solutions) so you learn by doing.

Two ways to learn:

  • ▶ Interactive (in your browser): run and edit every example live — no install. See Run the interactive course.
  • 📖 Plain files: read the Markdown lessons and run the .py files in any editor. Great on GitHub or offline.

Get started

  1. New to Python? Read SETUP.md to install Python (or run the browser version) and write your first program.
  2. Ready to learn? Start with 01 · Variables and work straight down the list below.
  3. Done with the basics? Build the capstone projects.

Each lesson folder contains:

course/NN-topic/
  README.md     ← the lesson (start here)
  examples/     ← runnable example scripts
  exercises/    ← practice files with TODOs
  solutions/    ← worked answers (peek after you try!)

Curriculum

Part 1 — Fundamentals

  1. Variables
  2. Data Types & Numbers
  3. Strings
  4. Booleans & Comparison
  5. Operators, Expressions & Statements
  6. Conditionals
  7. Loops
  8. Input & Output

Part 2 — Data Structures

  1. Lists
  2. Tuples & Sets
  3. Dictionaries
  4. Comprehensions

Part 3 — Functions & Modules

  1. Functions
  2. Lambdas & map/filter
  3. Modules & the Standard Library
  4. Iterators & Generators

Part 4 — Real-World Python

  1. Exceptions & Error Handling
  2. File Handling
  3. Debugging

Part 5 — Object-Oriented Programming

  1. Classes & Objects
  2. Encapsulation
  3. Static & Class Members

🧩 Capstone Projects


Run the interactive course

The web/ folder is a small site that renders the lessons and runs Python right in your browser via Pyodide — your code never leaves your machine.

# from the project root
python3 -m http.server 8000

Then open http://localhost:8000/web/. Read a lesson, edit any example, and hit ▶ Run. (A local server is needed so the page can load the lesson files; a modern browser is the only other requirement.)


How to use the exercises

  1. Open an exercise file — the task and the expected output are in the comment at the top.
  2. Write your code where it says # TODO.
  3. Run it: python course/<module>/exercises/<file>.py.
  4. Compare with the matching file in solutions/.

Get stuck and experiment — that's where the learning happens.


Contributing

Found a typo or have an idea for a clearer example or new exercise? Contributions are very welcome — see CONTRIBUTING.md.

License

Released under the MIT License — free to use, share, and adapt.

About

I created this repo to save all my python related language notes

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors