Ai Practical File 2023
Ai Practical File 2023
Session: 2023 – 24
ARTIFICAL
INTELLIGENCE
RAJHANS VIDYALAYA
Roll No: 27
Name of Candidate: Siddhant Jain
Class& Sec: 9th C
input ()
6 To calculating average marks of 3 subjects
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
Output:
Output:
Output:
Output:
Date: ___________ Page No.5
Practical –5
Task: To convert length given in kilometres into meters using print() function.
Output:
Date: ___________ Page No.6
Practical – 6
Output:
Date: ___________ Page No.7
Practical – 7
Output:
Practical – 8
Output:
Practical – 9
Output:
Date: ___________ Page No.10
Practical – 10
Task: Write a program to swap two variables with using temporary variable
using print() function.
Output:
Date: ___________ Page No.11
Practical – 11
Output:
Date: ___________ Page No.12
Practical – 12
Output:
Date: ___________ Page No.13
Practical – 13
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.
Output:
Date: ___________ Page No.14
Practical – 14
Output:
Practical – 15
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
a.append("Jay")
print(a)
Output:
Date: ___________ Page No.16
Practical – 16
Learning Outcome: Python Basics
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
List_1=[10,20,30,40]
List_1.extend([14,15,12])
List_1.sort()
print(List_1)
Output: