Python 1.1
Python 1.1
Q1. Write a program c to enter two number and perform all the arithmetic
operations.
c = a+b
print("The Sum of the number is : ", c)
"""Substraction"""
c = a-b
print("The difference of the number is : ", c)
"""Multiply"""
c = a*b
print("The Product of the number is : ", c)
Code:
"""Division"""
c = a/b
print("The quotient of the number is : ", c)
Output:=
Q2 Write a program to enter the marks of five subjects and calculate total, average and
percentage.
Code:
print("Enter The Marks of five Subject : ") a = int(input("First : "))
b = int(input("Second : "))
c = int(input("Third : "))
d = int(input("Fourth : "))
e = int(input("Fifth : "))
#total marks
total= (a+b+c+d+e)
print("The total marks = : ", total) #average calculation
Avg = total/5
print("Average marks = ",Avg) #percentage
perc = (total/500)*100
print("the percentage of Marks in 5 subject is ",perc)
Output:-
Q3. Write a program to enter the length in a centimeter and convert it into meter and
kilometer, and also convert the same Equivalents.
Code:
Output:-