Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
8 views3 pages

Practical 1-1

The document provides a step-by-step guide for installing Python, including downloading the latest version and ensuring it is added to the system PATH. It also explains how to verify the installation and introduces Python's IDLE, detailing both Interactive and Script modes for executing Python commands. Users can run scripts by saving them as .py files and executing them through various methods.

Uploaded by

ansarisadeem8879
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views3 pages

Practical 1-1

The document provides a step-by-step guide for installing Python, including downloading the latest version and ensuring it is added to the system PATH. It also explains how to verify the installation and introduces Python's IDLE, detailing both Interactive and Script modes for executing Python commands. Users can run scripts by saving them as .py files and executing them through various methods.

Uploaded by

ansarisadeem8879
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

1.

Install Python

1. Step 1: Visit the Python Website and Navigate to the Downloads Section
(https://www.python.org/downloads/)

2. Step 2: Choose the Python Version


Click on the version you want to download. – Python 3.12.3 (the latest stable
release as of now is Python 3.12.3).

3. Install (Make sure to mark Add Python to PATH )


2. Verify Installation and set PATH
1. Check Installation:
○ Open Command Prompt.
○ Type: python --version
○ You should see the Python version, e.g., Python 3.12.3.

2. Manually Set PATH (if needed):


○ If you can’t see the Python version, locate the Python folder (e.g., C:\Users\
<YourName>\AppData\Local\Programs\Python\Python39).
○ Add this path as follows:
■ Open Environment Variables.
■ In System variables, select Path → Click Edit → New → Add Python's
folder path (e.g., C:\.....\Python39).
Open and Use Python IDLE

3. Interactive Mode.
1. Purpose: Directly execute Python commands and see the output immediately.
2. Where it is: The main window that opens when you open IDLE.
3. Interactive Mode: Type Python commands in the shell.
Example:
print("Hello, World!") and press enter.

4. Script Mode.
1. Purpose: Write and save Python programs in a .py file for reuse.
2. Where it is: Open it by selecting File → New File in IDLE
print("This is Script Mode!")
3. Run the Script:
Press F5 OR Run → Run Module OR Command Prompt: python script.py

You might also like