A.I programs for project file
A.I programs for project file
Output:
Program 2: Program to enter two numbers and print the
arithmetic operations like +,-,*, /, // and %.
Output:
Program 3: Write a Program to check if the entered
number is Armstrong or not.:
Outpu
t:
Program 4: Write a Program to find factorial of
the entered number.
Output:
Program 5: Write a Program to enter the number
of terms and to print the Fibonacci Series.
Output:
Program 6: Write a Program to enter the string and to
check if it’s palindrome or not using loop.
Output:
Program 7: Recursively find the factorial of a
natural number.
Output:
Program 8: To calculate the area of a triangle.
Input:
#area of triangle
Output:
COPY CODE
Output:
math.sqrt(100) : 10.0
math.sqrt(7) : 2.6457513110645907
math.sqrt(math.pi) : 1.7724538509055159
Program 10: To Add Matrices
INPUT:
X= [[8,6,3],
[4 ,5, 6],
[7 ,8, 3]]
Y = [[2,5,5],
[6,5,5],
[3,2,2]]
OUTPUT:
result= [[10,11,8],
[10,10,11],
[10,10,5]]