It seems like you are using an ad blocker. To enhance your experience and support our website, please consider:

  1. Signing in to disable ads on our site.
  2. Sign up if you don't have an account yet.
  3. Or, disable your ad blocker by doing this:
    • Click on the ad blocker icon in your browser's toolbar.
    • Select "Pause on this site" or a similar option for lancecourse.com.

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!