First Python Program (Interactive Mode)

First Python Program (Interactive Mode)

In the previous lesson, we learned how to install Python. In this lesson, we will learn how to begin with Python and how to run first Python program with the Interactive Mode method. It’s easy to run a Python program.

As a demo program, we will learn how to print a text. For this, print function is used, which outputs to the console window.

Go to command prompt and type the following, and press enter,

Here’s the output,

Python First Program output

In Python 2, you need to type the following.

The parentheses are not necessary,

In this lesson we learned how to run our first Python program. We also saw the syntax for Python 3 as well as Python 2 programs. In the next lesson, we will see how to work with scrip mode method to run Python 3 programs.

Python 3 Installation
First Python Program (Script Mode)
Studyopedia Editorial Staff
Studyopedia Editorial Staff
[email protected]

We work to create free tutorials for all.

No Comments

Post A Comment