You are on page 1of 5

Experiment No. 1.

Student Name: Aditya Prakash UID: 22BCS80090


Branch: CSE(LEET) Section/Group : 912 - A
Semester: 4th Date of Performance:
Subject Name: Programming In Python Lab Subject Code: 21ITP259

Aim of the practical:


1. Write a  program  to enter two numbers and perform all arithmetic operations.

Program Code:

a = int(input("Value of a is :"))
b = int(input("Value of b is :"))

sum = a+b
sub = a-b
mul = a*b
div = a/b

print("Sum is : ", sum)


print("Div is : ", div)
print("mul is : ", mul)
print("sub is : ", sub)
Output:

Aim of the practical:


1. Write a  program to enter marks of five subjects and calculate total, average and percentage.

Program Code:

a = int(input("enter marks of english: "))

b = int(input("enter marks of math: "))

c = int(input("enter marks of science: "))

d = int(input("enter marks of sst: "))

e = int(input("enter marks of computer: "))

marks = (a+b+c+d+e)
avg = (marks/5)

print("Total average is :", avg)

print("Total Marks is :", marks)

perc = (marks/500)*100

print("total percentage is : ", perc)

Output:
Aim of the practical:
Write a  program to enter length in centimeter and convert it into meter and kilometer, and also convert the same
into Equivalents

Program Code:
a = int(input("Enter the length : "))

print("length is :", a, "cm")


m = a*100
km = a*1000

print("length in m is: ", m, "m")


print("length in km is: ", km, "km")

Output:

Learning outcomes (What I have learnt):

1. Performing all arithmetic operations

2. Calculating average and percentage

3. Convert length into m, km


Evaluation Grid :

Sr. No. Parameters Marks Obtained Maximum Marks


1. Student Performance 12
(Conduct of experiment)
objectives/Outcomes.
2. Viva Voce 10
3. Submission of Work Sheet 8
(Record)
Total 30

You might also like