Search⌘ K
AI Features

Solution: Favorite Quote

Explore how to use Python's print function to display text on the screen. Learn the concept of strings enclosed in quotes and how Python outputs exactly what is written inside the print parentheses. Understand basic output commands to build foundational programming skills.

We'll cover the following...

In Python, the print() function is used to display text or values on the screen. Whatever you write inside the parentheses () will be shown as output.

In this example:

print("May the Force be with you.")
  • print is the function that tells Python to display something.

  • The text "May the Force be with you." is enclosed in quotation marks, which means it’s a string (a sequence of characters).

  • When you run the code, Python prints exactly what’s inside the quotes to the output window.

Python 3.8
print("May the Force be with you.")