Practical File Class 10
Practical File Class 10
Practical File
of
Artificial Intelligence
6 Write a program in python to find that entered year is leap year or not
x=int(input("Enter no 1: "))
y=int(input("Enter no 2: "))
z=x*y
print(z)
Output:-
Output:-
7. Write a program to find that entered number is positive or
negative.
no=int(input("enter No : "))
if (no >= 0):
print("Positive Number")
else:
print("Negative Number")
Output:-
output:-
for a in range(1,11,1):
print(a)
Output:-
Output:-
sum=0
for a in range(1,11,1):
sum = sum+a
print(sum)
Output:-
13. Write a program to find square of numbers from 1 to 10
by using while loop.
a=1
while a<=10:
square = a**2
print(square)
a+=1
Output:-
import cv2
import numpy as np
import matplotlib.pyplot as plt
img=cv2.imread("C:/Users/Desktop/flower.jpg")
plt.imshow(img)
plt.title(" My picture")
plt.show()
Output:-