LANCER’S CONVENT
PRASHANT VIHAR, OUTER RING ROAD,
DELHI - 110085
ARTIFICIAL INTELLIGENCE
PRACTICAL FILE
(2023-2024)
Student Name :-
Admno :-
Class & Section :-
1
ACKNOWLEDGEMENT
I am extremely grateful and remain indebted to our guide Ms Jyotsna Verma for being a source of
inspiration and for her constant support in the design implementation and evaluation of the practical
file. I am Thankful to her for the constant invaluable suggestions which benefited me a lot while
developing the practical record file on “ARTIFICIAL INTELLIGENCE”. She has been a constant
source of inspiration and motivation for hard work.
Student Name: Aisha Garg Signature:___________
Date: 25/10/23
2
CERTIFICATE
THIS IS TO CERTIFY THAT THE PRACTICAL FILE IS BEING SUBMITTED By
Aisha Garg OF CLASS X, UNDER MY SUPERVISION. THEY HAVE COMPLETED THE
PRACTICAL FILE TO OUR SATISFACTION.
_________________
Ms Jyotsna Verma
Lancer’s Convent School
3
INDEX
Teacher’s
S.No. Programs
Signature
1. WAP to calculate the area of a square and rectangle.
2. WAP to swap the value of two variables using and without using third
variable.
3. WAP to input a number from the user. Ask if they want to find the square
of the number or double it. Depending on the choice, perform the proper
operations and print the final result.
4. WAP to check if a person can vote or not.
5. WAP to Input a number and check if the number is positive, negative
or zero and display an appropriate message.
6. WAP to find largest amongst the three integers.
7. WAP to calculate income tax as per the condition.
8. WAP to find sum of first 10 natural numbers using for loop/while loop
9. WAP to take 5 marks from the user and print the average.
10. WAP to print the table of any number given by the user till 20.
11. WAP to print any one pattern using for or while loop.
12. WAP to find the sum of squares of the first 100 natural numbers
13. WAP to print first 10 natural numbers
4
14. WAP to print first 10 even numbers
15. WAP to print odd numbers from 1 to n
16. Create a list in Python of children selected for science quiz with
following names - Arjun, Sonakshi, Vikram, Sandhya, Sonal, Isha,
Kartik
17. WAP to create a list of marks of 10 students and find the maximum
and minimum marks.
18. WAP to create the given list of:
Five vegetables
Vowels
First 10 natural numbers
Any five names of your friends
All alphabets of your name
19. WAP to create the given list
month=[‘Jan’, ‘Feb’, ‘March’, ‘April’, ‘May’, ‘June’, ‘July’, ‘Aug’,
‘Sep’, ‘Oct’, ‘Nov’, ‘Dec’]
Now, write python code to print the following:
Jan, Feb, March
July
Aug
Oct, Nov, Dec
May
20. Visit https://www.w3schools.com/colors/colors_rgb.asp
On the basis of this online tool, try and write answers of all the below-
mentioned questions.
a. What is the output colour when you put R=G=B=255?
b. What is the output colour when you put R=G=255,B=0?
c. What is the output colour when you put R=255,G=0,B=255?
d. What is the output colour when you put R=0,G=255,B=255?
e. What is the output colour when you put R=G=B=0?
f. What is the output colour when you Put R=0,G=0,B=255?
g. What is the output colour when you Put R=255,G=0,B=0?
h. What is the output colour when you put R=0,G=255,B=0?
5
PROGRAM 1: WAP to calculate the area of a square and rectangle.
INPUT
OUTPUT
PROGRAM 2: WAP to swap the value of two variables using and without using third
variable.
INPUT
6
OUTPUT
PROGRAM 3: WAP to input a number from the user. Ask if they want to find the square of the
number or double it. Depending on the choice, perform the proper operations and print the final
result.
OUTPUT
PROGRAM 4: WAP to check if a person can vote or not.
INPUT
OUTPUT
7
PROGRAM 5: WAP to Input a number and check if the number is positive, negative or
zero and display an appropriate message
INPUT
PROGRAM 6: WAP to find largest amongst the three integers.
INPUT
OUTPUT
PROGRAM 7: WAP to calculate income tax as per the condition.
8
OUTPUT
PROGRAM 8: WAP to find sum of first 10 natural numbers using for loop/while loop.
INPUT
OUTPUT
PROGRAM 9: WAP to take 5 marks from the user and print the average.
INPUT
OUTPUT
9
PROGRAM 10: WAP to print the table of any number given by the user till 20.
INPUT
OUTPUT
PROGRAM 11: WAP to print any one pattern using for or while loop.
INPUT
OUTPUT
PROGRAM 12: WAP to find the sum of squares of the first 100 natural numbers
INPUT
10
OUTPUT
PROGRAM 13: WAP to print first 10 natural numbers
INPUT
OUTPUT
PROGRAM 14: WAP to print first 10 even numbers.
INPUT
OUTPUT
11
PROGRAM 15: WAP to print odd numbers from 1 to n.
INPUT
OUTPUT
PROGRAM 16: Create a list in Python of children selected for science quiz with following
names - Arjun, Sonakshi, Vikram, Sandhya, Sonal, Isha, Kartik
INPUT
OUTPUT
PROGRAM 17: WAP to create a list of marks of 10 students and find the maximum and
minimum marks.
INPUT
OUTPUT
12
PROGRAM 18: WAP to create the given list of:
Five vegetables
Vowels
First 10 natural numbers
Any five names of your friends
INPUT
OUTPUT
PROGRAM 19: WAP to create the given list
month=[‘Jan’, ‘Feb’, ‘March’, ‘April’, ‘May’, ‘June’, ‘July’, ‘Aug’, ‘Sep’, ‘Oct’, ‘Nov’,
‘Dec’]
Now, write python code to print the following:
Jan, Feb, March
July
Aug
Oct, Nov, Dec,May
INPUT
OUTPUT
13
PROGRAM 20: Visit https://www.w3schools.com/colors/colors_rgb.asp
On the basis of this online tool, try and write answers of all the below-mentioned questions.
a. What is the output colour when you put R=G=B=255?
#ffffff
b. What is the output colour when you put R=G=255,B=0?
#ffff00
c. What is the output colour when you put R=255,G=0,B=255?
#ff00ff
d. What is the output colour when you put R=0,G=255,B=255?
#00ffff
e. What is the output colour when you put R=G=B=0?
#00ffff
f. What is the output colour when you Put R=0,G=0,B=255?
#00ff00
g. What is the output colour when you Put R=255,G=0,B=0?
#ff0000
h. What is the output colour when you put R=0,G=255,B=0?
#00ff00
14