Hello World
Welcome to the first class of our Python learning blog. In this class, we will learn how to display messages on the screen using the print
function.
What is the print
function?
Link to heading
The print
function is one of the most basic functions in Python. Used to display messages on the console screen. The function accepts a text string as an argument and prints it to the screen.
How to use print
function?
Link to heading
The correct way to use the print function is as follows:
- Type the keyword print.
- Open a parenthesis.
- Type the text string you want to display between single quotes
(')
or double quotes(")
. - Close the parenthesis.
Example: Link to heading
print("Hello World")
Now that you know how to use the print
function, I challenge you to print the message “Hello World” on your own console.