Youcanbuildtech / LearnProgramming Basics with Python
0 of 2 available lessons completeProgress saved in this browser

Programming Basics with Python

Free, beginner-friendly short video lessons, quizzes, and browser-based Python practice, with no previous experience required.

Featured lesson

What programming is

Understand what a computer program is and how a computer executes instructions.

Watch What programming is

A computer program is a collection of instructions that performs a task. Code is instructions written using a programming language. Running a program means the computer carries out its instructions in order, from top to bottom. Output is the information or result produced by a program.

Creator-supplied reference narration

What is programming? A program is a set of instructions that tells a computer what to do. Imagine you're giving someone instructions to make a cup of coffee. 1. Get a cup. 2. Put coffee in the cup. 3. Add hot water. 4. Stir the coffee. Those are instructions. If someone follows them in order, they end up with a cup of coffee. Programming works in a similar way. Instead of giving instructions to another person, we're giving instructions to a computer. Let's look at a small program written in Python. Our first instruction tells the computer to display the word "Hello!" Our second instruction tells the computer to calculate two plus three and display the result, which is five. And our third instruction tells the computer to display "Goodbye!" The computer executes these instructions in order, from top to bottom. When we run the program, we can see the results displayed on the screen. Now, here's another simple example. We have two instructions. The first displays the word "First," and the second displays "Second." When we run the program, that's exactly what we get. But what happens if we reverse the order of those instructions? Now "Second" appears before "First." The instructions haven't changed. We've simply changed their order, and the output changes accordingly. Before we finish, there are four important programming terms to remember. Code is the instructions we write using a programming language. Program is a collection of instructions organized to perform a task. Execute, or run, means the computer carries out those instructions. Output is the information or result produced by the program. That's the basic idea behind programming. Programming is telling a computer what to do by giving it instructions it can execute. Now, let's test what you've learned with a short quiz.

Continue to Quiz
Check your understanding

Quiz

Answer each question correctly. You can try again as often as you like.

Question 1 of 3What is a computer program?
Question 2 of 3What will this Python program display?
print("Apple")
print("Orange")
Question 3 of 3What does it mean to run a program?
Course overview

The 12 lessons

  1. 1

    What programming is

    How a sequence of instructions produces a result.

    Available
  2. 2

    Writing Your First Python Program

    Write and run simple Python instructions using print(), then change the output.

    Available
  3. 3

    Variables and values

    Giving a value a name so it can be used later.

    Coming soon
  4. 4

    Strings, numbers, and booleans

    Text, numeric, and true/false values in Python.

    Coming soon
  5. 5

    Expressions and operators

    Combining values and operators to produce a result.

    Coming soon
  6. 6

    Comparisons and if statements

    Comparing values and choosing which instructions run.

    Coming soon
  7. 7

    for loops

    Repeating instructions for each item in a sequence.

    Coming soon
  8. 8

    while loops

    Repeating instructions while a condition remains true.

    Coming soon
  9. 9

    Lists and indexes

    Keeping values in a list and finding them by position.

    Coming soon
  10. 10

    Functions and parameters

    Grouping instructions and passing values into them.

    Coming soon
  11. 11

    Errors and debugging

    Reading errors and finding the cause of a problem.

    Coming soon
  12. 12

    Bringing the basics together

    A small challenge that combines the course fundamentals.

    Coming soon

How it works

Watch a short lesson, check what you understood, then practise in Python when there is an exercise. Move through the lessons at your own pace.