Download as pdf or txt
Download as pdf or txt
You are on page 1of 36

University Institute of Engineering

Department of Computer Science & Engineering

Experiment: 1.1

Student Name: Aviral Mishra UID:21BCS7242


Branch: Computer Science &Engineering Section/Group:3_B
Semester: 1st semester Date of Performance: 1 oct,2021
Subject Name: Disruptive Technology
Subject Code: 210-21ECP-102_21BCS_3_B

1. Aim of the practical:

Explore data pre processing packages and AIML algorithim.

a.) Numerical Phython(NumPY in phython)

2. ToolUsed:

Google Colab

3. Basic Concept/ CommandDescription:

1. Open the Google Colab and press the newnotebook.


2. We set the file name in Google Colabnotebook.
3. And then we start to write the text / coding in this new notebook.
4. Lastly, we check the result is run ornot.
University Institute of Engineering
Department of Computer Science & Engineering

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")

5. Observations and Simulation Screen Shots:


University Institute of Engineering
Department of Computer Science & Engineering
University Institute of Engineering
Department of Computer Science & Engineering
University Institute of Engineering
Department of Computer Science & Engineering
University Institute of Engineering
Department of Computer Science & Engineering

6. Result andSummary:

NumPy is a phython library used for working with arrays.

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.

NumPy stands for Numerical Phython.

7. Additional Creative Inputs (IfAny):

Learning outcomes (What I have learnt):

1. Grasp the characteristics of disruptive technology and understand building blocks


building block of Artificial intelligent ,Data Science andCoud
Computing.
2. Develop simple intelligent system using available tools and techniques of AIto
analyze and interpret domainknowledge

3. Build effective data visualizations and learn to work with data through theentire

Dataprocess.

4. Deploy ,build and monitor and cloud basedapplications

5. Work in a team that can propose , design , implement and report on theirselected

domain.
University Institute of Engineering
Department of Computer Science & Engineering

Evaluation Grid (To be filled by Faculty):


Sr. No. Parameters Marks Obtained Maximum Marks
1. Worksheet completion including 10
writinglearning
objectives/Outcomes.(To besubmitted
at the end of the day)
2. Post Lab Quiz Result. 5
3. Student Engagement in 5
Simulation/Demonstration/Performance
and Controls/Pre-Lab Questions.
Signature of Faculty (with Date): Total Marks Obtained: 20
University Institute of Engineering
Department of Computer Science & Engineering

Experiment:

Student Name: Pranjal UID: 21BCS3405


Branch: Computer Science & Engineering Section/Group: 3B
Semester:1 Date of Performance: 02/08/21
Subject Name: Distruptive Technology
Subject Code:

1. Aim of the practical:


Explore data pre processing packages and AIML algorithim.
b.) Matplotlib
2. Tool Used: Google Colab.

3. Basic Concept/ Command Description:

1. Graphical representation of information and data


2. Graph, Chart, and Map make it easier to understand the patterns in data
3. Matplotlib is a comprehensive library for creating static, animated, and interactive visualizations in Python.
4. Seaborn is a Python data visualization library based on matplotlib. It provides a high-level interface for
drawing attractive and informative statistical graphics.

4. Code:
University Institute of Engineering
Department of Computer Science & Engineering

Importing MATPLOTLIB.

import matplotlib.pyplot as plt

Plotting a line Graph.


x = [0, 1, 2, 3, 4, 5, 6]
y = [i **2 for i in x ]

plt.plot(x, y)

plt.show()

Plot Multiple Line.


x = [1, 2, 3, 4, 5]
y1 = [50, 40, 70, 80, 20]
y2 = [80, 20, 20, 50, 60]
y3 = [70, 20, 60, 40, 60]
y4 = [80, 20, 20, 50, 60]

plt.plot(x, y1, 'g', label='Enfield', linewidth=2)


plt.plot(x, y2, 'c', label='Honda', linewidth=1)
plt.plot(x, y3, 'k', label='Yahama', linewidth=3)
plt.plot(x, y4, 'y', label='KTM', linewidth=2)

plt.title('Bike details in line plot')


plt.ylabel('Distance in kms')
plt.xlabel('Days')

plt.legend() #Adding Legends

plt.show()

Plotting Bar Graph.


x = [50, 60, 30, 70, 20]
y = ["A", "B", "C", "D", "E"]
University Institute of Engineering
Department of Computer Science & Engineering

plt.bar(y, x, color = "green")

plt.show()

Plot Multiple Bar Graph


x1 = [0.25, 1.25, 2.25, 3.25, 4.25]
y1 = [50, 40, 70, 80, 20]

plt.bar(x1, y1, label="BMW", color='r')

x2 = [.75, 1.75, 2.75, 3.75, 4.75]


y2 = [80, 20, 20, 50, 60]
plt.bar(x2, y2, label="Audi", color='y')

plt.xlabel('Days')
plt.ylabel('Distance (kms)')
plt.title('Information')

plt.legend()
plt.show()

Plot Horizontal Bar Graph


x = [5, 6, 3, 7, 2]
y = ["A", "B", "C", "D", "E"]

plt.barh(y, x, color ="orange")

plt.show()

Plot Scatter Graph


x = [5, 2, 9, 4, 7] # x-axis values
y = [10, 5, 8, 4, 2] # Y-axis values

plt.scatter(x, y) # Function to plot scatter

plt.show() # function to show the plot

Plot Multiple Scatter Graph


x1 = [1, 1.5, 2, 2.5, 3, 3.5, 3.6]
y1 = [7.5, 8, 8.5, 9, 9.5, 10, 10.5]

x2 = [8, 8.5, 9, 9.5, 10, 10.5, 11]


University Institute of Engineering
Department of Computer Science & Engineering

y2 = [3, 3.5, 3.7, 4, 4.5, 5, 5.2]

plt.scatter(x1, y1, label='High income low saving', color='r')


plt.scatter(x2, y2, label='Low income high savings', color='b')

plt.xlabel('Saving*100')
plt.ylabel('Income*1000')
plt.title('Scatter Plot')

plt.legend()

plt.grid()
plt.show()

Plot Pie Graph.


grades = 'A', 'A-', 'B', 'B-', 'C', 'E'
gradeCount = [50, 60, 140, 160, 30, 20]

plt.pie(gradeCount, labels=grades, autopct='%1.1f%%')

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()

5. Observations, Simulation Screen Shots and Discussions:


University Institute of Engineering
Department of Computer Science & Engineering
University Institute of Engineering
Department of Computer Science & Engineering
University Institute of Engineering
Department of Computer Science & Engineering
University Institute of Engineering
Department of Computer Science & Engineering
University Institute of Engineering
Department of Computer Science & Engineering
University Institute of Engineering
Department of Computer Science & Engineering

5. Result and Summary:

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.

7. Additional Creative Inputs (If Any):


Learning outcomes (What I have learnt):
1.. Grasp the characteristics of disruptive technology and understand building blocks building block of Artificial
intelligent ,Data Science and Coud Computing.
2. Develop simple intelligent system using available tools and techniques of AI to analyze and interpret domain
knowledge
3. Build effective data visualizations and learn to work with data through the entire Data process.
4. Deploy ,build and monitor and cloud based applications
5. Work in a team that can propose , design , implement and report on their selected domain.

Evaluation Grid (To be filled by Faculty):


Sr. No. Parameters Marks Obtained Maximum Marks
1. Worksheet completion including 10
writinglearningobjectives/Outcomes.(T
University Institute of Engineering
Department of Computer Science & Engineering

o besubmitted at the end of the day)


2. Post Lab Quiz Result. 5
3. Student Engagement in 5
Simulation/Demonstration/Performance
and Controls/Pre-Lab Questions.
Signature of Faculty (with Date): Total Marks Obtained: 20
University Institute of Engineering
Department of Computer Science & Engineering

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:

Explore data pre- processing packages and AIML algorithim.

a.) CSV file handling

2. ToolUsed:

Google Colab

3. Basic Concept/ CommandDescription:

1. Open the Google Colab and press the newnotebook.


2. We set the file name in Google Colabnotebook.
3. And then we start to write the text / coding in this new notebook.
4. Lastly, we check the result is run ornot.

CODE:

a)Importing pandas and reading the csv file


University Institute of Engineering
Department of Computer Science & Engineering

b)printing the shape, no. of rows and no. of column

c)df.describe→ to get all the arithmatics values

d)df.loc[ ]→ to retrieve data values from a dataset


University Institute of Engineering
Department of Computer Science & Engineering

e)df.iloc→ to select particular cell

f) To find unique elemrnts in the csv file

g)TRUE\FALSE
University Institute of Engineering
Department of Computer Science & Engineering

h)Corelation between the values

i)Null\ Not null


University Institute of Engineering
Department of Computer Science & Engineering

j) to get all the information regarding the csv file


University Institute of Engineering
Department of Computer Science & Engineering

1. Result and Summary:

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

Student Name: Kushank chauhan UID:


Branch: Computer Science & Engineering Section/Group: 3B
Semester: 1 Date of Performance: 1-10 -
2021
Subject Name: disruptive technologies
Subject Code: 21ECP 102

1. Aim of the practical:


read the file

2. Tool Used:

Google colab

3. Basic Concept/ Command Description:

1. Open the Google Colab and press the new notebook.


2. We set the file name in Google Colab notebook.
3. And then we start to write the text / coding in this new notebook.
4. Lastly, we check the result is run or not.

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

#python code to write something in file


file.write("This is the write command")
file.write("It allows us to write in a particular file")
University Institute of Engineering
Department of Computer Science & Engineering

Code 3

file = open('kushank.txt', 'r')


# This will print every line one by one in the file
for each in file:
print (each)

Code 4

# Python code to illustrate read() mode


file = open("kushank.text", "r")
print (file.read())

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-

7. Additional Creative Inputs (If Any):


Learning outcomes (What I have learnt):
1.. Grasp the characteristics of disruptive technology and understand building blocks
building block of Artificial intelligent ,Data Science and Coud Computing.
2. Develop simple intelligent system using available tools and techniques of AI to analyze
and interpret domain knowledge
3. Build effective data visualizations and learn to work with data through the entire Data
process.
4. Deploy ,build and monitor and cloud based applications
5. Work in a team that can propose , design , implement and report on their selected
domain.

Evaluation Grid (To be filled by Faculty):


Sr. No. Parameters Marks Obtained Maximum Marks
1. Worksheet completion including 10
writinglearningobjectives/Outcomes.(T
o besubmitted at the end of the day)
2. Post Lab Quiz Result. 5
University Institute of Engineering
Department of Computer Science & Engineering

3. Student Engagement in 5
Simulation/Demonstration/Performance
and Controls/Pre-Lab Questions.
Signature of Faculty (with Date): Total Marks Obtained: 20

You might also like