First Python Program

"In this part, we will write our first python program."

By, Sarvpreet Singh

24-09-2025

👋🌍

Hello, World!

Make a new file first-program.py and write this code and execute the file.

print("Hello, World!")

This will display Hello, World! on terminal. Congrats you have successfully made your first program in Python.

Code explaination

print() is a built-in function that is used to print anything on terminal. (We will see more about function later in the course)

Here we had printed a string (the group of characters enclosed in quotes) "Hello, World!".

Exercise

Here's an exercise for you. Try printing your own name in terminal using print() function.

Like I do:

print("codeSarv")

Conclusion

In this tutorial, we had wrote our first python program successfully.

We used a built-in function (function provided by language) print() to display a string (sequence of characters in quotes '' or ""). You will see the use of print() and strings in future tutorials too.