Objective: To learn how to write and execute basic
Python programs using the built-in Python editor.
1. Setting Up the Development Environment ⚙️:
Python comes with a built-in text editor called IDLE (Integrated Development
and Learning Environment) . 🖊️
IDLE is a simple and lightweight editor suitable for writing and executing
Python code .🐍
It provides features like syntax highlighting, code completion, and an
interactive shell for testing snippets of code .💻
2. Writing Your First Python Program ✍:
Open IDLE from the Start menu or by typing idle in the command line 🔄.
In the IDLE editor window, write your Python code.
# Hello, World! program
print("Hello, World!")
3. Executing the Program ⏯:
To run the program, go to the "Run" menu in IDLE and select "Run Module" or
simply press F5 .⌨️
Alternatively, you can run the program from the command line by navigating to
the directory containing the script and using the command python hello_world.py
🚀 .
4. Explaining the Code 🗣️:
We use the function to output the string "Hello, World!" to the console
💬
print()
.
🌟Python - First Programs🌟 1