Class X Practical File Work
Class X Practical File Work
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
2
CERTIFICATE
_________________
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.
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
4
14. WAP to print first 10 even numbers
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.
Five vegetables
Vowels
First 10 natural numbers
Any five names of your friends
All alphabets of your name
On the basis of this online tool, try and write answers of all the below-
mentioned questions.
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
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
INPUT
OUTPUT
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
INPUT
OUTPUT
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
month=[‘Jan’, ‘Feb’, ‘March’, ‘April’, ‘May’, ‘June’, ‘July’, ‘Aug’, ‘Sep’, ‘Oct’, ‘Nov’,
‘Dec’]
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.
#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
#00ffff
#00ffff
#00ff00
#ff0000
#00ff00
14