0% found this document useful (0 votes)
3 views63 pages

Sample ProjectReport

The project report details an internship on AI-powered office automation and content creation conducted under Ardent Computech Pvt. Ltd. It includes a certification from the mentor, a breakdown of phase-wise assignments covering Python basics, data types, user input, arithmetic operations, and conditional statements. The report serves as a practical application of concepts learned during the internship, demonstrating various programming tasks and their outputs.

Uploaded by

beautygupta77245
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)
3 views63 pages

Sample ProjectReport

The project report details an internship on AI-powered office automation and content creation conducted under Ardent Computech Pvt. Ltd. It includes a certification from the mentor, a breakdown of phase-wise assignments covering Python basics, data types, user input, arithmetic operations, and conditional statements. The report serves as a practical application of concepts learned during the internship, demonstrating various programming tasks and their outputs.

Uploaded by

beautygupta77245
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

Project Report

on

AI POWERED OFFICE AUTOMATION AND CONTENT CREATION

under

Ardent Computech Pvt. Ltd. (ESTD: 2002)

Submitted by

<<NAME>>, <<DEPARTMENT>>, <CU REGISTRATION NO:>><<CU ROLL NO:>>

of

Tara Devi Harakh Chand Kankaria Jain College

under the guidance of

MR. ANAND CHOWDHURY


PROJECT ENGINEER
Certificate from the Mentor

This is to certify that <<NAME OF THE STUDENT>> has completed the Internship on AI POWERED
OFFICE AUTOMATION AND CONTENT CREATION under my supervision during 15 days, which is
in partial fulfillment of requirements for the award of the [Link] / BBA and submitted to the Tara Devi
Harakh Chand Kankaria Jain College.

______________________
Mr. Anand Chowdhury
(Mentor)

Name of the Student (s):

University Registration Nos:

University Roll Nos:

Signature of the Students:

Date:
Phase Wise Internship Assignments
Phase 1: AI Intro & Python Basics

1. Print your name and course details


name = "AB"
course = "Python Programming"

print("Name:", name)
print("Course:", course)

Output
Name: AB
Course: Python Programming

2. Define AI and Data Science with 3 real-life examples


print("AI: Artificial Intelligence is the ability of machines to think and learn
like humans.")
print("Data Science: It is the process of analyzing data to get useful insights.")

print("\nReal-life Examples:")
print("1. Netflix movie recommendations")
print("2. Google Maps traffic prediction")
print("3. Voice assistants like Siri and Alexa")

Output
AI: Artificial Intelligence is the ability of machines to think and learn like
humans.
Data Science: It is the process of analyzing data to get useful insights.

Real-life Examples:
1. Netflix movie recommendations
2. Google Maps traffic prediction
3. Voice assistants like Siri and Alexa

3. Create variables
name = "AB"
age = 21
city = "Kolkata"
course = "Data Science"
favorite_app = "YouTube"

print(name, age, city, course, favorite_app)

Output
AB 21 Kolkata Data Science YouTube
4. Valid and Invalid Variable Names
# Valid
age = 20
_age = 21
Name = "AB"
name = "Python"

# Invalid variable names


# 2age = 20
# my age = "AB"

print("Valid variables: age, _age, Name, name")


print("Invalid variables: 2age, my age")

# Corrected names
age2 = 20
my_age = 21

Output
Valid variables: age, _age, Name, name
Invalid variables: 2age, my age

5. Print Data Types


marks = 85
cgpa = 7.5

print(type(marks))
print(type(cgpa))

Output
<class 'int'>
<class 'float'>

6. Type Conversion
marks = 85
cgpa = 7.5

marks_float = float(marks)
cgpa_int = int(cgpa)

print(marks_float)
print(cgpa_int)

Output
85.0
7
7. Print Introduction
name = "AB"
city = "Kolkata"
course = "Python"

print("My name is", name)


print("I live in", city)
print("I am learning", course)

Output
My name is AB
I live in Kolkata
I am learning Python

8. Arithmetic Operations
x = 10
y = 4

print("Addition:", x + y)
print("Subtraction:", x - y)
print("Multiplication:", x * y)
print("Division:", x / y)
print("Floor Division:", x // y)
print("Modulus:", x % y)
print("Power:", x ** y)

Output
Addition: 14
Subtraction: 6
Multiplication: 40
Division: 2.5
Floor Division: 2
Modulus: 2
Power: 10000

9. Sum, Difference, and Product


a = 10
b = 5
c = 2

print("Sum =", a + b + c)
print("Difference =", a - b - c)
print("Product =", a * b * c)

Output
Sum = 17
Difference = 3
Product = 100
10. Print Types
a = 25
b = 7.8
c = "Python"

print(type(a))
print(type(b))
print(type(c))

Output
<class 'int'>
<class 'float'>
<class 'str'>

11. Simple Calculator


num1 = int(input("Enter first number: "))
num2 = int(input("Enter second number: "))

result = num1 + num2

print("Addition =", result)

Sample Output
Enter first number: 5
Enter second number: 7
Addition = 12

12. Area of Square


side = float(input("Enter side of square: "))

area = side * side

print("Area of square =", area)

Sample Output
Enter side of square: 4
Area of square = 16.0

13. Average of Two Numbers


a = float(input("Enter first number: "))
b = float(input("Enter second number: "))

average = (a + b) / 2

print("Average =", average)


Sample Output
Enter first number: 10
Enter second number: 20
Average = 15.0

14. Addition of Two Numbers


a = int(input("Enter first number: "))
b = int(input("Enter second number: "))

print("Addition =", a + b)

Sample Output
Enter first number: 8
Enter second number: 2
Addition = 10

15. Subtraction of Two Numbers


a = int(input("Enter first number: "))
b = int(input("Enter second number: "))

print("Subtraction =", a - b)

Sample Output
Enter first number: 10
Enter second number: 3
Subtraction = 7

Phase 2: Data Types & Type Casting

1. Create Variables of Different Data Types


a = 10 # int
b = 5.5 # float
c = "Python" # string
d = True # boolean

print(a)
print(b)
print(c)
print(d)

Output
10
5.5
Python
True
2. Print Type of Each Variable
a = 10
b = 5.5
c = "Python"
d = True

print(type(a))
print(type(b))
print(type(c))
print(type(d))

Output
<class 'int'>
<class 'float'>
<class 'str'>
<class 'bool'>

3. Convert Integer to Float


num = 25

result = float(num)

print(result)
print(type(result))

Output
25.0
<class 'float'>

4. Convert Float to Integer


num = 9.8

result = int(num)

print(result)
print(type(result))

Output
9
<class 'int'>

5. Convert String Number to Integer


num = "100"

result = int(num)
print(result)
print(type(result))

Output
100
<class 'int'>

6. Convert Integer to String


num = 50

result = str(num)

print(result)
print(type(result))

Output
50
<class 'str'>

7. Take User Input and Convert to Integer


age = input("Enter your age: ")

age = int(age)

print("Age =", age)


print(type(age))

Sample Output
Enter your age: 21
Age = 21
<class 'int'>

8. Take Float Input and Convert to String


price = float(input("Enter price: "))

price_str = str(price)

print(price_str)
print(type(price_str))

Sample Output
Enter price: 99.5
99.5
<class 'str'>
9. Demonstrate Implicit Type Casting
a = 10
b = 2.5

result = a + b

print(result)
print(type(result))

Output
12.5
<class 'float'>

10. Compare int vs Float Division


a = 10
b = 3

print("Float Division =", a / b)


print("Integer Division =", a // b)

Output
Float Division = 3.3333333333333335
Integer Division = 3

11. Total Marks Using Type Casting


m1 = input("Enter marks 1: ")
m2 = input("Enter marks 2: ")

total = int(m1) + int(m2)

print("Total Marks =", total)

Sample Output
Enter marks 1: 80
Enter marks 2: 90
Total Marks = 170

12. Convert Price String to Float


price = "199.99"

price_float = float(price)

gst = price_float * 0.18

print("GST =", gst)


Output
GST = 35.9982

13. Convert Boolean to Integer


a = True
b = False

print(int(a))
print(int(b))

Output
1
0

14. Convert User Age String to Integer


age = input("Enter your age: ")

age = int(age)

print("Your age is", age)

Sample Output
Enter your age: 22
Your age is 22

15. Invalid Type Conversion Handling


num = "Python"

try:
result = int(num)
print(result)

except ValueError:
print("Invalid conversion from string to integer")

Output
Invalid conversion from string to integer

Phase 3: Boolean Logic, User Input & Arithmetic

1. Addition, Subtraction, Multiplication


a = int(input("Enter first number: "))
b = int(input("Enter second number: "))
print("Addition =", a + b)
print("Subtraction =", a - b)
print("Multiplication =", a * b)

Sample Output
Enter first number: 10
Enter second number: 5
Addition = 15
Subtraction = 5
Multiplication = 50

2. Check if Number is Greater Than 50


num = int(input("Enter a number: "))

print(num > 50)

Sample Output
Enter a number: 75
True

3. Check if Two Numbers are Equal


a = int(input("Enter first number: "))
b = int(input("Enter second number: "))

print(a == b)

Sample Output
Enter first number: 20
Enter second number: 20
True

4. Check if Number is Divisible by 2


num = int(input("Enter a number: "))

print(num % 2 == 0)

Sample Output
Enter a number: 8
True

5. Boolean Operators (and/or/not)


a = True
b = False

print("AND =", a and b)


print("OR =", a or b)
print("NOT =", not a)

Output
AND = False
OR = True
NOT = False

6. Check if Age is Between 18 and 60


age = int(input("Enter age: "))

print(age >= 18 and age <= 60)

Sample Output
Enter age: 25
True

7. Print Larger Number


a = int(input("Enter first number: "))
b = int(input("Enter second number: "))

if a > b:
print("Larger number =", a)
else:
print("Larger number =", b)

Sample Output
Enter first number: 15
Enter second number: 9
Larger number = 15

8. Check Number in Range


num = int(input("Enter number: "))

print(num >= 10 and num <= 50)

Sample Output
Enter number: 25
True
9. Simple Interest Calculator
SI=\frac{P\times R\times T}{100}

p = float(input("Enter principal amount: "))


r = float(input("Enter rate: "))
t = float(input("Enter time: "))

si = (p * r * t) / 100

print("Simple Interest =", si)

Sample Output
Enter principal amount: 1000
Enter rate: 5
Enter time: 2
Simple Interest = 100.0

10. Calculate Total Bill Amount


item1 = float(input("Enter item1 price: "))
item2 = float(input("Enter item2 price: "))

total = item1 + item2

print("Total Bill =", total)

Sample Output
Enter item1 price: 120
Enter item2 price: 80
Total Bill = 200.0

11. Basic Login Condition


username = input("Enter username: ")
password = input("Enter password: ")

if username == "admin" and password == "1234":


print("Login Successful")
else:
print("Invalid Username or Password")

Sample Output
Enter username: admin
Enter password: 1234
Login Successful
12. Check Both Conditions using AND
age = 25
salary = 30000

print(age > 18 and salary > 20000)

Output
True

13. Check at Least One Condition using OR


a = 10
b = 5

print(a > 20 or b < 10)

Output
True

14. Negate Condition using NOT


is_logged_in = False

print(not is_logged_in)

Output
True

15. Arithmetic + Boolean Logic Combined


marks1 = int(input("Enter marks1: "))
marks2 = int(input("Enter marks2: "))

total = marks1 + marks2


average = total / 2

print("Total =", total)


print("Average =", average)

print("Passed =", average >= 40)

Sample Output
Enter marks1: 50
Enter marks2: 70
Total = 120
Average = 60.0
Passed = True
Phase 4: Conditional Statements

1. Demonstrate AND Logic


age = 25
salary = 30000

print(age > 18 and salary > 20000)

Output
True

2. Demonstrate OR Logic
a = 10
b = 5

print(a > 20 or b < 10)

Output
True

3. Demonstrate NOT Logic


is_logged_in = False

print(not is_logged_in)

Output
True

4. Check Positive or Negative Number


num = int(input("Enter a number: "))

if num >= 0:
print("Positive Number")
else:
print("Negative Number")
Sample Output
Enter a number: -5
Negative Number

5. Check Even or Odd


num = int(input("Enter a number: "))

if num % 2 == 0:
print("Even Number")
else:
print("Odd Number")

Sample Output
Enter a number: 8
Even Number

6. Compare Two Numbers


a = int(input("Enter first number: "))
b = int(input("Enter second number: "))

if a > b:
print(a, "is greater")
else:
print(b, "is greater")

Sample Output
Enter first number: 25
Enter second number: 12
25 is greater

7. Voting Eligibility
age = int(input("Enter your age: "))

if age >= 18:


print("Eligible to vote")
else:
print("Not eligible to vote")

Sample Output
Enter your age: 20
Eligible to vote
8. Pass or Fail
marks = int(input("Enter marks: "))

if marks >= 40:


print("Pass")
else:
print("Fail")

Sample Output
Enter marks: 55
Pass

9. Temperature Classification
temp = int(input("Enter temperature: "))

if temp > 30:


print("Hot")
else:
print("Cold")

Sample Output
Enter temperature: 35
Hot

10. Salary Threshold Check


salary = int(input("Enter salary: "))

if salary > 50000:


print("High Salary")
else:
print("Low Salary")

Sample Output
Enter salary: 60000
High Salary

11. Grade System


marks = int(input("Enter marks: "))

if marks >= 80:


print("Grade A")
elif marks >= 60:
print("Grade B")
elif marks >= 40:
print("Grade C")
else:
print("Fail")

Sample Output
Enter marks: 72
Grade B

12. Menu-Driven Program


print("1. Addition")
print("2. Subtraction")

choice = int(input("Enter choice: "))

a = int(input("Enter first number: "))


b = int(input("Enter second number: "))

if choice == 1:
print("Addition =", a + b)
elif choice == 2:
print("Subtraction =", a - b)
else:
print("Invalid Choice")

Sample Output
1. Addition
2. Subtraction
Enter choice: 1
Enter first number: 10
Enter second number: 5
Addition = 15

13. Nested If Example


age = int(input("Enter age: "))

if age >= 18:


if age <= 60:
print("Adult")
else:
print("Senior Citizen")
else:
print("Minor")

Sample Output
Enter age: 45
Adult

14. Validate User Input


num = int(input("Enter a positive number: "))
if num > 0:
print("Valid Input")
else:
print("Invalid Input")

Sample Output
Enter a positive number: -2
Invalid Input

15. Discount Eligibility Program


amount = float(input("Enter purchase amount: "))

if amount >= 1000:


discount = amount * 0.10
final_amount = amount - discount

print("Discount =", discount)


print("Final Amount =", final_amount)
else:
print("No Discount Applied")

Sample Output
Enter purchase amount: 1500
Discount = 150.0
Final Amount = 1350.0

Phase 5: Python Conditional Statements (if, elif, else)

1. Assign Grades Using if-elif-else


marks = int(input("Enter marks: "))

if marks >= 90:


print("Grade A")
elif marks >= 75:
print("Grade B")
elif marks >= 50:
print("Grade C")
else:
print("Fail")

Sample Output
Enter marks: 82
Grade B
2. Ticket Pricing Based on Age
age = int(input("Enter age: "))

if age < 5:
print("Free Ticket")
elif age <= 18:
print("Ticket Price = 100")
else:
print("Ticket Price = 200")

Sample Output
Enter age: 15
Ticket Price = 100

3. Electricity Bill Calculator


units = int(input("Enter electricity units: "))

if units <= 100:


bill = units * 5
elif units <= 200:
bill = units * 7
else:
bill = units * 10

print("Electricity Bill =", bill)

Sample Output
Enter electricity units: 150
Electricity Bill = 1050

4. Login Credentials Check


username = input("Enter username: ")
password = input("Enter password: ")

if username == "admin" and password == "1234":


print("Login Successful")
else:
print("Invalid Credentials")

Sample Output
Enter username: admin
Enter password: 1234
Login Successful

5. Largest of Three Numbers


a = int(input("Enter first number: "))
b = int(input("Enter second number: "))
c = int(input("Enter third number: "))

if a > b and a > c:


print("Largest =", a)
elif b > c:
print("Largest =", b)
else:
print("Largest =", c)

Sample Output
Enter first number: 10
Enter second number: 25
Enter third number: 15
Largest = 25

6. Leap Year Check


year = int(input("Enter year: "))

if year % 4 == 0:
print("Leap Year")
else:
print("Not a Leap Year")

Sample Output
Enter year: 2024
Leap Year

7. ATM Withdrawal System


balance = 5000

amount = int(input("Enter withdrawal amount: "))

if amount <= balance:


balance = balance - amount
print("Withdrawal Successful")
print("Remaining Balance =", balance)
else:
print("Insufficient Balance")

Sample Output
Enter withdrawal amount: 2000
Withdrawal Successful
Remaining Balance = 3000

8. Discount Based on Purchase Amount


amount = float(input("Enter purchase amount: "))
if amount >= 5000:
discount = amount * 0.20
elif amount >= 2000:
discount = amount * 0.10
else:
discount = 0

final_amount = amount - discount

print("Discount =", discount)


print("Final Amount =", final_amount)

Sample Output
Enter purchase amount: 3000
Discount = 300.0
Final Amount = 2700.0

9. Classify Numbers
num = int(input("Enter a number: "))

if num > 0:
print("Positive Number")
elif num < 0:
print("Negative Number")
else:
print("Zero")

Sample Output
Enter a number: -8
Negative Number

10. Nested if for Student Result


marks = int(input("Enter marks: "))
attendance = int(input("Enter attendance percentage: "))

if attendance >= 75:


if marks >= 40:
print("Pass")
else:
print("Fail in Exam")
else:
print("Low Attendance")

Sample Output
Enter marks: 55
Enter attendance percentage: 80
Pass
11. Menu-Based Calculator
print("1. Addition")
print("2. Subtraction")
print("3. Multiplication")
print("4. Division")

choice = int(input("Enter choice: "))

a = int(input("Enter first number: "))


b = int(input("Enter second number: "))

if choice == 1:
print("Result =", a + b)
elif choice == 2:
print("Result =", a - b)
elif choice == 3:
print("Result =", a * b)
elif choice == 4:
print("Result =", a / b)
else:
print("Invalid Choice")

Sample Output
1. Addition
2. Subtraction
3. Multiplication
4. Division
Enter choice: 3
Enter first number: 5
Enter second number: 4
Result = 20

12. Password Strength Check


password = input("Enter password: ")

if len(password) >= 8:
print("Strong Password")
else:
print("Weak Password")

Sample Output
Enter password: python123
Strong Password

13. BMI Classification


BMI=\frac{weight}{height^2}

weight = float(input("Enter weight in kg: "))


height = float(input("Enter height in meters: "))
bmi = weight / (height ** 2)

print("BMI =", bmi)

if bmi < 18.5:


print("Underweight")
elif bmi < 25:
print("Normal Weight")
elif bmi < 30:
print("Overweight")
else:
print("Obese")

Sample Output
Enter weight in kg: 60
Enter height in meters: 1.7
BMI = 20.761245674740486
Normal Weight

14. Categorize Users


age = int(input("Enter age: "))

if age < 13:


print("Child")
elif age < 20:
print("Teenager")
elif age < 60:
print("Adult")
else:
print("Senior Citizen")

Sample Output
Enter age: 22
Adult

15. Real-Life Decision System


salary = int(input("Enter monthly salary: "))
experience = int(input("Enter years of experience: "))

if salary >= 30000 and experience >= 2:


print("Eligible for Loan")
else:
print("Not Eligible for Loan")

Sample Output
Enter monthly salary: 40000
Enter years of experience: 3
Eligible for Loan
Phase 6: Python Loop Concept (for, while)

1. Print Numbers from 1 to 10


for i in range(1, 11):
print(i)

Output
1
2
3
4
5
6
7
8
9
10

2. Print Even Numbers Between 1–50


for i in range(1, 51):
if i % 2 == 0:
print(i)

Output
2
4
6
8
10
...
50

3. Multiplication Table
num = int(input("Enter a number: "))

for i in range(1, 11):


print(num, "x", i, "=", num * i)

Sample Output
Enter a number: 5
5 x 1 = 5
5 x 2 = 10
...
5 x 10 = 50
4. Sum of Numbers from 1 to n
n = int(input("Enter a number: "))

total = 0

for i in range(1, n + 1):


total += i

print("Sum =", total)

Sample Output
Enter a number: 5
Sum = 15

5. Print Numbers in Reverse using while Loop


n = 10

while n >= 1:
print(n)
n -= 1

Output
10
9
8
7
6
5
4
3
2
1

6. Count Numbers Divisible by 3


count = 0

for i in range(1, 51):


if i % 3 == 0:
count += 1

print("Count =", count)

Output
Count = 16
7. Factorial of a Number
num = int(input("Enter a number: "))

factorial = 1

for i in range(1, num + 1):


factorial *= i

print("Factorial =", factorial)

Sample Output
Enter a number: 5
Factorial = 120

8. Print Squares of Numbers


for i in range(1, 11):
print(i * i)

Output
1
4
9
16
25
36
49
64
81
100

9. Take Input Until User Enters 0


num = 1

while num != 0:
num = int(input("Enter number (0 to stop): "))

Sample Output
Enter number (0 to stop): 5
Enter number (0 to stop): 9
Enter number (0 to stop): 0

10. Sum of Digits of a Number


num = int(input("Enter a number: "))

total = 0
while num > 0:
digit = num % 10
total += digit
num = num // 10

print("Sum of digits =", total)

Sample Output
Enter a number: 123
Sum of digits = 6

11. Reverse a Number using Loop


num = int(input("Enter a number: "))

reverse = 0

while num > 0:


digit = num % 10
reverse = reverse * 10 + digit
num = num // 10

print("Reversed Number =", reverse)

Sample Output
Enter a number: 1234
Reversed Number = 4321

12. Print Multiples of 5


for i in range(1, 51):
if i % 5 == 0:
print(i)

Output
5
10
15
20
25
30
35
40
45
50

13. Count Digits in a Number


num = int(input("Enter a number: "))
count = 0

while num > 0:


count += 1
num = num // 10

print("Total digits =", count)

Sample Output
Enter a number: 98765
Total digits = 5

14. Fibonacci Series


n = int(input("Enter number of terms: "))

a = 0
b = 1

for i in range(n):
print(a)
c = a + b
a = b
b = c

Sample Output
Enter number of terms: 6
0
1
1
2
3
5

15. Loop-Based Menu System


while True:
print("\n1. Addition")
print("2. Subtraction")
print("3. Exit")

choice = int(input("Enter choice: "))

if choice == 1:
a = int(input("Enter first number: "))
b = int(input("Enter second number: "))
print("Addition =", a + b)

elif choice == 2:
a = int(input("Enter first number: "))
b = int(input("Enter second number: "))
print("Subtraction =", a - b)

elif choice == 3:
print("Program Ended")
break

else:
print("Invalid Choice")

Sample Output
1. Addition
2. Subtraction
3. Exit
Enter choice: 1
Enter first number: 10
Enter second number: 5
Addition = 15

Enter choice: 3
Program Ended

Phase 7: Python Data Structures

1. Find Maximum and Minimum in List


numbers = [10, 5, 25, 8, 15]

print("Maximum =", max(numbers))


print("Minimum =", min(numbers))

Output
Maximum = 25
Minimum = 5

2. Sum All Elements in List


numbers = [1, 2, 3, 4, 5]

total = sum(numbers)

print("Sum =", total)

Output
Sum = 15

3. Filter Even Numbers from List


numbers = [1, 2, 3, 4, 5, 6]

even_numbers = []
for i in numbers:
if i % 2 == 0:
even_numbers.append(i)

print(even_numbers)

Output
[2, 4, 6]

4. Reverse List Manually


numbers = [1, 2, 3, 4, 5]

reversed_list = []

for i in range(len(numbers)-1, -1, -1):


reversed_list.append(numbers[i])

print(reversed_list)

Output
[5, 4, 3, 2, 1]

5. Count Occurrences of Element


numbers = [1, 2, 2, 3, 2, 4]

count = [Link](2)

print("Occurrences =", count)

Output
Occurrences = 3

6. Remove Duplicates from List


numbers = [1, 2, 2, 3, 4, 4, 5]

unique_numbers = list(set(numbers))

print(unique_numbers)

Output
[1, 2, 3, 4, 5]
7. Sort List Ascending and Descending
numbers = [5, 2, 8, 1, 9]

[Link]()
print("Ascending =", numbers)

[Link](reverse=True)
print("Descending =", numbers)

Output
Ascending = [1, 2, 5, 8, 9]
Descending = [9, 8, 5, 2, 1]

8. Merge Two Lists


list1 = [1, 2, 3]
list2 = [4, 5, 6]

merged = list1 + list2

print(merged)

Output
[1, 2, 3, 4, 5, 6]

9. Create Tuple and Print Elements


colors = ("Red", "Blue", "Green")

print(colors[0])
print(colors[1])
print(colors[2])

Output
Red
Blue
Green

10. Find Length of Tuple


numbers = (10, 20, 30, 40)

print("Length =", len(numbers))

Output
Length = 4
11. Check Element in Tuple
numbers = (1, 2, 3, 4)

print(3 in numbers)

Output
True

12. Convert Tuple to List


numbers = (10, 20, 30)

numbers_list = list(numbers)

print(numbers_list)
print(type(numbers_list))

Output
[10, 20, 30]
<class 'list'>

13. Create Dictionary and Access Values


student = {
"name": "AB",
"age": 21,
"city": "Kolkata"
}

print(student["name"])
print(student["age"])

Output
AB
21

14. Update Dictionary Values


student = {
"name": "AB",
"age": 21
}

student["age"] = 22

print(student)
Output
{'name': 'AB', 'age': 22}

15. Set Operations (Union and Intersection)


set1 = {1, 2, 3, 4}
set2 = {3, 4, 5, 6}

print("Union =", [Link](set2))


print("Intersection =", [Link](set2))

Output
Union = {1, 2, 3, 4, 5, 6}
Intersection = {3, 4}

Phase 8: String Formatting, Indexing & Slicing

1. Create and Print a String


text = "Python Programming"

print(text)

Output
Python Programming

2. Access Characters using Indexing


text = "Python"

print(text[0])
print(text[1])
print(text[2])

Output
P
y
t

3. Use Negative Indexing


text = "Python"

print(text[-1])
print(text[-2])
Output
n
o

4. Slice a String (start:end)


text = "Python Programming"

print(text[0:6])
print(text[7:18])

Output
Python
Programming

5. Reverse String using Slicing


text = "Python"

reverse_text = text[::-1]

print(reverse_text)

Output
nohtyP

6. Extract Substring from Sentence


sentence = "I am learning Python Programming"

print(sentence[14:20])

Output
Python

7. Print Every Second Character


text = "Programming"

print(text[::2])

Output
Pormig
8. Format String using f-strings
name = "AB"
age = 21

print(f"My name is {name} and I am {age} years old.")

Output
My name is AB and I am 21 years old.

9. Combine Multiple Strings


first = "Python"
second = "Programming"

result = first + " " + second

print(result)

Output
Python Programming

10. Remove Spaces using strip()


text = " Hello Python "

print([Link]())

Output
Hello Python

11. Replace Words in String


sentence = "I like Java"

new_sentence = [Link]("Java", "Python")

print(new_sentence)

Output
I like Python

12. Count Occurrences of a Word


sentence = "Python is easy and Python is powerful"
count = [Link]("Python")

print("Occurrences =", count)

Output
Occurrences = 2

13. Check String Starts/Ends with Value


text = "Python Programming"

print([Link]("Python"))
print([Link]("Programming"))

Output
True
True

14. Convert String Case


text = "Python Programming"

print([Link]())
print([Link]())

Output
PYTHON PROGRAMMING
python programming

15. Clean and Format a Messy Sentence


sentence = " python programming is FUN "

clean_sentence = [Link]().title()

print(clean_sentence)

Output
Python Programming Is Fun
Phase 9 – Employee Data Analysis using Pandas

Dataset: [Link]
Name Age Department Salary City
Rahul 25 IT 40000 Kolkata
Sneha NaN HR 35000 Delhi
Amit 30 Finance 50000 Mumbai
Priya 28 IT 45000 NaN
Karan 27 HR 38000 Chennai

Part A: Basic Operations

1. Import Pandas and Load Dataset


import pandas as pd

data = {
"Name": ["Rahul", "Sneha", "Amit", "Priya", "Karan"],
"Age": [25, None, 30, 28, 27],
"Department": ["IT", "HR", "Finance", "IT", "HR"],
"Salary": [40000, 35000, 50000, 45000, 38000],
"City": ["Kolkata", "Delhi", "Mumbai", None, "Chennai"]
}

df = [Link](data)

print(df)

Output
Name Age Department Salary City
0 Rahul 25.0 IT 40000 Kolkata
1 Sneha NaN HR 35000 Delhi
2 Amit 30.0 Finance 50000 Mumbai
3 Priya 28.0 IT 45000 None
4 Karan 27.0 HR 38000 Chennai

2. Display Dataset
print(df)

Output
Name Age Department Salary City
0 Rahul 25.0 IT 40000 Kolkata
1 Sneha NaN HR 35000 Delhi
2 Amit 30.0 Finance 50000 Mumbai
3 Priya 28.0 IT 45000 None
4 Karan 27.0 HR 38000 Chennai

3. Show Column Names


print([Link])

Output
Index(['Name', 'Age', 'Department', 'Salary', 'City'], dtype='object')

4. Find Shape
print([Link])

Output
(5, 5)

5. Check Data Types


print([Link])

Output
Name object
Age float64
Department object
Salary int64
City object
dtype: object

Part B: Data Cleaning

6. Identify Null Values


print([Link]())

Output
Name Age Department Salary City
0 False False False False False
1 False True False False False
2 False False False False False
3 False False False False True
4 False False False False False
7. Count Null Values
print([Link]().sum())

Output
Name 0
Age 1
Department 0
Salary 0
City 1
dtype: int64

8. Replace Missing Age with Average


avg_age = df["Age"].mean()

df["Age"] = df["Age"].fillna(avg_age)

print(df)

Output
Name Age Department Salary City
0 Rahul 25.00 IT 40000 Kolkata
1 Sneha 27.50 HR 35000 Delhi
2 Amit 30.00 Finance 50000 Mumbai
3 Priya 28.00 IT 45000 None
4 Karan 27.00 HR 38000 Chennai

9. Replace Missing City with 'Unknown'


df["City"] = df["City"].fillna("Unknown")

print(df)

Output
Name Age Department Salary City
0 Rahul 25.0 IT 40000 Kolkata
1 Sneha 27.5 HR 35000 Delhi
2 Amit 30.0 Finance 50000 Mumbai
3 Priya 28.0 IT 45000 Unknown
4 Karan 27.0 HR 38000 Chennai

10. Drop Rows if Name is Missing


df = [Link](subset=["Name"])

print(df)
Output
Name Age Department Salary City
0 Rahul 25.0 IT 40000 Kolkata
1 Sneha 27.5 HR 35000 Delhi
2 Amit 30.0 Finance 50000 Mumbai
3 Priya 28.0 IT 45000 Unknown
4 Karan 27.0 HR 38000 Chennai

Part C: Data Analysis

11. Min, Max, Average, Total Salary


print("Minimum Salary =", df["Salary"].min())
print("Maximum Salary =", df["Salary"].max())
print("Average Salary =", df["Salary"].mean())
print("Total Salary =", df["Salary"].sum())

Output
Minimum Salary = 35000
Maximum Salary = 50000
Average Salary = 41600.0
Total Salary = 208000

12. Standard Deviation of Age


print(df["Age"].std())

Output
1.8027756377319946

13. Use describe()


print([Link]())

Output
Age Salary
count 5.000000 5.000000
mean 27.500000 41600.000000
std 1.802776 5966.573557
min 25.000000 35000.000000
25% 27.000000 38000.000000
50% 27.500000 40000.000000
75% 28.000000 45000.000000
max 30.000000 50000.000000
Part D: Data Manipulation

14. Show First 3 Records


print([Link](3))

Output
Name Age Department Salary City
0 Rahul 25.0 IT 40000 Kolkata
1 Sneha 27.5 HR 35000 Delhi
2 Amit 30.0 Finance 50000 Mumbai

15. Show Last 2 Records


print([Link](2))

Output
Name Age Department Salary City
3 Priya 28.0 IT 45000 Unknown
4 Karan 27.0 HR 38000 Chennai

16. Add Bonus Column


df["Bonus"] = df["Salary"] * 0.10

print(df)

Output
Name Age Department Salary City Bonus
0 Rahul 25.0 IT 40000 Kolkata 4000.0
1 Sneha 27.5 HR 35000 Delhi 3500.0
2 Amit 30.0 Finance 50000 Mumbai 5000.0
3 Priya 28.0 IT 45000 Unknown 4500.0
4 Karan 27.0 HR 38000 Chennai 3800.0

17. Add Employee ID


df["Employee_ID"] = [101, 102, 103, 104, 105]

print(df)

Output
Name Age Department Salary City Bonus Employee_ID
0 Rahul 25.0 IT 40000 Kolkata 4000.0 101
1 Sneha 27.5 HR 35000 Delhi 3500.0 102
2 Amit 30.0 Finance 50000 Mumbai 5000.0 103
3 Priya 28.0 IT 45000 Unknown 4500.0 104
4 Karan 27.0 HR 38000 Chennai 3800.0 105

Bonus Questions

18. Filter Salary > 40000


print(df[df["Salary"] > 40000])

Output
Name Age Department Salary City Bonus Employee_ID
2 Amit 30.0 Finance 50000 Mumbai 5000.0 103
3 Priya 28.0 IT 45000 Unknown 4500.0 104

19. Employees from IT Department


print(df[df["Department"] == "IT"])

Output
Name Age Department Salary City Bonus Employee_ID
0 Rahul 25.0 IT 40000 Kolkata 4000.0 101
3 Priya 28.0 IT 45000 Unknown 4500.0 104

20. Sort by Salary


print(df.sort_values(by="Salary"))

Output
Name Age Department Salary City Bonus Employee_ID
1 Sneha 27.5 HR 35000 Delhi 3500.0 102
4 Karan 27.0 HR 38000 Chennai 3800.0 105
0 Rahul 25.0 IT 40000 Kolkata 4000.0 101
3 Priya 28.0 IT 45000 Unknown 4500.0 104
2 Amit 30.0 Finance 50000 Mumbai 5000.0 103

Phase 10: Pandas Assignment

Dataset
Name Age City Salary
Anand 21 Kolkata 25000
Bikash 23 Delhi 30000
Chandrima 20 Mumbai 28000
Name Age City Salary
Diya 22 Delhi 32000
Eshan 24 Kolkata 27000

Create DataFrame
import pandas as pd
import numpy as np

data = {
"Name": ["Anand", "Bikash", "Chandrima", "Diya", "Eshan"],
"Age": [21, 23, 20, 22, 24],
"City": ["Kolkata", "Delhi", "Mumbai", "Delhi", "Kolkata"],
"Salary": [25000, 30000, 28000, 32000, 27000]
}

df = [Link](data)

print(df)

Output
Name Age City Salary
0 Anand 21 Kolkata 25000
1 Bikash 23 Delhi 30000
2 Chandrima 20 Mumbai 28000
3 Diya 22 Delhi 32000
4 Eshan 24 Kolkata 27000

1. Display First 3 Rows


print([Link](3))

Output
Name Age City Salary
0 Anand 21 Kolkata 25000
1 Bikash 23 Delhi 30000
2 Chandrima 20 Mumbai 28000

2. Display Last 3 Rows


print([Link](3))

Output
Name Age City Salary
2 Chandrima 20 Mumbai 28000
3 Diya 22 Delhi 32000
4 Eshan 24 Kolkata 27000
3. Show Column Names
print([Link])

Output
Index(['Name', 'Age', 'City', 'Salary'], dtype='object')

4. Show Information of Dataset


print([Link]())

Output
<class '[Link]'>
RangeIndex: 5 entries, 0 to 4
Data columns (total 4 columns):

5. Show Description
print([Link]())

Output
Age Salary
count 5.000000 5.000000
mean 22.000000 28400.000000
min 20.000000 25000.000000
max 24.000000 32000.000000

6. Check Datatypes
print([Link])

Output
Name object
Age int64
City object
Salary int64
dtype: object

7. Check Null Values


print([Link]())
print([Link]().sum())
Output
Name 0
Age 0
City 0
Salary 0
dtype: int64

8. Add Bonus Column


df["Bonus"] = df["Salary"] * 0.15

print(df)

Output
Name Age City Salary Bonus
0 Anand 21 Kolkata 25000 3750.0
1 Bikash 23 Delhi 30000 4500.0
2 Chandrima 20 Mumbai 28000 4200.0
3 Diya 22 Delhi 32000 4800.0
4 Eshan 24 Kolkata 27000 4050.0

9. Create Total Salary Column


df["Total_Salary"] = df["Salary"] + df["Bonus"]

print(df)

Output
Name Salary Bonus Total_Salary
0 Anand 25000 3750.0 28750.0
1 Bikash 30000 4500.0 34500.0

10. Delete Bonus Column


[Link]("Bonus", axis=1, inplace=True)

print(df)

Output
Name Age City Salary Total_Salary
0 Anand 21 Kolkata 25000 28750.0

11. Show Salary > 28000


print(df[df["Salary"] > 28000])
Output
Name Age City Salary
1 Bikash 23 Delhi 30000
3 Diya 22 Delhi 32000

12. Show Employees from Mumbai


print(df[df["City"] == "Mumbai"])

Output
Name Age City Salary
2 Chandrima 20 Mumbai 28000

13. Employees Age Between 21 and 23


print(df[(df["Age"] >= 21) & (df["Age"] <= 23)])

Output
Name Age City Salary
0 Anand 21 Kolkata 25000
1 Bikash 23 Delhi 30000
3 Diya 22 Delhi 32000

14. Sort Salary Ascending


print(df.sort_values(by="Salary"))

Output
Name Salary
0 Anand 25000
4 Eshan 27000

15. Sort Salary Descending


print(df.sort_values(by="Salary", ascending=False))

Output
Name Salary
3 Diya 32000
1 Bikash 30000
16. Create Performance Column
df["Performance"] = [Link](df["Salary"] > 30000, "High", "Average")

print(df)

Output
Name Salary Performance
0 Anand 25000 Average
1 Bikash 30000 Average
3 Diya 32000 High

17. Average Salary City-wise


print([Link]("City")["Salary"].mean())

Output
City
Delhi 31000.0
Kolkata 26000.0
Mumbai 28000.0

18. Maximum Salary City-wise


print([Link]("City")["Salary"].max())

Output
City
Delhi 32000
Kolkata 27000
Mumbai 28000

19. Count Employees Per City


print(df["City"].value_counts())

Output
Kolkata 2
Delhi 2
Mumbai 1
20. Min, Max, Mean of Salary
print("Minimum =", df["Salary"].min())
print("Maximum =", df["Salary"].max())
print("Mean =", df["Salary"].mean())

Output
Minimum = 25000
Maximum = 32000
Mean = 28400.0

21. Replace One Salary Value with NaN


[Link][2, "Salary"] = [Link]

print(df)

Output
Name Age City Salary
2 Chandrima 20 Mumbai NaN

22. Detect Missing Value


print([Link]())

Output
Name Age City Salary
0 False False False False
2 False False False True

23. Fill Missing Value with Mean


mean_salary = df["Salary"].mean()

df["Salary"] = df["Salary"].fillna(mean_salary)

print(df)

Output
Name Age City Salary
2 Chandrima 20 Mumbai 28500.0
24. Drop Rows with Missing Values
df = [Link]()

print(df)

Output
Name Age City Salary
0 Anand 21 Kolkata 25000.0
1 Bikash 23 Delhi 30000.0
3 Diya 22 Delhi 32000.0
4 Eshan 24 Kolkata 27000.0

Phase 11: NumPy Operations

Section A: NumPy Arithmetic Operations

1. Element-wise Addition
import numpy as np

a = [Link]([1, 2, 3])
b = [Link]([4, 5, 6])

result = a + b

print(result)

Output
[5 7 9]

2. Subtract One Array from Another


a = [Link]([10, 20, 30])
b = [Link]([1, 2, 3])

result = a - b

print(result)

Output
[ 9 18 27]
3. Multiply Two Arrays Element-wise
a = [Link]([1, 2, 3])
b = [Link]([4, 5, 6])

result = a * b

print(result)

Output
[ 4 10 18]

Explanation

Each element of first array is multiplied with corresponding element of second array.

4. Division Between Arrays


a = [Link]([10, 20, 30])
b = [Link]([2, 5, 0])

result = [Link](a, b)

print(result)

Output
[ 5. 4. inf]

5. Square and Cube of Array


a = [Link]([1, 2, 3, 4])

print("Square =", a ** 2)
print("Cube =", a ** 3)

Output
Square = [ 1 4 9 16]
Cube = [ 1 8 27 64]

6. Modulus Between Arrays


a = [Link]([10, 20, 30])
b = [Link]([3, 4, 5])

result = a % b

print(result)
Output
[1 0 0]

7. Combined Arithmetic Operations


a = [Link]([1, 2, 3])
b = [Link]([4, 5, 6])

result = (a + b) * 2 - b

print(result)

Output
[ 6 9 12]

Section B: arange(), random(), reshape(), resize()

8. Create Array Using arange()


arr = [Link](1, 21)

print(arr)

Output
[ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20]

9. Generate Random Array


arr = [Link](10)

print(arr)

Sample Output
[0.12 0.45 0.78 0.33 0.90 ...]

10. Reshape 1D Array into 2D Array


arr = [Link]([1, 2, 3, 4, 5, 6])

new_arr = [Link](2, 3)

print(new_arr)
Output
[[1 2 3]
[4 5 6]]

11. Resize Array


arr = [Link]([1, 2, 3, 4])

[Link](2, 4)

print(arr)

Output
[[1 2 3 4]
[0 0 0 0]]

12. Random Integer Matrix


arr = [Link](1, 50, size=(3, 3))

print(arr)

Sample Output
[[12 25 31]
[45 7 18]
[20 14 39]]

13. arange() and Reshape into 3x4 Matrix


arr = [Link](1, 13).reshape(3, 4)

print(arr)

Output
[[ 1 2 3 4]
[ 5 6 7 8]
[ 9 10 11 12]]

Phase 12: 2D Array Indexing and Slicing

1. Access Specific Element


arr = [Link]([
[1, 2, 3],
[4, 5, 6],
[7, 8, 9]
])

print(arr[1][2])

Output
6

2. Extract Specific Row


arr = [Link]([
[1, 2, 3],
[4, 5, 6],
[7, 8, 9]
])

print(arr[1])

Output
[4 5 6]

3. Extract Specific Column


arr = [Link]([
[1, 2, 3],
[4, 5, 6],
[7, 8, 9]
])

print(arr[:, 1])

Output
[2 5 8]

4. Slice a Submatrix
arr = [Link]([
[1, 2, 3],
[4, 5, 6],
[7, 8, 9]
])

print(arr[0:2, 1:3])

Output
[[2 3]
[5 6]]
5. Modify Specific Element
arr = [Link]([
[1, 2, 3],
[4, 5, 6]
])

arr[1][1] = 50

print(arr)

Output
[[ 1 2 3]
[ 4 50 6]]

6. Reverse Rows Using Slicing


arr = [Link]([
[1, 2],
[3, 4],
[5, 6]
])

print(arr[::-1])

Output
[[5 6]
[3 4]
[1 2]]

7. Extract Alternate Elements


arr = [Link]([
[1, 2, 3, 4],
[5, 6, 7, 8]
])

print(arr[:, ::2])

Output
[[1 3]
[5 7]]
Phase 13 & 14:Final Project Submission

Data Analysis Project Report


Dataset Name: Iris Dataset
Date: 08 May 2026
About the Dataset
This dataset is about iris flowers. Each row stands for one flower sample. The dataset helps us
compare the size of sepals and petals across three species of iris flowers. It is a simple and famous
dataset used for learning biology and data analysis.
The dataset has 150 rows and 6 columns. This means we have information about 150 flowers and 6
different details for each flower.
The Id column gives a unique number to each flower. The SepalLengthCm column shows the length
of the sepal in centimetres. The SepalWidthCm column shows the width of the sepal in centimetres.
The PetalLengthCm column shows the length of the petal in centimetres. The PetalWidthCm column
shows the width of the petal in centimetres. The Species column tells us the name of the flower
species.

Graph 1: Number of Flowers in Each Species

What this graph is showing


This graph is a bar chart. It compares how many flowers belong to each species. The height of each
bar shows the number of flowers in that group.
What pattern or finding we can see
We can see that all three species have the same number of flowers. Each species has 50 samples,
so the dataset is evenly divided.
Why this matters
This matters because fair comparison becomes easier when each species has equal representation.
In biology studies, balanced data helps us compare groups without giving extra weight to one group.
Key Takeaway: The dataset is balanced because each species has the same number of
flowers.

Graph 2: Species Share in the Dataset

What this graph is showing


This graph is a pie chart. It shows how much of the whole dataset belongs to each species. Each slice
stands for one species.
What pattern or finding we can see
We can see that each species takes one third of the full dataset. The slices are equal in size.
Why this matters
This matters because it confirms again that the dataset is evenly shared among the three species.
This makes the dataset suitable for beginner-level comparison and learning.
Key Takeaway: Each species forms an equal part of the dataset.
Graph 3: Sepal Length Distribution

What this graph is showing


This graph is a histogram. It groups sepal length values into ranges and shows how many flowers fall
in each range.
What pattern or finding we can see
We can see that most flowers have medium sepal length, while very small and very large values are
fewer. The values are spread across a reasonable range.
Why this matters
This matters because it helps us understand the common size of sepals in the dataset. In biology,
knowing the spread of sizes helps us study variation among plants.
Key Takeaway: Most flowers have sepal lengths in the middle range, not at the extremes.
Graph 4: Petal Length by Species

What this graph is showing


This graph is a box plot. It shows the spread of petal length for each species. It helps us compare the
centre and variation of values in each group.
What pattern or finding we can see
We can clearly see that Iris-setosa has much smaller petals than the other two species. Iris-virginica
has the largest petal lengths, while Iris-versicolor is in between.
Why this matters
This matters because petal length is very useful for telling species apart. In biology, a visible
difference like this can help in classification and identification of plants.
Key Takeaway: Petal length clearly separates the species, especially Iris-setosa from the
others.
Graph 5: Sepal Width by Species

What this graph is showing


This graph is another box plot. It compares the spread of sepal width across the three species.
What pattern or finding we can see
We can see some difference between the species, but there is more overlap here. This means the
values are not as clearly separated as petal length.
Why this matters
This matters because not every flower feature is equally helpful for identifying species. Some
measurements give strong clues, while others give only limited clues.
Key Takeaway: Sepal width shows some difference, but it does not separate the species as
clearly as petal length.
Graph 6: Correlation Heatmap of Main Numeric
Features

What this graph is showing


This graph is a correlation heatmap. It shows how strongly the flower measurements are related to
one another. Darker values mean a stronger relationship.
What pattern or finding we can see
We can see that petal length and petal width have a very strong positive relation. This means flowers
with longer petals usually also have wider petals.
Why this matters
This matters because related measurements often grow together in living organisms. In biology, such
relationships help us understand how plant parts change together.
Key Takeaway: Petal length and petal width increase together very strongly.

Overall Summary
The Iris dataset is simple, clean, and very useful for beginners. It contains equal numbers of three iris
species, so comparison is easy and fair. The graphs show that petal measurements are more helpful
than sepal measurements for telling the species apart. Iris-setosa is clearly different because its
petals are much smaller. Iris-versicolor usually stays in the middle, while Iris-virginica often has the
largest petal values. Sepal width also changes across species, but the groups overlap more. Overall,
this dataset teaches us that some biological features are more useful than others when we study and
compare plants.

You might also like