a=3 b=5 sum=a+b print("the sum is: ", sum) a=float(input("enetr the number1: ")) b=float(input("enetr the number2: ")) sum1=a+b print("the sum is : ", sum1)
l=float(input("enetr the length: ")) b=float(input("enetr the bradth: ")) area=l*b perimeter=2*(l+b) print("the area of rectangle is : ", area) print("the area of rectangle is : ", perimeter)
r=float(input("enetr the radius: ")) r=2*3.14*r*r print("the area of circle is : ", r)
python lab 1 code g2
ReplyDeletea=3
b=5
sum=a+b
print("the sum is: ", sum)
a=float(input("enetr the number1: "))
b=float(input("enetr the number2: "))
sum1=a+b
print("the sum is : ", sum1)
l=float(input("enetr the length: "))
b=float(input("enetr the bradth: "))
area=l*b
perimeter=2*(l+b)
print("the area of rectangle is : ", area)
print("the area of rectangle is : ", perimeter)
r=float(input("enetr the radius: "))
r=2*3.14*r*r
print("the area of circle is : ", r)