0% found this document useful (0 votes)
18 views7 pages

AI Project File - X (2023-24)

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views7 pages

AI Project File - X (2023-24)

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

MEERUT PUBLIC SCHOOL FOR GIRLS

ARTIFICIAL INTELLIGENCE
(417)

CLASS –X
2023-2024

PROJECT FILE

Submitted By: Submitted To:

Name: Subject Teacher :

Class / sec:
Roll No. :
INDEX

SNO. PROGRAM LIST SIGNATURE

1 Write a program to print “HELLO WORLD”.

2 Write a program to print 5 lines about yourself.

3 Write a program to add three numbers.

4 Write a program to subtract two numbers.

5 Write a program to multiply two float numbers.

6 Write a program to calculate energy using formula:


KE=1/2*(M*V*V)
7 Write a program to calculate the area of circle usingthe
formula: A= 3.14*r*r

8 Write a program to calculate the area of rectangle using


the formula: A= length*breadth

9 Write a program to show the functioning of


modulus (%) and division(/).

10 Write a program to perform all the arithmetic


operations on two given values.

11.
Write a program if the number is positive, we print
an appropriate message.
12.
Write a program to check if a person can vote

13.
Write a program to find the sum of all numbers stored
in a list.
14.
Write a program to add elements in the list.

15.
Write a program to remove elements from the list
1. Write a program to print “HELLO WORLD”.
print(“HELLO WORLD”)

Output: HELLO WORLD

2. Write a program to print five lines about yourself.


print(“My name is ABC”)
print(“I study in class X”)
print(“I study in section “)
print(“I am a student of AI”)
print(“I study in Meerut Public School for Girls”)

Output: My name is ABC


I study in class X
I study in section
I am a student of AI
I study in Meerut Public School for Girls

3. Write a program to add three numbers

x= 10
y=45
z=10
Sum= x+y+z
print(“The sum is :”, sum)

Output: The sum is:65

4. Write a program to subtract two numbers

x= 10
y=45
diff= x-y
print(“The difference is :”, diff)

Output: The difference is:-35


5. Write a program to multiply two float numbers

x= 2.5
y=4.5
mul= x*y
print(“The product is :”, mul)

Output: The product is:11.25

6. Write a program to calculate energy using formula:

KE= 1/2*(M*V*V)

M=10
V=10
KE= 1/2*(M*V*V)
print(“The energy is :”, KE)

Output: The energy is:500

7. Write a program to calculate the area of circle using the formula: A=


3.14*r*r.

r=2
A= 3.14*r*r
print(“The area is :”, A)

Output: The area is :12.56

8. Write a program to calculate the area of rectangle using the formula: A=


length*breadth
length=5
breadth=2
A= length*breadth
Print(“The area is:”, A)

Output: The area is :10


9. Write a program to show the functioning of modulus(%) and divison(/).

x=10
y=2
Mod= x%y
Div=x/y
print(“The modulus result is:”,Mod)
print(“The division result is:”, Div)

Output: The modulus result is: 0


The division result is: 5.0

10. Write a program to perform all the arithmetic operations on two


given values

a=10
b=5
print(a+b,a-b,a*b,a/b,a%b,a**b,a//b)

Output: 15 5 50 2.0 0 1000000 2

11. Write a program if the number is positive, we print an


appropriate message.
num = 3
if num > 0:
print(num, “is a positive number.”) print(“this is always printed”)
num = -1
if num > 0:
print(num, “is a positive number.”)
print(“this is always printed”)

Output: 3 is a positive number

This is always printed

This is also always printed.


12. Write a program to check if a person can vote

age = input(“Enter Your Age”)

if age >= 18:

print(“You are eligible to vote”)

else:

print(“You are not eligible to vote”)

Output: when if the age entered by the person is greater than or


equal to 18, he/she can vote. Otherwise, the person is not eligible
to vote.

13. Write a program to find the sum of all numbers stored in a


list.

numbers = [6, 5, 3, 8, 4, 2, 5, 4, 11]

sum = 0

sum = sum+numbers

print("The sum is", sum)

Output: The sum is 48

14. Write a program to add elements in the list.

List = [ ]
print("Initial blank List: ")
print(List)
# Addition of Elements # in the List
List.append(1)
List.append(2)
List.append(4)
print("\nList after Addition : ")
print(List)

Output:
Initial blank List:
[]
List after Addition: [1, 2, 4]

15. Write a program to remove elements from the list.


# Creating a List
List = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,12]
print("Intial List: ")
print(List)
# Removing elements from List # using Remove() method
List.remove(5)
List.remove(6)
print("\nList after Removal: ")
print(List)

Output:
Intial List: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
List after Removal: [1, 2, 3, 4, 7, 8, 9, 10, 11, 12]

You might also like