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

AI Lab Report

Uploaded by

Ayon Fardous
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)
9 views7 pages

AI Lab Report

Uploaded by

Ayon Fardous
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

1.

Problem: Standard of Deviation Program


Code:

Output:

Description:
The standard deviation measures the spread of the data about the mean value. It
is useful in comparing sets of data that may have the same mean but a different
range. For example, the mean of the following two is the same: 15, 15, 15, 14, 16
and 2, 7, 14, 22, 30. However, the second is clearly more spread out.

2. Problem: Summation Of Prime Number Program


Code:

Output:

Description:
To prove whether a number is a prime number, first try dividing it by 2, and see if
you get a whole number. If you do, it can't be a prime number. If you don't get a
whole number, next try dividing it by prime numbers: 3, 5, 7, 11 (9 is divisible by 3)
and so on, always dividing by a prime number
3. Problem: Use one function for taking input and another for calculating the
radius of the circle and square area

Code:

Output:
Description:
The area of a circle is the region occupied by the circle in a two-dimensional plane.
It can be determined easily using a formula, A = πr2, (Pi r-squared) where r is the
radius of the circle. The unit of area is the square unit, such as m 2, cm2, etc. The
formula for calculating the area of a square can be written like this: Area of square
(A) = Length = Breadth = a × a = a2 where a is the side of the square. All sides of
the square has equal lengths.

4. Problem: Reverse Number


Code:

Output:
Description:
Reversing a number in C programming means changing all the digits of a number to
bring the digit at the last position to the first position and vice-versa. Suppose you
take the number 1234; the reverse is 4321.

5. Problem: Fibonacci series using recursive function

Code:

Output:

Description: The sequence follows the rule that each number is equal to the sum of
the preceding two numbers. The Fibonacci sequence begins with the following 14
integers: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233 ... Each number, starting with
the third, adheres to the prescribed formula.
6. Problem: Pattern Print

Code:

Output:

Description:
Pattern programs are patterns/designs/symbols consisting of numbers, alphabets or
symbols in a particular form. These kinds of the patterns are solved using looping
structures. Pattern programs best means to study the working of looping structures
in general-purpose programming languages.
Lab Report
Artificial Intelligence

Problem 1: Standard of Deviation


Problem 2: Summation of Prime Number
Problem 3: Use one function for taking input and another for calculating the radius
of the circle and square area.
Problem 4: Reverse Number
Problem 5: Fibonacci Theorem
Problem 6: Pattern Print

Submitted By, Submitted To,


Name: Shuvo Chowdhury Ms. Humayra Ahmed
Id: 19202103215
Intake: 44 Lecturer
Section: 03 Department of CSE
Course Code: CSE 352

You might also like