Write your first real program

Python from Zero. From your first line of code to a small project of your own.

21 lessons · 1 hr 59 min of video · 22 quiz questions

Python for Beginners - Learn Coding with Python in 1 Hour, by Programming with Mosh

Try a question from this course

Which call gives the numbers 1 through 10?

What you'll be able to do

  • Install Python and run your own programs
  • Store and convert information with variables
  • Make programs decide and repeat with if and loops
  • Reuse code with functions
  • Organize data with lists and dictionaries
  • Read and write files safely
  • Plan, build and tidy a small project

What's in it

  1. Start here: your first programs

    Install Python, run your first line, and learn how variables hold information.

    1. Install Python and print your first line
    2. Variables and the four basic types
    3. Asking the user: input and type conversion
    4. Recap
  2. Making decisions with if

    Do arithmetic, compare values and make a program choose what to do.

    1. Operators and if / elif / else
    2. Recap
  3. Repeating things with loops

    Make Python do the same job many times without copy and paste.

    1. for loops, while loops, break and continue
    2. Recap
  4. Functions

    Name a block of code so you can reuse it with different inputs.

    1. Defining, calling and returning
    2. Recap
  5. Lists and dictionaries

    Hold many values in one variable and look things up by name.

    1. Lists and tuples
    2. Dictionaries: key-value pairs
    3. Recap
  6. Working with files

    Read from and write to text files on your computer.

    1. Opening and reading files safely
    2. Writing and appending
    3. Recap
  7. Your project: small games, built the professional way

    Plan in comments, build in baby steps, then tidy up, while making a dice roller, a number-guessing game and rock-paper-scissors.

    1. Plan first, then build: the dice game
    2. Build in baby steps: the guessing game
    3. Tuples and dictionaries at work: rock, paper, scissors
    4. Tidy up: functions and DRY
    5. Recap

Made from these videos

More courses