0% found this document useful (0 votes)
34 views8 pages

Disruptive Technologies - 1

The document discusses exploring data pre-processing packages and AI/ML algorithms using Google Collaboratory. It covers basics of Python like file handling, data handling operations like addition/subtraction of numbers, comparing input values. Functions are defined and called. File handling examples include opening/reading/writing/copying files. Code snippets are provided and results/screenshots are discussed. The student earned 30/30 marks for their performance, viva voce, and submission of worksheet with faculty signature.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views8 pages

Disruptive Technologies - 1

The document discusses exploring data pre-processing packages and AI/ML algorithms using Google Collaboratory. It covers basics of Python like file handling, data handling operations like addition/subtraction of numbers, comparing input values. Functions are defined and called. File handling examples include opening/reading/writing/copying files. Code snippets are provided and results/screenshots are discussed. The student earned 30/30 marks for their performance, viva voce, and submission of worksheet with faculty signature.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

University Institute of Engineering

Department of Computer Science And


Engineering

Student Name:-Ayushmaan Shaurya UID:-23BCS11201


Branch:-CSE
Semester:-1st Section/group:-203-A
Date of performance:-05/09/2023 Subject code:-23ECH-102
Subject:-Disruptive Technologies

AIM:- Explore the data pre-processing packages and AIML


algorithms.
a) Basics of python
b) File handling

Tools/Platforms used:- Google Collaboratory

Basic concept of python:-Python is high - level programming language used to


perform any tasks within limits or computer. It provides an easy approach to
object-oriented programming to write program. File handling is an integral part
of programming. Python is simplified with built-in methods. Which include
creating, opening and closing files. While files are open ,Python additionally
allows performing various file operations, such as reading, writing, and
appending information.

University Institute of Engineering


Department of Computer Science And
Engineering

CODE:-
A) Data Handling:-
1) Addition of two numbers
a= int(input(“Enter number a:”))
b=int(input(“Enter number b:”))
sum=a+b
print(“addition of two numbers is:”,sum)

2) Subtraction of two numbers


a= int(input(“the first number is”))
b= int(input(“the second number is”))
print(‘subtraction of two numbers=a-b’,a-b)

3) Calculate your Birth year


a=int(input(‘Date of birth=’))
b=int(input(‘current year=’))
print(‘current age=’,b-a)

4) Input two numbers from user and comparing them


a=int(input(“Enter first number:”))
b=int(input(“Enter second number:”))
if a==b:
print(“Both are Equal”)
else:
print(“Both are unequal”)

5)Program for checking of upper and lower case


a=input(“Enter a word:”)
if a.isupper()==True:
print(“Word is in upper case”)
else:
print(“Word is in lower case”)

6)Define a Function and call that Function

def sum(a,b):
c=a+b
return c
s=sum(10,5)
print(s)

University Institute of Engineering


Department of Computer Science And
Engineering

B) File Handling:
7)open the file and write the content:-
f1=open(‘/content/hi.txt’)
print(f1.read())

8)Reading by character count in file:-


f1=open(‘/content/hi.txt’)
print(f1.rreadline(5))

9)Reading line by line:-


f1=open(‘/content/hi.txt’)
print(f1.readline())
#print(f1.readline())
Print(f1.readline())
10) To copy content of one file to another:-
f1=open(‘/content/hi.txt’,’r’)
f2=open(‘/content/hey.txt’,’w’)
for I in f1:
f2.write(I.upper())
print(‘task done’)

University Institute of Engineering


Department of Computer Science And
Engineering

OBSERVATION, SIMULATION ,SCREENSHOTS AND


DISSCUSSION:-
1.#Addition and subtraction of two numbers:
2.# calculate your birth year:-

University Institute of Engineering


Department of Computer Science And
Engineering

3. Input the number from user and comparing them:-

4.Program for checking of upper and lower case :-

5.Define a function and call that function:-


University Institute of Engineering
Department of Computer Science And
Engineering

Result and summary:- we have learnt about basic syntax of


python, how to declare the calculate of birth year, input of
two numbers and a define a function and call that a function
and to do the file handling program..

5. Learning outcomes:-
1.addition and subtraction of two numbers
2.calculate date of birth
3.
4.
5.

Evaluation Grid:-
Sr.no Marks Maximum
obtained Marks
Student performance 12
(conduct experiment)
1.
2. Viva voce 10
3. Submission of 08
worksheet(record)
4. signature of faculty(with total marks 30
date) obtained

You might also like