2324003
2324003
A Project Report
on
Array Operations Application
Submitted by
Shriniwasan chalwadi
Name of Student: ____________________
2324003
Roll 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.
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.
2. Methodology or Algorithm
3. Implementation
3.1 Python Code
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
# 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)
else:
print("Invalid choice! Please try again.")
3.2 Example Walkthrough
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.
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