Python from Zero: Extended Course

Coming Soon - Course materials under development

Having mastered the fundamentals of coding, you will transform your simple terminal Flashcards app into a rich web-based personal teaching app, with content generated by AI. You will extend your skillset and get fully comfortable with industry practices.

By the end of the extended course, you’ll have:

✅ A professional web application deployed to the cloud
✅ AI-powered quiz generation from any content
✅ User authentication and personal data storage
✅ Efficient async API integration
✅ Clean, modular, well-documented code
✅ A portfolio piece showcasing modern development skills


🎯 MILESTONE 4: Web-sourced flashcard content

What you’ll build: A database of flashcard content sourced from the internet by scraping or API calls

Core concepts:

  • HTTP requests and REST APIs
  • Fetch data from APIs using requests library
  • Parse JSON API responses and extract relevant data
  • Web scraping with BeautifulSoup (HTML parsing, CSS selectors)
  • Blocking vs non-blocking code execution
  • Synchronous and asynchronous programming models
  • async and await keywords for concurrent operations
  • Fetch multiple API calls concurrently with httpx or aiohttp
  • SQLite database basics (sqlite3 module)
  • SQL fundamentals (CREATE, INSERT, SELECT, UPDATE)
  • Database schema design for flashcard content
  • Connection management and cursor operations
  • Error handling for network requests (timeouts, rate limits, HTTP errors)
  • API authentication and headers
  • Respecting robots.txt, ethical web scraping, managing quotas and rate limits
  • Caching strategies to avoid redundant requests

Programming patterns:

  • API request → parse → store pattern
  • Try-except for network error handling
  • Rate limiting and request throttling
  • Async/await pattern for concurrent operations
  • Context managers for database connections
  • Connection pooling for efficiency
  • Batch insertion for database performance
  • Data validation before storage
  • Retry logic with exponential backoff

Libraries introduced:

  • requests - HTTP library for making API calls
  • BeautifulSoup (bs4) - HTML/XML parsing and web scraping
  • httpx or aiohttp - Async HTTP client
  • asyncio - Built-in async/await support
  • sqlite3 - Built-in SQLite database interface

Exercises:

  • Exercise 25: Fetch word definitions from a dictionary API
  • Exercise 26: Scrape Wikipedia articles for educational content
  • Exercise 27: Convert to async for fetching multiple items concurrently
  • Exercise 28: Store all fetched content in SQLite database
  • Exercise 29: Add menu option to populate flashcards from database

🎯 MILESTONE 5: AI-Powered Teaching Assistant

What you’ll build: A teaching app with different quiz styles (multiple choice, true/false, short answer) driven by your content of choice

AI capabilities you will implement:

  • Generate questions from any text content (articles, notes, textbooks)
  • Create multiple-choice options with plausible distractors
  • Evaluate open-ended answers with nuanced feedback
  • Adjust difficulty based on student performance
  • Provide hints and explanations for wrong answers
  • Support multiple languages
  • Generate varied question styles to prevent monotony

Core concepts:

  • Large Language Model (LLM) APIs (OpenAI, Anthropic Claude, etc.)
  • API key management and environment variables (.env files)
  • Prompt engineering fundamentals
  • System prompts vs user prompts
  • Few-shot learning and examples in prompts
  • Temperature and creativity parameters
  • Token counting and cost management
  • Streaming vs complete responses
  • JSON mode for structured output
  • Conversation history and context management
  • Error handling for AI API failures

  • Prompt templates and reusability
  • Evaluating AI output quality
  • Handling hallucinations and incorrect responses

Programming patterns:

  • Environment variable loading with python-dotenv
  • AI request → parse → validate pattern
  • Prompt template pattern with f-strings
  • Retry logic for failed API calls
  • Fallback handling (AI unavailable → use static content)
  • Cost tracking and budgeting
  • Caching expensive AI generations
  • Batching requests efficiently
  • Structured output parsing (JSON extraction)
  • Conversation state management

Libraries introduced:

  • openai - OpenAI API client (GPT models)
  • anthropic - Anthropic API client (Claude models)
  • python-dotenv - Load environment variables from .env file
  • tiktoken - Token counting for OpenAI models

Exercises:

  • Exercise 30: Set up API credentials securely
  • Exercise 31: Generate simple flashcard questions from user text
  • Exercise 32: Generate multiple question types (multiple choice, true/false, fill-in-blank)
  • Exercise 33: Implement AI-powered answer evaluation with partial credit
  • Exercise 34: Add difficulty adaptation based on user performance
  • Exercise 35: Create conversation mode (Socratic questioning)

🎯 MILESTONE 6: Web-based app deployed

What you’ll build: A web-based teaching app accessible from any browser, with user accounts and persistent storage

Web features you will implement:

  • User accounts with secure authentication
  • Personal flashcard decks
  • Progress tracking dashboard with charts
  • Responsive design (mobile-friendly)
  • Share decks with other users
  • Public/private deck settings
  • Search and filter functionality
  • REST API for mobile app integration

Core concepts:

  • Web application architecture (MVC pattern)
  • Web frameworks (Flask or FastAPI)
  • HTTP methods (GET, POST, PUT, DELETE)
  • URL routing and endpoint handlers
  • Template engines (Jinja2 for Flask)
  • Static files (CSS, JavaScript, images)
  • Forms and form validation
  • Sessions and cookies for state management
  • User authentication and authorization
  • Password hashing (bcrypt, argon2)
  • Database ORM (SQLAlchemy)
  • Database migrations and schema evolution
  • Frontend-backend communication (AJAX/fetch)
  • REST API design principles
  • Environment configuration (development vs production)
  • Cloud deployment platforms (Render, Heroku, Railway, Vercel)
  • Production servers (Gunicorn, Uvicorn)
  • Environment variables in production
  • Secrets management
  • HTTPS and secure connections
  • CORS (Cross-Origin Resource Sharing)
  • Logging and monitoring

Programming patterns:

  • MVC (Model-View-Controller) pattern
  • Route → handler → template pattern
  • Form submission and validation pattern
  • Session management pattern
  • Authentication decorator pattern
  • Database query pattern with ORM
  • Middleware for request processing
  • Error page handling (404, 500)
  • Flash messages for user feedback
  • Pagination for large datasets
  • API versioning
  • Configuration management by environment

Libraries introduced:

  • flask or fastapi - Web framework
  • jinja2 - Template engine (built into Flask)
  • flask-login or fastapi-users - User authentication
  • sqlalchemy - Database ORM
  • alembic - Database migrations
  • wtforms or pydantic - Form validation
  • bcrypt - Password hashing
  • gunicorn or uvicorn - Production WSGI/ASGI server
  • python-multipart - File upload handling

Exercises:

  • Exercise 36: Reorganize command-line code into modules
  • Exercise 37: Create basic Flask app with routes and templates
  • Exercise 38: Add CSS styling (responsive design with Bootstrap/Tailwind)
  • Exercise 39: Implement user registration and login
  • Exercise 40: Convert to database storage (SQLAlchemy + PostgreSQL)
  • Exercise 41: Add AJAX for dynamic flashcard interactions
  • Exercise 42: Deploy to cloud platform (Render/Railway)

Prerequisites: Completion of Exercises 0-22 (Core Python fundamentals)

Start here if you haven’t done this yet.