Back to Course

Introduction to Python

0% Complete
0/0 Steps
  1. Python: Basics
    14Topics
    |
    15 Quizzes
  2. Python: Control Flow
    12Topics
    |
    12 Quizzes
  3. Python: Errors
    5Topics
    |
    5 Quizzes
Lesson 1, Topic 2
In Progress

Python: Print

Yasin Cakal 3 Oct 2021
Lesson Progress
0% Complete

We’re now going to teach our computer how to communicate. The ability to communicate is priceless: a computer can answer numerous questions about “how,” “why,” or “what” it is doing. The print() function in Python is used to instruct a computer to communicate. Quotation marks " " or ' ' should surround the printed message:

# The print() function displays "Hello World!"
print("Hello World!")

In the preceding example, we instruct our program to print() the message "Hello World!" Output refers to the printed words that appear as a result of the print() function. This example program would produce the following output:

Output:

Hello World!
%d bloggers like this: