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

10th AI Practical Questions(2024-25)

Uploaded by

madhukothari7380
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)
49 views

10th AI Practical Questions(2024-25)

Uploaded by

madhukothari7380
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

PRACTICAL QUESTIONS (To be written in practical copy)

SUBJECT: ARTIFICIAL INTELLIGENCE (417)

CLASS: X
1. Write a python program to Print 5 lines about yourself using print () function.
name = "Your Name"
dob= “your date of birth”
age= “your age”
school= “ your school”
friend= “ your friend name”
print ("My name is", name)
print (“My date of birth is”, dob)
print (“My age is =”, age)
print (“My school name is”, school)
print (“My best friend name is ”, fr
friend)

2. Draw and explain the various symbols used in flow chart in your practical file. Write an
algorithm and flowchart to find area and perimeter of square.
3. Consider the following data of a clothes store and plot the data on
the line chart and Bar chart.

Month Jeans T-Shirts Shirts

March 1500 4400 6500

April 3500 4500 5000

May 6500 5500 5800

June 6700 6000 6300

July 6000 5600 6200

August 6800 6300 4500

Customize the chart as you wish. Paste the screen shot of the chart in the file.
4. Visit the link: https://www.w3schools.com/colors/colors_rgb.asp
https://www.w3schools.com/colors/colors_rgb.asp.. On the basis of this online
tool, try and write answers of all the below
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
ur 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?

Paste the screen shots of every code like given here:

5) Write a Program in Python to swap the values of two


variables.

# Python program to swap two variables

x = input('Enter value of x: ')


y = input('Enter value of y: ')
#x = 5
#y = 10

temp = x
x=y
y = temp

print('The value of x after swapp


swapping: {}'.format(x))
print('The value of y after swapping: {}'.format(y))

OUTPUT:
The value of x after swapping: 10
The value of y after swapping: 5
6) Write a simple Python Program to INPUT two variables and print Addition, Subtraction,
Multiplication and Division of both numbers.

a=int(input("Enter Number 1 : "))


b=int(input("Enter Number 2 : "))

print("Addition is : ", a+b)


print("Subtraction is : ", a-b)
print("Multiplication is : ", a*b)
print("Division is : ", a/b)

OUTPUT:

Enter Number 1: 20

Enter Number 2: 10

Addition is : 30

Subtraction is : 10

Multiplication is : 200

Division is : 2

7) Write a python program to convert the temperature from Fahrenheit to Celsius.

celsius_1 = float(input("Temperature value in degree Celsius: " ))


Fahrenheit_1 = (celsius_1 * 1.8) + 32

print('The %.2f degree Celsius is equal to: %.2f Fahrenheit' %(celsius_1, Fahrenheit_1))

print("----OR----")

celsius_2 = float (input("Temperature value in degree Celsius: " ))

Fahrenheit_2 = (celsius_2 * 9/5) + 32

print ('The %.2f degree Celsius is equal to: %.2f Fahrenheit' %(celsius_2, Fahrenheit_2))
8) Write a program to find maximum of three numbers.

a = int(input("Enter first number: ")) # Input1: 10


b = int(input("Enter second number: ")) # Input2: 14
c = int(input("Enter third number: ")) # Input3: 12
if (a >= b) and (a >= c):
largest = a
elif (b >= a) and (b >= c):
largest = b
else:
largest = c
return largest
print(“largest among all is =”, largest) # Output: 14

OUTPUT: Enter first number: 10


Enter second number: 14
Enter third number: 12
Largest among all is = 14

9) Write a program to find a minimum of three numbers.


a = int(input('Enter first number : ')) # 12
b = int(input('Enter second number : ')) # 14
c = int(input('Enter third number : ')) # 11
smallest = 0
if a < b and a < c :
smallest = a
if b < a and b < c :
smallest = b
if c < a and c < b :
smallest = c
print(smallest, "is the smallest of three numbers.") # 11 is the smallest of three numbers.

OUTPUT: Enter first number: 12


Enter second number: 14
Enter third number: 11
11 is the smallest of three numbers.
10) Write a program to check whether the entered number is Armstrong or not.
n=int(input("Enter number to check:"))
#Store the original number into temporary variable
t=n
s=0
#Computing the sum of cube of each digit and iterating until n=0
while n!=0:
r=n%10
s=s+(r**3)
n//=10
#Checking & displaying whether armstrong or not
if t==s:
print(s," is Armstrong number")
else:
print(s," is not an Artmstrong number")

OUTPUT:
11) Consider the given corpus below and answer the questions given:
Document 1: We are going to Mumbai
Document 2: Mumbai is a famous place.
Document 3: We are going to a famous place.
Document 4: I am famous in Mumbai.

1. What is the term frequency and document frequency of “Mumbai”?


Ans- Term frequency: 1, Document frequency:3
2. Calculate the IDF of: 1) “Famous” 2) “place” 3) “Going” 4)
“Mumbai”
Ans- We know that IDF= Document count in corpus/ Document frequency of that term
Document count =4
1. “Famous”- IDF is = 4/3. 2) “Place”- IDF= 4/2 3) “Going”- 4/2
4) “Mumbai”- 4/3

**************************************

You might also like