Python Basics

Course by zooboole,

Last Updated on 2025-02-26 16:14:49

Your First Python Program

It's high time we tested our understanding and our setup. Let’s test our setup by writing a "Hello, World!" program in Python on our own. Follow the steps below:

Try this in Python Shell(REPL) or IDLE:

>>> print("Hello, World!")

Expected Output:

Hello, World!

Try this in a Python Script:

  1. Open your editor and type:

    print("Hello, World! Welcome to Python!")
  2. Save it as hello.py.

  3. Run it in the terminal:

python hello.py

Expected Output:

Hello, World! Welcome to Python!

Congratulations! You have set up your Python environment and written your first program!