Professional Documents
Culture Documents
ASSIGNMENT Omkar Ip Lab 5
ASSIGNMENT Omkar Ip Lab 5
IP- LAB
NAME: - OMKAR JAYBHAYE
PRN: - 20230802109
BATCH: - A3
AIM- Creating a product database using a dictionary and storing following information
about product p_id, p_name, p_company and p_price.
INTRODUCTION-
A database is a structured collection of data that is organized and stored in a way that
makes it easy to retrieve, update, and manage information. It acts as a digital storage
for storing and managing data, allowing users to efficiently store, retrieve, delete and
manipulate data for various purposes, such as storing customer information, product
details, or any other type of data.
ALGORITHM-
Defining a A dictionary is a data structure that stores a collection of key-value pairs.
Each key is unique and used to access its associated value. Dictionaries are flexible,
unordered, and mutable, making them useful for quickly looking up values based on
their keys.
1. product database dictionary and providing a menu interface to perform various
operations on the database (adding, deleting, updating, and displaying products).
2. The program uses a while loop to continuously display the menu and process user
input until the user chooses to exit.
4. Prompt to select an option from the menu (1 to 6) and then providing input
accordingly. The program keeps running until the user chooses to exit.
CODE:-
OUTPUT-
Adding new products
Updating the price of a product and viewing its details
Viewing all product details