Mini Project
Mini Project
Page | 1
certificate
Page | 2
Page | 3
Index
Page no.
Preface 04
Acknowledgments 05
About this project 06
Source Code 07
Output 13
Limitations 21
References 22
Page | 4
Preface
Page | 5
add, display, select, delete and update the
records of garments with different types,
sizes, colors, prices,etc. This project is
programmed in Python language . While
preparing the project, I tried my best to keep
the project simple and reader-friendly.
Page | 6
Acknowledgm
ents
Page | 7
About this
project
My Program helps to keep records of
different garments. It is very useful in
analyzing their types, sizes, colors, prices, etc.
The program allows you to add the records of
a new garment, update the existing records
of any garment, display the records of all the
Page | 8
garment, search for a garment's record and
also to delete any garment record.
Page | 9
Source Code
n = {}
ch = 1
while ch:
print('main menu\n')
print("6. Exit\n")
if ch == 1:
s = {}
s['name'] = name
Page | 10
s['atomic radius'] = float(input('Enter the atomic radius of the element: '))
s['first ionization energy'] = input('Enter the first ionization energy of the element: ')
n[name] = s
while b == 'y':
s = {}
s['name'] = name
s['first ionization energy'] = input('Enter the first ionization energy of the element: ')
n[name] = s
Page | 11
b = input('Do you want to add more records y/n:')
if b=='n':
print( )
if ch == 2:
if name in n:
else:
if ch == 3:
for i in n:
Page | 12
print('Symbol: ', n[i]['symbol'])
if ch == 4:
if name in n:
Page | 13
print('Year of discovery: ', n[name]['year of discovery'])
n[name]['atomic number'] = int(input('Enter the new atomic number of the element: '))
n[name]['atomic weight'] = input('Enter the new atomic weight of the element: ')
n[name]['atomic radius'] = input('Enter the new atomic radius of the element: ')
n[name]['first ionization energy'] = input('Enter the new first ionization energy of the
element: ')
n[name]['oxidation state'] = int(input('Enter the new oxidation state of the element: '))
n[name]['melting point'] = float(input('Enter the new melting point of the element: '))
n[name]['boiling point'] = input('Enter the new boiling point of the element: ')
if ch==5:
ph= input("Do you want to delete a single record or all records y/n:")
if ph=="y":
if name in n:
del n[name]
print("Deleted")
else:
if ph=="n":
del n
Page | 14
print("Deleted")
if ch==6:
print("Exiting...")
break
Page | 15
Output
Page | 16
Enter your choice: 1
Page | 17
Enter the year of discovery of the element: 1808
Page | 18
Enter your choice: 2
Name: Calcium
symbol: Ca
atomic number: 20
oxidation state: 2
density(g/ml): 1.55
Page | 19
Enter your choice: 3
Name: Aluminium
Symbol: Al
Atomic number: 13
Oxidation state: 3
Density(g/ml): 2.702
Name: Calcium
Symbol: Ca
Atomic number: 20
Oxidation state: 2
Density(g/ml): 1.55
Page | 20
Year of discovery: 1808
Name: Aluminium
symbol: Al
Atomic number: 13
Oxidation state: 3
Density(g/ml): 2.702
Page | 22
Enter the new density(g/ml) of the element: 0.971
Page | 23
Output 5: Delete an element’s
record
Deleted
Page | 24
Limitations
Page | 25
Page | 26
References
● Textbook: Computer Science with
Python by
Sumita Arora
● https://chat.openai.com/
● Adobe Acrobat
Page | 27