0% found this document useful (0 votes)
120 views

Ai Practical File 2023

Siddhant Jain submitted their practical file for the subject Artificial Intelligence. The file contains 14 programs covering Python basics like printing, calculations, data types and more. The programs calculate areas, swap variables, find averages and perform other tasks as exercises. Siddhant's teacher will review and sign the file.

Uploaded by

33 Siddhant Jain
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)
120 views

Ai Practical File 2023

Siddhant Jain submitted their practical file for the subject Artificial Intelligence. The file contains 14 programs covering Python basics like printing, calculations, data types and more. The programs calculate areas, swap variables, find averages and perform other tasks as exercises. Siddhant's teacher will review and sign the file.

Uploaded by

33 Siddhant Jain
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/ 31

PRACTICAL FILE

Session: 2023 – 24

ARTIFICAL
INTELLIGENCE
RAJHANS VIDYALAYA

Submitted by Siddhant Submitted to


Mrs. JayshreeKutty
Subject Teacher – AI
Students
Basic
Details

Roll No: 27
Name of Candidate: Siddhant Jain
Class& Sec: 9th C

Date of submission: 28/08/2023


SYLLABUS FOR AI PRACTICAL FILE
CLASS –

P SUBJECT SPECIFIC SKILLS Marks


A Practical Work 10
R • Unit 4: Introduction to Python
T
Practical Examination 20
-
C (Any 3 Programs based on the above topics)
Viva – Voce /ACTIVITY 5
TOTAL 35
P Practical Work/Field Visit/ Practical File/Student
A Portfolio 15
R relate it to Sustainable Development Goals
T
-
C
GRAND TOTAL 50
INDEX

SR NO PRACTICAL NAME SIGNATURE


print()
1 Print 5 lines about yourself using print() function.

2 To find square of number 7 using print() function.

3 To find the sum of two numbers 15 and 20.

4 To calculate Simple Interest if the principle_amount =


2000 rate_of_interest = 4.5 time = 10
5 To convert length given in kilometers into meters .

input ()
6 To calculating average marks of 3 subjects

7 Write a program to obtain length and breadth of a


rectangle and calculate its area.
8 Write a program to obtain temperature in Celsius and
convert it into Fahrenheit using formula.
9 Write a program to swap two variables without using
temporary variable.
10 Write a program to swap two variable using
third/temporary variable.
11 Write a program to compute perimeter of the
following shapes (Square, Triangle Circle)
12 Write a program to compute area and circumference
of a circle.
13 Write a program to find total and Percentage of three
Subjects and print in result format
14 To calculate Surface Area and Volume of a Cuboid

List
15 Create a list in Python of children selected for
science quiz with following names- Arjun, Sonakshi,
Vikram, Sandhya, Sonal, Isha, Kartik
Perform the following tasks on the list in sequence-
○ Print the whole list
○ Delete the name “Vikram” from the list
○ Add the name “Jay” at the end
○ Remove the item which is at the second position.
16 Create a list num=[23,12,5,9,65,44]
○ Print the length of the list
○ Print the elements from second to fourth position
using positive indexing
○ Print the elements from position third to fifth using
negative indexing
17 Create a list List_1=[10,20,30,40]. Add the elements
[14,15,12] using extend function. Now sort the final
list in ascending order and print it.
Date: ___________ Page No.1
Practical –1

Learning Outcome: Python Basics

Objective: Printing 5 lines.

Task: Print 5 lines about yourself using print() function.

Attach your code here


#Siddhant Jain Write Five Lines About Yourself
name="Siddhant"
school="Rajhans Vidyalya"
colour="blue"
hobby1="coding"
hobby2="chess"
print("My name is",name)
print("My school's name is",school)
print("My favourite colour is",colour)
print("I like",hobby1)
print("I like",hobby2)

Output:

Date: ___________ Page No.2


Practical – 2

Learning Outcome: Python Basics

Objective: To find square of number 7.

Task: To find square of number 7 using print() function.

Attach your code here


#Siddhant Jain Find the square of number 7
num=7
numsquare=num*num
print("Square of Number 7 is",numsquare)

Output:

Date: ___________ Page No.3


Practical – 3

Learning Outcome: Python Basics

Objective: To find sum of two numbers 15 and 20.

Task: To find sum of two numbers 15 and 20 using print() function.


Attach your code here
#Siddhant Jain To find sum of two numbers 15 and 20
num1=15
num2=20
sum=num1+num2
print("Sum of two numbers is",sum)

Output:

Date: ___________ Page No.4


Practical – 4

Learning Outcome: Python Basics


Objective: To calculate simple interest if principal amount=2000,rate of
interest=4.5,time=10

Task: To calculate simple interest if principal amount=2000,rate of


interest=4.5,time=10 using print() function.

Attach your code here


#Siddhant Jain To calculate simple interest if principal amount=2000,
#rate of interest=4.5,time=10
principal=2000
rot=4.5
time=10
si=principal*rot*time/100
print("Simple interest is",si)

Output:
Date: ___________ Page No.5
Practical –5

Learning Outcome: Python Basics

Objective: To convert length given in kilometres into meters .

Task: To convert length given in kilometres into meters using print() function.

Attach your code here


#Siddhant Jain To convert length given in kilometers into meters
kilometers=15
meters=kilometers*1000
print(kilometers,"kilometers is",meters,"meters")

Output:
Date: ___________ Page No.6
Practical – 6

Learning Outcome: Python Basics

Objective: To calculating average marks of 3 subjects.

Task: To calculating average marks of 3 subjects using print() function.

Attach your code here


#Siddhant Jain To calculating average marks of 3 subjects.
sub1=float(input("Enter Marks of first subject"))
sub2=float(input("Enter Marks of second subject"))
sub3=float(input("Enter Marks of third subject"))
avg=(sub1+sub2+sub3)/3
print("Average of three subject are-",avg)

Output:
Date: ___________ Page No.7
Practical – 7

Learning Outcome: Python Basics

Objective: Write a program to obtain length and breadth of a rectangle and


calculate its area.

Task: Write a program to obtain length and breadth of a rectangle and


calculate its area using print() function.

Attach your code here


#Siddhant Jain Write a program to obtain length and
#breadth of a rectangle and calculate its area.
l=int(input("Enter length of rectangle"))
b=int(input("Enter breadth of rectangle"))
area=l*b
print("Area is",area)

Output:

Date: ___________ Page No.8

Practical – 8

Learning Outcome: Python Basics

Objective: Write a program to obtain temperature in Celsius and convert it into


Fahrenheit using formula.

Task: Write a program to obtain temperature in Celsius and convert it into


Fahrenheit using formula and using print() function.
Attach your code here
#Siddhant Jain Write a program to obtain
#temperature in Celsius and convert it into Fahrenheit using formula.

celsius=float(input("Enter temperature in celsius"))


fahrenheit=(celsius*9/5)+32
print("The temperature in Farhenite is",fahrenheit)

Output:

Date: ___________ Page No.9

Practical – 9

Learning Outcome: Python Basics

Objective: Write a program to swap two variables without using temporary


variable.
Task: Write a program to swap two variables without using temporary variable
using formula and using print() function.

Attach your code here


#Siddhant Jain Write a program to swap two variables without using
temporary variable.
a=input("Enter a number")
b=input("Enter another number")
print("Before Swapping")
print("A is",a)
print("B is",b)
(a,b)=(b,a)
print("After Swapping")
print("A is",a)
print("B is",b)

Output:
Date: ___________ Page No.10

Practical – 10

Learning Outcome: Python Basics

Objective: Write a program to swap two variables with using temporary


variable.

Task: Write a program to swap two variables with using temporary variable
using print() function.

Attach your code here


#Siddhant Jain Write a program to swap two variables with using
temporary variable.
a=input("Enter a number")
b=input("Enter another number")
print("Before Swapping")
print("A is",a)
print("B is",b)
temp=a
a=b
b=temp
print("After Swapping")
print("A is",a)
print("B is",b)

Output:
Date: ___________ Page No.11
Practical – 11

Learning Outcome: Python Basics

Objective:Write a program to compute perimeter of the following shapes


(Square, Triangle Circle).

Task Write a program to compute perimeter of the following shapes (Square,


Triangle Circle) using print() function.

Attach your code here


#Siddhant Jain Write a program to compute
#perimeter of the following shapes (Square, Triangle Circle).
side=float(input("Enter side of square"))
areasquare=side*side
base=float(input("Enter base of triangle"))
height=float(input("Enter height of triangle"))
areatriangle=0.5*base*height
radius=float(input("Enter radius of circle"))
areacircle=3.14*radius*radius
print("Area of square is",areasquare)
print("Area of triangle is",areatriangle)
print("Area of circle is",areacircle)

Output:
Date: ___________ Page No.12
Practical – 12

Learning Outcome: Python Basics

Objective: Write a program to compute area and circumference of a circle.

Task Write a program to compute area and circumference of a circle using


input function.

Attach your code here


#Siddhant Jain Write a program to compute area and circumference of a
circle.
radius=float(input("Enter Radius of circle"))
area=3.14*radius*radius
perimeter=2*3.14*radius
print("Perimeter is",perimeter)
print("Area is",area)

Output:
Date: ___________ Page No.13

Practical – 13

Learning Outcome: Python Basics

Objective: Write a program to find total and Percentage of three Subjects and
print in result format.
Task: Write a program to find total and Percentage of three Subjects and print
in result format using input function.

Attach your code here


#Siddhant Jain Write a program to find total and Percentage
#of three Subjects and print in result format.
#Siddhant Jain To calculating average marks of 3 subjects.
sub1=float(input("Enter Marks of first subject"))
sub2=float(input("Enter Marks of second subject"))
sub3=float(input("Enter Marks of third subject"))
sum=sub1+sub2+sub3;
avg=sum/3
percentage=sum*100/300;
print("Result:")
print("Average:",avg)
print("Percentage",percentage)

Output:
Date: ___________ Page No.14

Practical – 14

Learning Outcome: Python Basics

Objective: To calculate Surface Area and Volume of a Cuboid.


Task To calculate Surface Area and Volume of a Cuboid using input function.

Attach your code here


#Siddhant Jain To calculate Surface Area and Volume of a Cuboid.
l=float(input("Enter length"))
b=float(input("Enter breadth"))
h=float(input("Enter height"))
volume=l*b*h
surface_area=2*(l*b+b*h+h*l)
print("Volume of Cuboid is",volume)
print("Surface Area is",surface_area)

Output:

Date: ___________ Page No 15

Practical – 15

Learning Outcome: Python Basics

Objective: Create a list in Python of children selected for science quiz with
following names- Arjun, Sonakshi, Vikram, Sandhya, Sonal, Isha, Kartik
Perform the following tasks on the list in sequence
○ Print the whole list
○ Delete the name “Vikram” from the list
○ Add the name “Jay” at the end

Task: Create a list in Python of children selected for science quiz with
following names- Arjun, Sonakshi, Vikram, Sandhya, Sonal, Isha, Kartik
Perform the following tasks on the list in sequence using input function.
○ Print the whole list
○ Delete the name “Vikram” from the list
○ Add the name “Jay” at the end

Attach your code here


'''Siddhant Jain Create a list in Python of children selected for science quiz
with followi names-
Arjun, Sonakshi, Vikram, Sandhya, Sonal, Isha, Kartik
Perform the following tasks on the list in sequence using input function.
○ Print the whole list
○ Delete the name “Vikram” from the list
○ Add the name “Jay” at the end'''
a=["Arjun","Sonakshi","Vikram","Sandhya","Sonal","Isha","Kartik"]
print(a)
a.remove("Vikram")
print(a)

a.append("Jay")
print(a)

Output:
Date: ___________ Page No.16

Practical – 16
Learning Outcome: Python Basics

Objective: Create a list num=[23,12,5,9,65,44]


○ Print the length of the list
○ Print the elements from second to fourth position using positive indexing
○ Print the elements from position third to fifth using negative indexing
Task :Create a list num=[23,12,5,9,65,44] using list do the following-
○ Print the length of the list
○ Print the elements from second to fourth position using positive indexing
○ Print the elements from position third to fifth using negative indexing

Attach your code here


'''Siddhant Jain-Create a list num=[23,12,5,9,65,44]
○ Print the length of the list
○ Print the elements from second to fourth position using positive indexing
○ Print the elements from position third to fifth using negative indexing'''

num=[23,12,5,9,65,44]
print(len(num))
print(num[2:4])
print(num[-3:-1])

Output:
Date: ___________ Page No.17

Practical – 17

Learning Outcome: Python Basics

Objective: Create a list List_1=[10,20,30,40]. Add the elements [14,15,12] using


extend function. Now sort the final list in ascending order and print it.
Task : Create a list List_1=[10,20,30,40]. Add the elements [14,15,12] using
extend function. Now sort the final list in ascending order and print it.
Attach your code here
#Siddhant Jain Create a list List_1=[10,20,30,40].
#Add the elements [14,15,12] using extend function.
#Now sort the final list in ascending order and print it.

List_1=[10,20,30,40]
List_1.extend([14,15,12])
List_1.sort()
print(List_1)

Output:

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy