Python Crash Course (3rd Edition) – Micro
Learning Plan (5–15 Minute Tasks)
This document provides short 5–15 minute exercises that follow the chapter order of the book
'Python Crash Course (3rd Edition)'. Completing these tasks sequentially ensures that all major
concepts in the book are practiced in small learning bursts.
Chapter 1 – Getting Started
• Install Python and verify installation using python --version.
• Create a Python file [Link] and print 'Hello Python world!'.
• Modify the message printed in [Link].
• Introduce an intentional syntax error and observe the error message.
• Run the script from the terminal multiple times to understand execution.
Chapter 2 – Variables and Simple Data Types
• Create a variable storing a message and print it.
• Modify the variable value and print again.
• Use string methods: title(), upper(), lower().
• Use f-strings to insert variables into sentences.
• Practice stripping whitespace using strip(), lstrip(), rstrip().
• Perform basic arithmetic operations (+, -, *, /).
• Create a variable for your favorite number and print it.
Chapter 3 – Lists
• Create a list of 3 favorite foods and print it.
• Access items using indexes and print them.
• Use title() on a list item.
• Modify an item in the list.
• Add new elements using append() and insert().
• Remove items using del, pop(), and remove().
• Sort a list using sort() and sorted().
• Reverse a list using reverse().
• Use len() to find list length.
Chapter 4 – Working with Lists
• Write a for loop that prints each item in a list.
• Print a custom sentence for each item in the loop.
• Use range() to print numbers 1–10.
• Create a list of numbers using list(range()).
• Find min(), max(), and sum() of a numeric list.
• Create squares using list comprehension.
• Slice lists to print first, middle, and last items.
• Copy a list using slicing.
• Create and print a tuple.
Chapter 5 – If Statements
• Write a simple if statement checking age >= 18.
• Create an if–else statement.
• Add elif to handle multiple conditions.
• Write a loop that prints different formats for specific items.
• Check membership in a list using 'in'.
• Check non-membership using 'not in'.
Chapter 6 – Dictionaries
• Create a dictionary with name, age, and city.
• Access values using keys.
• Add a new key-value pair.
• Modify an existing value.
• Loop through dictionary items().
• Loop through keys().
• Loop through values().
Chapter 7 – User Input and While Loops
• Use input() to ask the user their name.
• Convert input to an integer using int().
• Write a while loop counting from 1 to 5.
• Create a program that runs until user types 'quit'.
• Use a flag variable to control loop execution.
Chapter 8 – Functions
• Define a simple function and call it.
• Pass a parameter to a function.
• Use multiple parameters.
• Return a value from a function.
• Use default parameter values.
• Call a function with keyword arguments.
Chapter 9 – Classes
• Create a simple class with attributes.
• Create an instance of the class.
• Add a method that prints a description.
• Modify attribute values.
• Create multiple objects from the same class.
• Implement inheritance using a child class.
Chapter 10 – Files and Exceptions
• Open and read a text file.
• Read file line by line using a loop.
• Write text to a file.
• Append text to an existing file.
• Handle exceptions using try/except.
Chapter 11 – Testing Your Code
• Install pytest.
• Write a simple test for a function.
• Run the test using pytest.
• Write multiple tests for edge cases.
Chapter 12 – Pygame (Alien Invasion Intro)
• Install pygame.
• Create a window using pygame.
• Change background color.
• Handle keyboard input.
Chapter 13 – Alien Invasion (Ship and Bullets)
• Create a ship class.
• Move the ship with keyboard input.
• Add bullets that move upward.
• Limit number of bullets.
Chapter 14 – Alien Invasion (Aliens)
• Create alien objects.
• Generate a fleet of aliens.
• Move aliens across the screen.
• Detect collisions between bullets and aliens.
Chapter 15 – Scoring and Game Improvements
• Add scoring logic.
• Display score on screen.
• Add levels and speed increase.
Chapter 16 – Data Visualization (Matplotlib)
• Install matplotlib.
• Create a simple line plot.
• Customize labels and titles.
• Plot random walk data.
Chapter 17 – Scatter Plots
• Create a scatter plot.
• Use color maps to visualize values.
• Generate many random points.
Chapter 18 – Working with APIs
• Use requests library to call an API.
• Parse JSON response.
• Extract key information from JSON.
• Display API results in a simple format.
Chapter 19 – Django Web Applications
• Install Django.
• Create a Django project.
• Create an app.
• Run development server.
• Create a basic page view.
Chapter 20 – Deploying Web Applications
• Prepare project for deployment.
• Configure production settings.
• Push code to a repository.
• Deploy to a hosting platform.