0% found this document useful (0 votes)
18 views9 pages

Lecture 3 - Algorithms Functions

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)
18 views9 pages

Lecture 3 - Algorithms Functions

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/ 9

Application development Concepts

Algorithm & Program


Algorithm:
• A step-by-step set of instructions designed to solve a problem or accomplish a task.

• A logical procedure that outlines how to perform a task.

• Help in small tasks like adding two numbers, to complex systems like sorting data or
machine learning models.

Algorithm

1. Start
2. Read side length a
3. Read side length b
4. Area = a * b
5. Print area
6. Stop
Program:
• A program is a set of instructions written in a specific programming language to perform a task
or solve a problem.

• A program is implementation of an algorithm in a language that a computer can understand


and execute.

• Programs are the building blocks of all software applications, from simple tools like calculators
to complex systems like operating systems
Difference between Algorithm & Program
An algorithm is an abstract concept for solving a problem, whereas a program is the
actual implementation of that algorithm in a specific programming language.
Function
A function is a group of related statements that work together to complete a
particular job.

Function to calculate area of rectangle.

Calling function:

Result:
30
Modules, Packages, Libraries and Framework
Functions Module 1

Classes Module 1 Module 2 Package 1

Objects Module 3

Modules are used to pack and organize Packages are used to pack and organize
your functions, classes and other code related modules within a project.
objects.

Package 1 Library 1
Library 1 Library 2
Package 2 Framework

Package 3 Library 3

Packages are grouped together to form a Frameworks are used when you are
library within a project. developing a larger application or system.
Artificial Intelligence & Machine Learning
Algorithms -The Foundation in AI/ML:
Algorithms are used to analyze data, identify patterns, and make predictions or decisions.
Examples:

•Classification, regression, clustering, and reinforcement learning are common algorithm types.

Functions - The Building Blocks of AI/ML:


Functions can represent individual steps within an algorithm or a specific data manipulation process.

Examples: Processing a prompt , Evaluating model's performance.


Artificial Intelligence & Machine Learning
Modules: Organizing and Reusing Functions:
Example: A model for image recognition might use a module for image preprocessing
(functions to resize, normalize), a module for feature extraction (functions to identify edges,
shapes), and a module for classification (functions to predict the image's label).

Libraries: Expedite the development of AI Applications:


Libraries are collections of pre-written code that provide essential functionalities, like
algorithms and models, to simplify and expedite the development of AI applications,
allowing developers to focus on higher-level tasks instead of building everything from
scratch

Example: Common libraries include


TensorFlow and PyTorch for deep learning.
Scikit-learn for general ML tasks.
Pandas and NumPy for data manipulation and numerical operations.
Matplotlib/Seaborn for data visualization.
Aassignment

What is the importance of Algorithms, Functions, Modules and Libraries in


Artificial Intelligence and Machine Learning ?

You might also like