AI For Usman
AI For Usman
LAB MANUAL
Programming for AI (Python)
Submitted by
Name: Muhammad Usman
Id: LIDCADDSAI241102003
Class/Section: BS(AI)
Submitted to
Instructor Name: Sir Zeeshan Akhter
Department: Artificial Intelligence
Setting Up Development Environments for Python
1. Install Python
o Download the latest version from python.org.
o Check the box "Add Python to PATH" during installation.
2. Verify Installation
o Open the terminal or command prompt and run:
5. Install Packages
python app.py
Introduction to Python Programming Language
Python is a high-level, interpreted language known for its readability and simplicity. Created by
Guido van Rossum in 1991, Python emphasizes clean syntax, making it beginner-friendly.
1. Numeric Types:
2. Sequence Types:
3. Mapping Type:
4. Set Types:
5. Boolean Type:
o bool: True or False
6. Binary Types:
o bytes, bytearray
x = 10 # Integer
y = 3.14 # Float
name = "Alice" # String
Printing Output
print("Hello, World!")
print(x, y, name)
Indentation
Functions
# Dictionary
person = {"name": "Alice", "age": 25}
person["age"] = 26
import numpy as np
arr = np.array([1, 2, 3])
print(arr)
Pandas
Thank you