Back to Lessons
BeginnerBasics

Hello Python World

lesson_01.py
>>> ## Concept In Python, one of the first things you learn is how to display messages on the screen. This is done using the `print()` function. The `print()` function is essential for providing output in your Python programs. Anything you enclose in quotes inside the parentheses will be printed exactly as it is. ### Example: Let's see a simple example of how to use the `print()` function: ```python print("Hello, World!") ``` In this example, "Hello, World!" is a string that will be displayed on the screen. You can use either double quotes " " or single quotes ' ' to enclose the text. ### Key Points: - The `print()` function is used to display messages. - Always enclose your text in quotes (either " " or ' '). - The text inside quotes is called a "string". ## Practice Let's practice using the `print()` function. Your task is to use the print statement to display a specific message on the screen. ### Instructions: 1. In the editor below, write a line of code that uses the `print()` function. 2. Make sure to print the exact message: **"Hello, Python!"**. 3. Enclose the message in quotes and place it inside the `print()` function. ### Example: ```python print("Hello, Python!") ``` Once you've written your code, run it to see if the output matches the expected message. Remember, your output should exactly match "Hello, Python!" (without any extra spaces or characters).
Code Editor

Sign in to submit your answer and earn XP.