Python_1
Python_1
Today’s focus is on getting your Python environment ready and running a simple “Hello, World!”
program.
1. Download Python:
2. Install Python:
o Important: On the first installation screen, check the box that says “Add Python to
PATH”. This ensures you can run Python from your terminal.
3. Verify Installation:
o Type:
python --version
python
print("Hello, World!")
1. Choose an Editor:
2. Install VS Code:
o Search for “Python” by Microsoft and install it. This extension provides features like
IntelliSense, debugging, and more.
o In VS Code (or your chosen editor), create a new file and save it as hello.py.
2. Write Code:
o print("Hello, World!")
▪ Run:
python hello.py
Hello, World!
▪ With the Python extension installed, you might see a “Run” button at the top
right of the editor. Click it to execute your script.
o python
2. Experiment:
2+2
print("Welcome,", name)
o Practice a few basic commands to get comfortable with the shell.
o Type:
exit()
o Check out the official Python tutorial, focusing on the initial sections to familiarize
yourself with Python’s philosophy and usage.