What Python Is

What Python Is

Python is a programming language. A program is a sequence of instructions that a computer runs in order, from the top of the file to the bottom.

This is a complete Python program:

print("Hello")

It has one instruction: show the text Hello.

How this course works

Each lesson explains an idea and can include an exercise. You write your code in the editor on the right side of the screen.

Two buttons matter:

  • Run executes your code and shows its output in the console.
  • Submit runs a set of checks against your code. When every check passes, the lesson is complete.

If a check fails, the report names the failed check and shows what your code produced instead. Read it, change your code, and submit again. Failing a check has no penalty.

How to work through a lesson

Type the examples yourself instead of copying them. Typing forces you to learn the concepts better, the quotes, the parentheses, the spelling, and those details are what the exercises test.

If you get stuck on an exercise, reread the section above it. You can also use the discussion tab to ask for help. If you still can't solve it, click Show Solution to see one way to do it. You can then type it yourself and submit.

Exercise

This ones easy, just run the code to see the output, then press Submit.

Tests

import unittest


class TestWelcome(unittest.TestCase):
    def test_nothing(self):
        self.assertEqual(True, True)
print("Hello, World!")
Solution hidden. Give it a real try first.

Sign in to join the discussion.

No comments yet. Be the first to ask a question.

main.py
Console
Press Run to execute your code, or Submit to test and complete this problem.