Python Tutorial Part 3 – Basic Syntax of Python

BySlide Scope

Python Tutorial Part 3 – Basic Syntax of Python

In the previous part of this tutorial we explained the process of installing Python on your computer. In this tutorial we will explain about the Basic Syntax of Python language.

Once Python is installed in your computer you can use one of the following tools to code and execute python.

python idle and command prompt

You can search for Python in your computer programs and you will find these two options.

IDLE is an integrated development environment for Python.

Other One is the Command Prompt Windows for Python Coding.

IDLE is a preferred option for Python Coding because it has a Coding Editor with built in auto suggest tool. It has nice color coding to differentiate between various elements of a code.

Basic Syntax of Python – How to Print a Statement in Python

Python Uses a built-in function named print to print any statement.

If we want to print “Welcome to Python Tutorial” we can use the following command.

print (“Welcome to Python Tutorial by Slidescope”)

python printing first statement

You can see the Screen Shot of IDLE Window.

The line with three Greater Than Signs >>> is the input line

The next line in Blue is the Output.

You can see the Statement to be printed is written in Round Brackets and Double Quotes.

You can also use single quotes.

Value written inside Quotes Represent a String Data type.

To print integer or float type values we don’t have to use single or double quotes.

Syntax to Print an Integer Value:

>>>print (55)

Output:  55

After writing the Input we have to press enter to execute the command and present output.

Please try using these commands in your practice and let us know if you have any doubts in the comment section below.

If you are not familiar about Data Types in Programming Languages then Refer to Our Next Tutorial which explains the data types topic.

Official Website of Python Is www.Python.org

About the author

Slide Scope administrator

Slide Scope Posts are written by experts from Core Information Technology and Digital Marketing Industry. We have assistants from Management Science as well.

Leave a Reply