python 1.1 Simran
python 1.1 Simran
WORKSHEET 1.1
1. Aim:
b)Write a program to enter marks of five subjects and calculate total, average
and percentage.
c)Write a program to enter length in centimeter and convert it into meter and
kilometer, and also convert the same into Equivalents
2. Source Code:
#Program to enter marks of five subjects and calculate total, average and
percentage.
# Program to enter length in centimeter and convert it into meter and kilometer,
and also convert the same into Equivalents
cm = 1000;
# Converting centimeter
# into meter and kilometer
meter = cm / 100.0;
kilometer = cm / 100000.0;
# Driver Code
print("Length in meter = " ,
meter , "m");
print("Length in Kilometer = ",
kilometer , "km");
DEPARTMENT OF
3. Screenshot of Outputs:
(a)
(b)
( c)
DEPARTMENT OF
COMPUTER SCIENCE & ENGINEERING