
Install Python from python.org on your computer, download the latest version, add python.exe to your system path, verify with python --version, and start writing your own scripts and programs.
Discover idle, Python's built-in, basic integrated development environment, featuring an interactive shell, script editing, saving as .py, and running programs, with tips and alternatives like VSCode.
Learn how to use pip, Python's package installer, to install external libraries like pygame and others, verify with pip freeze, and resolve a module not found error for Python projects.
Install and customize Visual Studio Code, add Python and HTML extensions, adjust font size, and learn to run a Python file with the debugger for color-coded output.
Download and unzip the course resources, including starter files, completed files, and problem guides, then open the folder in your editor to code along.
Explore how the Python print function works, including its arguments, separators, and end behavior, and understand how to pass strings and multiple inputs in a basic data types lesson.
Explore the Python print function through a homework-style exercise that prints one, two, and three messages with custom separators, including dollar signs, using sep and end.
Learn how to use variables to store data, assign values with the assignment operator, and print variables versus literal strings, while adopting descriptive names and valid naming conventions.
Practice variables by storing hair color and shoe size in descriptive variables, then print their values. Override them to new values and print both in a single statement.
Explore strings as a non-primitive data type, use methods like upper, lower, title, and strip, and learn immutability, concatenation, and count and find operations.
Master python string basics by creating and updating a favorite movie variable, printing values, and applying upper and lower case methods. Practice string concatenation and method usage.
Explore integers and floats, their immutability, and how operators work, including division, floor division, modulo. Convert numbers to binary and hexadecimal, and use math library for pi, sqrt, and factorial.
Learn how to work with integers and floats in Python by building and printing expressions, rounding quotients to two decimals, and computing square roots with the math library.
Explore Python data types with the type function, learn to distinguish strings, integers, and floats, and master temporary and permanent casting via int, float, string, and the assignment operator.
Use the type function to verify data types and cast strings to integers with int, switching from concatenation to addition. Observe the type changes and the new sum.
Explore the Python input function and prompts, storing user responses as strings to drive dynamic programs. Cast input to int or float and format outputs with print.
Master the input function by building a program that asks for a name and age, title case the name, casts age to int, and prints the age in 15 years.
Discover Python string formatting options, from concatenation and print with multiple arguments to the format method with placeholders. Learn why f-strings offer readable, concise, and embedded expressions for future use.
Learn Python string formatting with f-strings by embedding name, age, height, and illness details. Build outputs for duration and temperature, such as 'Chicken pox lasts ten days and reaches 102.5°F'.
Create a rectangle calculator that asks for width and height, casts inputs to float, computes the area and perimeter, and displays results with formatted output.
Create a Python mph to meters per second converter that prompts for miles per hour, converts using 0.4474, rounds to two decimals, and prints a formatted result.
Build a temperature converter that takes Fahrenheit input, converts to Celsius and Kelvin, rounds results to four decimals, and displays a summary table using f-strings.
Build a Python letter counter app that asks for a name, a message, and a letter to count. Use lower and count to ensure case-insensitive counting, then show results.
Build a right triangle calculator that prompts for the base and height and computes the hypotenuse using the Pythagorean theorem. Calculate the area and round to three decimals.
Discover how to create and manipulate lists in python, including mutability, indexing with positive and negative indices, and updating elements, printing lists, and computing length.
Create a list of colors, print the list and the second and last colors using indexing, replace the first color with aqua via the assignment operator, and print list's length.
Learn how to modify Python lists by appending elements to the end and inserting items at specific indices, using mutable lists, with practical examples like colors, ages, and foods.
Practice adding elements to a list with append and insert, collect three user inputs for teams, force Knicks to the front, and print the final list.
Learn list removal in Python using remove by value and pop by index, note return values, duplicates, and errors, and how copying preserves original lists.
Practice removing elements from a list by copying the grade book to a changed version, using pop and remove methods, handling user input, and keeping the original grade book unchanged.
Master how to sort lists in Python by using temporary and permanent methods, including the sorted function, list.sort, and list.reverse, with attention to strings vs numbers and capitalization.
Sort and print lists to demonstrate temporary vs permanent changes; use sorted for a temporary alphabetical order and list.sort with reverse for a permanent highest-to-lowest order, noting sort is in-place.
Discover how tuples and sets organize data in Python: tuples are immutable containers defined with parentheses, while sets are mutable and enforce unique elements, with practical examples.
simulate an election by storing seven votes in a list and printing the list and its length with length function, then convert to a set to reveal four unique candidates.
Build a favorite teacher survey using a list to collect ranked teachers. Learn to remove by index and by name, overwrite by index, and perform temporary and permanent sorts.
Create a python grocery list app that collects user input, maintains and sorts a foods list, and simulates shopping with removals and alerts for out of stock or sale items.
Explore how sorting lists of different data types, numerical strings, integers, and floats, distinguishes alphabetical from numerical order using Python's sort method and f-strings to display results.
Build a grade sorter app that collects grades, converts them to integers, sorts from highest to lowest, drops the two lowest, and reports the remaining highest and lowest.
simulate a basketball roster using a Python list, assign positions to indices 0–4, collect players via input, display by position, handle injuries with pop and insert, and introduce control flow.
Explore iteration with for loops to process each item in a list or each character in a string, printing messages and using iterable variables with proper indentation.
demonstrate for loops by iterating through a list of sodas and a fruit string, printing per-item messages and a final water reminder.
Master for loops with numerical ranges to iterate a fixed number of times, noting the end is not inclusive and using a step size, plus zip to pair lists.
Learn python for loops by using numerical ranges to print 0–9 and 10–100 by tens, build a friends list from input, and compare range versus list iteration.
Explore for loops to sum ranges and iterables, and use sum, min, and max. Generate squares and cubes with range and exponentiation, then align results using zip.
Build a list of the first 20 powers of two using for loops, append each value, print the list, and print its sum to practice ranges and iterables.
Master nested for loops and nested data structures in Python, looping over lists, strings, and ranges with outer and inner control, illustrated by practical examples.
Explore nested lists and nested loops by building a to-do list with stores and items, printing headers and using zip to iterate store lists in parallel.
Learn to use Python's random library to generate inclusive random integers with randint, select and shuffle items, and build random strings or passwords for games and simulations.
Import the random library, generate five numbers from 1 to 100 with a for loop, create an animals list, print two random animals, print the list, and shuffle the list.
Master binary and hexadecimal conversion using for loops to generate decimal, binary, and hex lists up to a user-defined max, then display their associations in a synchronized table.
Solve quadratic equations with the C math library to handle real and complex roots, introducing complex numbers and guiding input of coefficients a, b, and c.
Build a Python password generator that creates multiple passwords of user-specified lengths using a rich character set (uppercase, lowercase, numbers, symbols) with random selection and nested loops.
Create a Python Fibonacci calculator that generates as many terms as you specify using a for loop and a list. See the ratios converge toward the golden ratio phi 1.618.
Develop a Python GPA calculator that collects a user-defined number of grades, computes the average, highest, and lowest, and determines the grade needed to reach a desired target.
Introduce boolean values as a primitive data type, show true and false results, and demonstrate boolean expressions with equality, not equals, comparisons, string checks, and in or not in lists.
Practice boolean values in Python by evaluating city string comparisons, validating a digit-only phone number with isdigit, and checking list membership for cars, including 'limo'.
Master Python branching with if and else statements, using boolean values, conditional tests, and user input to perform numeric and string comparisons.
Practice writing if/else statements by prompting for a day, standardizing input with title case, and using else if to tailor responses, including a TGIF Friday message.
Master multi-branch logic in Python by using if, elif, and else statements to chain conditions, with practical examples like age checks for gambling and drinking as the default case.
Practice building conditional logic with if, elif, and else by handling weekday inputs, using case-insensitive comparisons, and printing tailored messages like TGIF and weekend greetings with f-strings.
Master python fundamentals by exploring how and and or form compound logic, truth table concepts, and not in practical conditional examples.
Explore Python conditional logic using logical and and or to decide if it’s the last day of the work week, weekend, or a weekday, based on day and weekend input.
Master nested conditionals in Python by using startswith, for loops, and nested if statements. Practice with lists and booleans to control flow and generate dynamic messages.
Apply nested conditionals in Python to validate a user name. Match against a five-name list; Mike is magnificent, other M names are marvelous, P names are perfect, else cool.
Learn to control program flow with break, continue, and pass inside loops, using for loops and a shopping-cart example to show breaking, skipping iterations, and passing over code.
Create Python control statements in a for loop, using continue and break to manage iterations, print iteration values, and use input to decide whether to continue.
This lecture shows a Python shipping accounts manager that uses conditional statements to authenticate users, apply quantity-based pricing tiers, calculate the total cost, and prompt for order placement.
This lecture shows building a guess my number game in Python: a random number from 1 to 20, five guesses, and feedback like too low, too high, or correct.
Build a golf score tracker that handles nine or eighteen holes, tracks total par and total strokes, and outputs results like hole in one, birdie, eagle, or bogey.
Build a python coin toss simulator using random numbers to model heads or tails. Track counts and percentages, optionally show each flip, and flag equal heads and tails.
Design and implement rock paper scissors in Python using conditionals and randomness to play rounds, track scores, validate moves, and display results.
learn how to use dictionaries in Python to store data as key value pairs, access values by keys, and update, pop, clear, and mutate entries.
Create a game state dictionary with player name, level, experience points, health, ammo, and equipped weapon; print the state, then simulate firing to reduce ammo and gain 1500 experience points.
Learn to loop through dictionaries in Python using keys, values, and items to access data; explore practical examples like a food inventory and NFL records.
Practice looping through a restaurant dictionary in Python by iterating keys, values, and items, and use a boolean is_open flag to conditionally print messages via for loops and f-strings.
Master nested data structures by building dictionaries that hold lists and dictionaries, and learn to iterate with for loops and dict.items to access keys and values.
Create three nested dictionaries with name, students enrolled, and credit hours, place them in a courses list, and print each using nested loops.
Build a Python morse code translator using a pre-defined dictionary mapping letters to morse symbols, clean user input, and translate messages into readable morse with separators.
Build a Python thesaurus program that prompts users to choose a word from a predefined dictionary and returns a random synonym, with an option to display all words and synonyms.
Build a Python football trivia game that uses dictionaries for hints, random team and clue selection, three guess attempts, and interactive prompts with non-repeating clues.
Write a Python library inventory system using dictionaries and a list to store books, then search by author, title, or genre with an interactive menu and user input.
Design and implement a dictionary-based database administrator program that handles user login, password validation, admin access to all accounts, and secure password changes with validation.
Master while loops and for loops in Python by exploring iteration for an undetermined amount of time, avoiding infinite loops, using break statements, and controlling flow with flag variables.
Practice implementing a while loop with a guessing game using a random number from 1 to 5. Use a flag variable to control the loop, prompt guesses, stop when correct.
Master controlling while loops with booleans from strings, lists, and numbers, using input validation, isdigit checks, and list element removal to prevent infinite loops.
Master controlling while loops by building a unique five-word list through validated user input. Ensure alphabetic entries, prevent duplicates, and update the list with each valid word.
Model nested while loops with outer and inner loops controlling an Xbox on and gameplay. Use flag variables, user input, and random dreaming to illustrate sleep and dream cycles.
Explore nested while loops with a repeatable number guessing game. Learn to control the game flow using outer and inner loops, random number generation, and user input.
Explore modulo division by examining remainder, divisibility, including even/odd tests, and practical uses like wrapping indices in strings and lists, and simulating a spinning wheel.
Build an interactive Python program that uses modulo division to classify numbers as even or odd, and control the loop with a flag so it ends when the user quits.
The prime number finder demonstrates how to determine if a number is prime and to generate all primes up to a max value, with input validation and a menu-driven loop.
Master the factor generator: determine all factors of a number via divisibility and modulo, with input validation and a summary table of factor pairings.
Explore building a Python Caesar cipher app that encrypts and decrypts messages with a configurable shift, handling spaces and wrap-around via modulo, with input validation.
Learn to build a Python Powerball lottery simulator that generates five unique white balls (1–69) and one red ball (1–26). It sorts the numbers, computes odds, and simulates ticket purchases.
Build a command-line hangman game in Python using while loops, random word selection, ascii art, and guess tracking to determine wins or losses.
Learn how functions work in Python, including built-in functions like print and input, and how arguments and return values shape program behavior. Explore using the sum function with variables.
Explore built-in Python functions by reading documentation and applying eval, pow, and dir through hands-on examples that evaluate string expressions, compute powers, reveal string and list attributes and methods.
Learn to write your own functions in Python by declaring with def, defining parameters and arguments, documenting with docstrings, and calling with defaults, inputs, and formatting outputs.
Define a python function create knight that takes name and gender, prompts for knighting, and prints Sir X the Noble or Lady X the Brave, or a simple peasant.
Return values let functions send data back to the caller and store results for later use. Use return statements to pass lists and dictionaries between functions and compose complex workflows.
Write generate monster to return a monster dictionary with name, health, attack, and is alive using 1–10 random values, then create Martin and Steve and print their keys and values.
Explore how local and global scope control where variables exist. Learn how immutable data and return statements propagate changes back to global scope.
Implement a deep sleep function that uses random years to update a user’s age via return values, illustrating local and global scope with immutable data.
Explore mutable data in Python through a function that randomly selects and removes a winner from a list of six students, affecting return values and illustrating local and global scope.
Create a Python magic eight ball project by outlining modular functions, importing the random library to generate answers, and maintaining a history of question and answer pairs.
Practice problem builds a python project that simulates opening fortune cookies, using functions to generate, store, and recap fortunes in a history list.
Explore a Python dice app built with functional programming, where you define functions to set dice sides and counts, roll dice, sum results, and optionally roll again.
Build a Python calculator app that performs addition, subtraction, multiplication, division, and exponentiation, while tracking a history of calculations and showing a summary at exit.
Build a Python banking app that creates a bank account using a dictionary with name, savings, and checking balances, and supports deposits and withdrawals with balance checks.
Build a Python loan calculator that lets users input principal, interest rate, and desired monthly payment to compute interest, simulate monthly payments, and determine payoff time.
Build a Python PvP tic tac toe game with functions to draw boards, get moves, and determine winners or ties using a nine-slot list of underscores and Xs and Os.
Explore how classes act as blueprints to create objects with unique attributes and shared methods, using self and the dot notation to access properties like type, color, health, and actions.
Initialize a basketball player class and create instances with name, team, and position, assign two-point and three-point shooting percentages randomly, and track points scored from zero.
Master Python fundamentals by building a monster class with an init method and self attributes, and implementing shared methods like intimidate, deal damage, take damage, and die.
Create a player class with display and shoot two-pointer methods, handling on-fire logic and points updates. Simulate a 12-shot game using random percentages and a 20% catch-fire chance.
Learn to blueprint a car class with init attributes and shared methods, then create and manipulate hundreds of car instances to simulate driving, fueling, and inventory.
Build a cell phone class with brand, owner, number, installed apps, and storage limits. Implement display info and install app methods that respect available space.
Master Python inheritance by building a generic dog class and specialized breeds like beagle, chihuahua, and lab. Use super to initialize parents, override methods, and add breed-specific behaviors.
Learn how to use inheritance by building a generic employee parent class and an hourly employee child class with clock in, clock out, show info, and work hours functionality.
Learn Python inheritance by building a parent character class for role-playing game, with health, mana, strength, defense, speed; create child classes and implement show stats, attack, heal, and kill methods.
Build barbarian, rogue, and mage child classes that inherit from a generic character and implement one-hit kill moves, override declare, and simulate battles.
Explore inheritance by building a parent RC toy and a child RC car, including battery, a drive method that drains, and a charge battery function that restores the battery.
Begin a tamagotchi-style Python project by building a creature and a game class, using random and implementing eat, play, sleep, and forage to manage hunger, boredom, and other attributes.
Create a Tamagotchi-like Python simulator with classes. Run a main loop, show values, present actions (eat, play, sleep, clean, forage, wake up), and update hunger, boredom, tiredness, dirtiness.
In project 8.1 Pythonagotchi simulator part 3, increment hunger, dirtiness, boredom, and tiredness with a difficulty setting, then apply kill or sleep outcomes in a modular, object-oriented update loop.
Learn to build an epidemic outbreak simulator using classes and object oriented programming, modeling a population with infection probability, duration, mortality, and real-time terminal graphics.
Model an epidemic outbreak by initializing a population, applying initial infection to a portion at random, and simulating day by day spread with statistics, graphics, and mortality rate.
Explore an epidemic outbreak simulator in Python, modeling a population where adjacent neighbors can infect each other, manage infection probability, days infected, mortality, and day advancement.
Design and implement a Yahtzee game in Python using object oriented programming, with classes for player and game, dice rolling, scorecard, and support for multiple players.
Build and test the Yahtzee game loop in project 8.3 Yahtzee part 2, using player and game classes, dice rolling, keeping dice, scorecard display, and score application.
Demonstrates debugging and implementing Yahtzee scoring with a scorecard dictionary to track dice rolling and scoring options such as number score, x of a kind, full house, straights, and chance.
Test and debug a finished Yahtzee game by running plays, exploring dice rolls, scoring categories like full house, straights, Yahtzee, and chance, and verify a working end-to-end gameplay.
Develop a Python casino blackjack project using object oriented programming, building card, deck, gambler, player, dealer, and game classes with shuffle, deal, display, and dealer rule methods.
Build and connect the casino blackjack game: define player and dealer as gambler subclasses, initialize hands, create and shuffle a deck, display money, and set bets.
Develop the casino blackjack game further by implementing the play_hand loop: build and shuffle the deck, deal hands, calculate values, manage hits, reveal hands, and handle dealer logic and payout.
Add a check continue playing method that ends the game if money is below minimum bet and asks to continue with Y or N, returning a boolean to control play.
Develop a Pokemon-inspired Python game using object-oriented programming, defining a base Pokemon class with fire, water, and grass subclasses, and a game engine to handle battles, moves, and starter selection.
Build a Python Pokemon style game by creating a Pikeman class, generating three unique starters (fire, water, grass), and enabling players to choose a starter with shown stats and moves.
Create a Pokemon style battle game using object oriented programming, implementing a turn-based loop, player and enemy moves, health, speed, fainting, and user input.
Wraps up a Python Pokemon battle game built with a base Pokemon class and fire, water, and grass subclasses, plus a battle engine for moves and stats.
Discover how to read from and write to text files in Python using open and with, in read, write, and append modes, keeping data as strings and preserving newlines.
Write and read text files by building a mood tracker that appends moods to moods.txt and then reads and prints all recorded moods to show persistence.
Begin by reading and writing JSON files in Python with the JSON library, preserving lists and dictionaries, handling nested structures, and persisting changes with indentation.
Create a json file with a list of game character dictionaries containing name, class, health, and level. Read the file back and print each key-value pair.
Learn to handle file and json operations with try/except, create missing files, read existing data, append to in-memory structures, and dump back to json.
Handle exceptions with try/except when loading or creating the grade summary data. Build dictionaries with subject, topic, and grade earned, and save as grade summary.json.
Master reading and writing Python objects using the pickle library for binary serialization. Use pickle.dump and pickle.load to save to and read from pickle files, preserving game state.
Define a student class with name, age, and grades, implement methods to compute the average, add a grade, and display a summary, using pickle to save and load the object.
Build a personal diary app in Python that reads and writes text files, saves entries with timestamps, and supports viewing, clearing, and saving.
Explore a command-line todo list manager built with the json library to load, display, add, complete, clear, and save tasks.
Build a menu-driven Python program that uses the json library to manage a contacts book (list of dictionaries), including load, display, add, search, edit, remove, clear, and save.
Build a Python contacts book that loads data, displays, adds, searches, edits, removes, clears, and saves to a JSON file with readable indentation.
Learn to build a persistent role-playing game in Python by outlining key classes—character, mob, game, and file handler—and implementing save and load with pickle.
Build a Python text RPG in the Mob Crusher project, initializing a character with name, race, and dice-rolled HP, MP, strength, and speed, then battle mobs.
Explore a Python mob crusher project that tracks kill count, score, and loot, and uses pickle to save and load game state.
Treat project 9.5 as a blank canvas and turn your idea into your own code, owning the effort from concept to completion. Start coding, brainstorm ideas, and pursue meaningful growth.
Hello, my name is Michael Eramo. I am an experienced educator, life long learner, and a self-taught programmer. I hold official Bachelor's Degrees in Music Industry, Education, and Physics, a Master's Degree in Mathematical Science, and a certificate in Software Development from Microsoft. While I owe my extensive knowledge base in Music, Physics, Mathematics, and Education to the many great educators I have worked with, my understanding of Computer Science is all my own.
I have never taken an "official" computer science course; I am completely self-taught. However, do not let that deter you from taking this course! Instead, let it motivate you that you too can learn anything you want to. Not only have I done it, but I've come to realize what works best for the self-taught programmer, and I have perfected the process!
See, I had this deep fear right after my son was born that I was done growing as an individual; that the person I was at 30 was going to be the same person I was at 55. I felt that there was literally ZERO time in the day to do anything other than go to work and be a dad. That is, until I bought a book on Computer Science, and a sense of wonder was woken. I've read countless books, watched hundreds of videos, and put in thousands of hours exploring and writing code. I would routinely wake up at 3:00 AM to learn for a few hours before I had to go to my full time job, teaching high school, before I went to my part time job of teaching college. Days were long, but getting up at 3:00 AM to read, to learn, or to code benefited me more than a few extra hours of sleep. It helped me realize that I was never done learning; never done growing. To me, that is what defines a life long learner.
I have years of classroom experience as a high school Physics teacher, Computer Science teacher, and college Mathematics professor. I am part of the New York State Master Teacher Program; a network of more than 800 outstanding public school teachers throughout the state who share a passion for their own STEM learning and for collaborating with colleagues to inspire the next generation of STEM leaders. Most importantly, I know what motivates people to learn on their own; to find a way to create time to learn, when there is no time to be had. I understand that time is valuable and that all learning should be engaging, meaningful, and have purpose.
Combining my expertise as an educator and my own personal interest in self-taught computer science led me to a telling realization; most educational material for the self-taught programmer is NOT EDUCATIONAL AT ALL. Instead, it falls into one of two categories:
Writing small "snippets" of programs that taken out of context, seem to serve no purpose at all and frankly, are beneath the user. Prime examples include using a for loop to print out all even numbers from 1 to 100 or using if statements to respond to generic user input. Here, users are bored and aren't challenge to create anything with meaning. There is little purpose other than gaining what is essentially factual level knowledge. It is a waste of your time.
Watching others code whole "applications" without a true understanding of what is going on. These are programs whose scope is beyond the user in which there is no clear guide to walk the user through the thought process without just giving them the answers. Here, without proper support and guidance, the user just defaults to letting someone else unfold the solution for them. There is little engagement in watching someone else work and rarely a thought generated on one's own. It is a waste of time.
Yes, I will admit that some learning does take place in doing simple tasks or watching others complete complicated tasks. In fact, much of how I learned was done this way. However, I'm telling you it pales in comparison to the learning that takes place by DOING meaningful and appropriately challenging work. This is the art of doing.
The art of doing is the art form of transforming oneself from a passive learner who watches, to one who sees the process of learning for what it truly is; a mechanism to better oneself. In "The Art of Doing", I have worked very hard to put together 40 meaningful, engaging, and purposeful "Challenge Problems" for you to solve.
Each challenge problem is differentiated for 3 levels of learning.
First, you are given a description of the program you are to create and example output. This allows users an opportunity to solve well defined problems that are meaningful and appropriate in scope. Here, all of the solution is user generated. It is engaged learning.
Second, you are given a comprehensive guide that will assist you in thought process needed to successfully code your program. This allows users appropriate assistance that tests their knowledge and forces them to generate the thoughts needed to solve the given problem. It is meaningful learning.
Third, you are given completed code, with comments, to highlight how to accomplish the end goal. This allows users to reference a working version of the program if they are stuck and cannot solve a portion of the problem without assistance. Rather than grow frustrated, the user can quickly reference this code to gain intellectual footing, and work back to solving the problem on their own. It is purposeful learning.
Engaging, meaningful, and with purpose. These challenge problems are vehicles that not only teach computer science, but teach you the art of doing. I guarantee that after completing them all you will consider yourself a life long learner and be proud to call yourself a self-taught programmer.