First Program in Python

As the first program in Python, we look at how to print a text. We use the "print" Python function for this. We will learn the meaning as well as further use of a function later. For now keep in mind, we use parenthesis after the word "print" to indicate it's a Python function. The content we want to print should be inside these parenthesis. Also, since we are printing a text here, it should go inside either single quotes (' ') or double quotes (" ").

Code:

print('Welcome to Python Programming!')

Output:

Welcome to Python Programming!


We can print a number without the use of quotes.

Code:

print(5)

print(2.5)

Output:

5

2.5