Ip Practical File 2024-25
Ip Practical File 2024-25
PYTHON
1 W.A.P of for loop
12 Introduction of DBMS
13 MySQL Function
Program-1
OUTPUT:-
Display multiplication table of = 11
11 x 1 = 11
11 x 2 = 22
11 x 3 = 33
11 x 4 = 44
11 x 5 = 55
11 x 6 = 66
11 x 7 = 77
11 x 8 = 88
11 x 9 = 99
11 x 10 = 110
Program-2
i=1
OUTPUT:-
Enter the number of which the user wants to print the multiplication table= 15
15 x 1 = 15
15 x 2 = 30
15 x 3 = 45
15 x 4 = 60
15 x 5 = 75
15 x 6 = 90
15 x 7 = 105
15 x 8 = 120
15 x 9 = 135
15 x 10 = 150
Program-3
import pandas as pd
ds = pd.Series([1, 3, 5, 7, 9])
print(ds)
OUTPUT:-
0 1
1 3
2 5
3 7
4 9
dtype: int64
Program-4
import pandas as pd
ds = ds1 + ds2
print(ds)
ds = ds1 - ds2
print(ds)
ds = ds1 * ds2
print(ds)
ds = ds1 / ds2
print(ds)
OUTPUT:-
Add two Series:
0 3
1 7
2 11
3 15
4 19
dtype: int64
Subtract two Series:
0 1
1 1
2 1
3 1
4 1
dtype: int64
Multiply two Series:
0 2
1 12
2 30
3 56
4 90
dtype: int64
Divide Series1 by Series2:
0 2.000000
1 1.333333
2 1.200000
3 1.142857
4 1.111111
dtype: float64
Program-5
import pandas as pd
data = {
"calories": [400, 300, 500], "duration": [150, 250, 450]
}
df = pd.DataFrame(data)
print(df)
OUTPUT:-
calories duration
0 400 150
1 300 250
2 500 450
Program-6
import pandas as pd
data = { 'Name': ['Tom', 'nick', 'krish', 'jack'], 'Age':[20, 21, 19, 18]}
df = pd.DataFrame(data)
print(df)
OUTPUT:-
Name Age
0 Tom 20
1 nick 21
2 krish 19
3 jack 18
Program-7
print(Employee)
OUTPUT:-
<class 'dict'>
printing Employee data
{'Name': 'John', 'Age': 29, 'Salary': 25000, 'Company': 'GOOGLE'}
Program-8
x = [1,2,3]
y = [2,4,1]
plt.plot(x, y)
plt.xlabel('x - axis')
plt.ylabel('y - axis')
plt.show()
OUTPUT:-
Program-9
package bitwisexor;
plt.bar([0.25,1.25,2.25,3.25,4.25],[50,40,70,80,20],
label="BMW",width=.5)
plt.bar([.75,1.75,2.75,3.75,4.75],[80,20,20,50,60],
label="Audi", color='r',width=.5)
plt.legend()
plt.xlabel('Days')
plt.ylabel('Distance (kms)')
plt.title('Information')
plt.show()
OUTPUT:-
Program-10
bins = [0,10,20,30,40,50,60,70,80,90,100]
plt.xlabel('age groups')
plt.ylabel('Number of people')
plt.title('Histogram')
plt.show()
OUTPUT:-
Program-11
plt.title('Pie Chart')
plt.axis('equal'
)plt.show()
OUTPUT:-
12. DATABASE MANAGEMENT SYSTEM
Database Management System is a software package designed to define,
manipulate, retrieve and manage data in database. A DBMS generally manipulates
the data itself, the data format ,field names , record structure and file structure. It
also defines rules to validate and manipulate this data.
TYPES OF DATABASE
The scope of Database Management System is not hidden from any organization.
Everyone knows how important database management system is if they want to
manage their precious data securely. Few most important features of database
management system are as follows:-
CHARACTER FUNCTION
LOWER FUNCTION
UPPER FUNCTION
CONCAT STRING
INSTR FUNCTION
LENGTH FUNCTION
SUBSTR FUNCTION
ROUND FUNCTION
TRUNCATE FUNCTION
MOD FUNCTION
LAST_DAY ()
CURTIME ()
CURDATE ()
PATTERN OF NOW ()