Professional Documents
Culture Documents
Aviral DT
Aviral DT
Experiment: 1.1
2. ToolUsed:
Google Colab
4. Code:
1.) importnumpyasnp
2.) c= np.ones((4,5,6))
print(c)
3.) c= list(range(10))
c = np.array(c)
print(c)
4.) c =list(range(10))
c = np.array(c)
print(c)
print(c[:5])
print(c[6:])
print(c[:])
5.) x=np.random.random_sample(size=(5,3))
print(x, x.shape,x.dtype)
University Institute of Engineering
Department of Computer Science & Engineering
6.) c = np.linspace(4,15,10)
print(c)
7.) c=np.zeros((4,2))
print(c)
8.) c=[10,100,90,80,9,5]
d=np.array(c)
print (c)
print(d)
print(type (c))
print(type(d))
9.) c=[10,100,90,80,9,5]
d=np.array(c)
print (c)
print(d)
print(type (c))
print(type(d))
University Institute of Engineering
Department of Computer Science & Engineering
10.) c = np.arange(10).reshape((10,1))
print(c,type(c))
11.) print(np.sin(x),end="\n\n")
print(np.cos(x),end="\n\n")
print(np.sqrt(x),end="\n\n")
6. Result andSummary:
It also has functions for working in domain of linear algebra, fouriertransform , and matrices.
NumPy was created in 2005 by travis Oliphant. It is an open source project and you can use it
freely.
3. Build effective data visualizations and learn to work with data through theentire
Dataprocess.
5. Work in a team that can propose , design , implement and report on theirselected
domain.
University Institute of Engineering
Department of Computer Science & Engineering
Experiment:
4. Code:
University Institute of Engineering
Department of Computer Science & Engineering
Importing MATPLOTLIB.
plt.plot(x, y)
plt.show()
plt.show()
plt.show()
plt.xlabel('Days')
plt.ylabel('Distance (kms)')
plt.title('Information')
plt.legend()
plt.show()
plt.show()
plt.xlabel('Saving*100')
plt.ylabel('Income*1000')
plt.title('Scatter Plot')
plt.legend()
plt.grid()
plt.show()
plt.show()
BOX Plot
import numpy as np
import matplotlib.pyplot as plt
data = [np.random.normal(0, std, 100) for std in range(1, 4)]
plt.boxplot(data) #,vert=False)
plt.show()
Data Visualization
6. Graphical representation of information and data
7. Graph, Chart, and Map make it easier to understand the patterns in data
8. Matplotlib is a comprehensive library for creating static, animated, and interactive visualizations in Python.
9. Seaborn is a Python data visualization library based on matplotlib. It provides a high-level interface for
drawing attractive and informative statistical graphics.
StudentName:Adityakumar UID:21BCS3283
Branch: Computer Science&Engineering Section/Group:3_B
Semester: Istsemester Date of Performance: 1 oct,2021
Subject Name: DisruptiveTechnology
Subject Code: 210-21ECP-102_21BCS_3_B
1. Aim of thepractical:
2. ToolUsed:
Google Colab
CODE:
g)TRUE\FALSE
University Institute of Engineering
Department of Computer Science & Engineering
a)CSV (Comma Separated Values) is a simple file format used to store tabular data such as a
spreadsheet or database.
b) A CSV file stores tabular data (numbers and text) in plain text.
c)Each line of the file is a data record.
d)Each record consists of one or more fields, separated by commas.
University Institute of Engineering
Department of Computer Science & Engineering
2. Tool Used:
Google colab
4 similation
1
University Institute of Engineering
Department of Computer Science & Engineering
2-
3-
4-
5-
6-
University Institute of Engineering
Department of Computer Science & Engineering
7-
8-
9-
CODE
Code 1
#pyhton code to create file
file = open('kushank.txt','w')
file.close()
Code 2
Code 3
Code 4
Code 5
# Python code to illustrate read() mode character wise
file = open("kushank.txt", "r")
print (file.read(5))
Code 6
# Python code to illustrate append() mode
file = open('kushank.txt','a')
file.write("This will add this line")
file.close()
Code 7
# Python code to illustrate with()
with open(kushank.txt") as file:
data = file.read()
Code 8
# Python code to illustrate with() alongwith write()
with open("kushank.txt", "w") as f:
f.write("Hello World!!!")
Code 9
# Python code to illustrate split() function
with open("kushank.txt", "r") as file:
University Institute of Engineering
Department of Computer Science & Engineering
data = file.readlines()
for line in data:
word = line.split()
print (word)
OUTPUT
1-
University Institute of Engineering
Department of Computer Science & Engineering
2-
3-
University Institute of Engineering
Department of Computer Science & Engineering
4-
-
5-
University Institute of Engineering
Department of Computer Science & Engineering
6-
8-
University Institute of Engineering
Department of Computer Science & Engineering
9-
3. Student Engagement in 5
Simulation/Demonstration/Performance
and Controls/Pre-Lab Questions.
Signature of Faculty (with Date): Total Marks Obtained: 20