0% found this document useful (0 votes)
10 views6 pages

2324003

The project report details the development of an interactive Python application for performing various array operations, including insertion, display, searching, and finding minimum and maximum values. It outlines the methodology, implementation with Python code, and provides an example walkthrough demonstrating the application's functionality. The report concludes with potential applications and future enhancements for the project.

Uploaded by

teracod883
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)
10 views6 pages

2324003

The project report details the development of an interactive Python application for performing various array operations, including insertion, display, searching, and finding minimum and maximum values. It outlines the methodology, implementation with Python code, and provides an example walkthrough demonstrating the application's functionality. The report concludes with potential applications and future enhancements for the project.

Uploaded by

teracod883
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/ 6

SEVA SADAN'S

R.K. TALREJA COLLEGE OF ARTS, SCIENCE & COMMERCE


Department of Computer Science

A Project Report
on
Array Operations Application

In fulfilment of the requirement for the completion of the Internal Assessment

Major 3: DESIGN & ANALYSIS OF ALGORITHMS

Submitted by
Shriniwasan chalwadi
Name of Student: ____________________
2324003
Roll No: ____________________

F.Y.BSc. Computer Science (NEP 2020) SEM II


A.Y. 2024 - 25

Prof. Jairam Mulchandani


Project In-charge
Table of Contents

Sr. No. Particulars Page No.

1 Introduction
3
1.1 Overview 3
1.2 Problem Statement
3
1.3 Objectives and Features 3
2 Methodology or Algorithm
3
3 Implementation
3
3.1 Python Code
4-5
3.2 Example Walkthrough
6
4 Result and Conclusion (Along with Screenshots)
6
5 Applications & Future Scope
6
1.Introduction
1.1 Overview

This project focuses on implementing an application that performs various operations on an array
(list in Python), including adding elements, finding the sum, largest and smallest elements,
searching for an element, and displaying the array.

1.2 Problem Statement

Arrays are a fundamental data structure in programming, and efficient manipulation of arrays is
crucial in many applications. This project aims to create an interactive Python application that
allows
users to perform various array operations easily.

1.3 Objectives and Features

Implement an interactive program for performing basic array operations.


Provide functions for insertion, display, searching, and finding min/max values.
Demonstrate the application using an example walkthrough.

2. Methodology or Algorithm

1. Accept an array from the user.


2. Provide a menu-driven interface for operations:
Insert elements
Display the array
Find the sum, largest, and smallest elements
Search for an element
3. Implement each operation using Python functions.
4. Display results step-by-step.

3. Implementation
3.1 Python Code

def add_element(arr, element):


"""Adds an element to the array"""
arr.append(element)
print(f"{element} added to the array.")

def display_array(arr):
"""Displays the current array"""
print("Current Array:", arr)

def find_sum(arr):
"""Finds the sum of elements in the array"""
return sum(arr)

def find_largest(arr):
"""Finds the largest element in the array"""
return max(arr) if arr else None

def find_smallest(arr):
"""Finds the smallest element in the array"""
return min(arr) if arr else None

def search_element(arr, element):


"""Searches for an element in the array"""
return arr.index(element) if element in arr else -1

# Main Program
array = []

while True:
print("\nChoose an operation:")
print("1. Add element")
print("2. Display array")
print("3. Find sum")
print("4. Find largest element")
print("5. Find smallest element")
print("6. Search for an element")
print("7. Exit")
choice = input("Enter your choice: ")

if choice == "1":
num = int(input("Enter the number to add: "))
add_element(array, num)

elif choice == "2":


display_array(array)

elif choice == "3":


print("Sum of elements:", find_sum(array))

elif choice == "4":


print("Largest element:", find_largest(array))

elif choice == "5":


print("Smallest element:", find_smallest(array))

elif choice == "6":


num = int(input("Enter the number to search: "))
index = search_element(array, num)
if index != -1:
print(f"Element found at index {index}")
else:
print("Element not found.")

elif choice == "7":


print("Exiting the program.")
break

else:
print("Invalid choice! Please try again.")
3.2 Example Walkthrough

1. Add elements: [10, 20, 30, 40, 50]


2. Display array: [10, 20, 30, 40, 50]
3. Find sum: 150
4. Find largest: 50
5. Find smallest: 10
6. Search for 30 - Found at index 2
4. Result and Conclusion

The application successfully implemented array operations such as insertion, display, searching,
and finding min/max values. The project demonstrates how arrays can be manipulated effectively
using Python.

5. Applications & Future Scope

Applications:
- Used in databases, scientific computing, and search engines.
Future Scope:
Adding more complex operations such as sorting and filtering.
Implementing a graphical user interface.
Expanding functionality for multi-dimensional arrays

You might also like