0% found this document useful (0 votes)
34 views10 pages

Ai Practical File

Uploaded by

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

Ai Practical File

Uploaded by

kobayashirei602
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 10
DELHI PUBLIC SCHOOL su OK-GURUGRAM In Pursuit of Excellence Artificial Intelligence Practical File 2023-24 Made By: INDEX S No. Program Title eignnture 1 Program 1: Is the Number Even or Not? 2 Program 2: Temperature conversion (°C. -+ °F) 4 Program 3: Average of Integers 4. Program 4: Product of Real Numbers 5, Program 5: Area and circumference of a circle 6. Program 6: Is the Number a Multiple of 5 and 7? 7. Program 7: Writing Integers in Reverse 8 Program 8: Display of All the Multiples of 3 b/w 10 to 50 9. Program 9: Is the Number a Prime Number or Not? 7 Program 10: Linear Search 11 Program 11: Factorial of a Number 42 Program 12: Is the Number an Armstrong Number? 13. Program 13: Accessing Elements of a List using Loops 14, Program 14: Installing Python NumPy 15. Program 15: Creating a NumPy Ar ay Python program to check whether the given number is even or not. Onan: iput("Enter a are eae BUT eel eee Ba print("The number is Even.”) else: print("The number is Odd") Python program to convert the temperature in degree centigrade to Fahrenheit = Input("Enter temperature Orr: in Centigrade: *) £= (@"(nt(oyy'5)+32 SRC i Rec ee) Reece eo) print("Temperature in Fahrenheit is: * 1) Python program to find out the average of a set of integers ‘count = int(input("Enter the count Output: enue) ecm Ree eed iro Cee sum=0 Co ea for iin range(count) eae int(input("Enter an integer: *)) Enter an integer: 5 eee ce bie ac) ae sum = sum +x avg = sum/count print("The average is: ", avg) Python program to find the product of a set of real number iro ort product = 1 Enter the number of real numbers: 4 Enter a real number count = int(input("Enter the number of real numbers: °)) Enter a real number: 2.9 Cree es for iin range(count): Creme ea) x= float(input("Enter a real ey sae essen ELLA eee number: ")) product = product * x print("The product of the numbers is: ", product) Python program to find the circumference and area of a circle with a given radius += float(input(“Input the radius of the circle: ")) 23.14" 6 area 3.14.67 print("The circumference of the circle is:",0) print("The area of the circle is: *, area) Python program to check whether the given integer is a multiple of both 5 and 7 ‘number = int(input(*Enter an integer: *)) ores If (number -O}and(number%47==0)): ace eEE} EET e an ene printinumber, "is a multiple of both § and rn) Else: printinumber, "is not a multiple ofboth 8 and r Python program to display the given integer in a reverse manner number = int(input("Enter a Output: positive integer: ")) rev=0 Enter a positive integer: 739 while(number!=0): 937 digit number%10 rev = (rov"10}+

You might also like