Computer Science, asked by bulbusaha1234, 4 months ago

Write a python program to find the perimeter of a

triangle. Input the sides of the triangle .

eg: p= s1+s2+s3​

Answers

Answered by avishchoudhary8830
1

side1=int(input("enter the first side"))

side2=int(input("enter the second side"))

side3=int(input("enter the third side"))

print("the perimeter is "+side1+side2+side3)

Answered by anindyaadhikari13
2

Required Answer:-

Question:

  • Write a python program to find the perimeter of a triangle.

Solution:

Here comes the program.

a=float(input("Enter length of first side:  "))

b=float(input("Enter length of second side:  "))

c=float(input("Enter length of third side:  "))

p=a+b+c

print("Perimeter of the triangle is:  ",p)

Algorithm:

  1. START
  2. Ask the user to enter the length of sides of triangle.
  3. Add them and store in a variable, say p.
  4. Display the value of p.
  5. STOP

Refer to the attachment for output ☑.

Attachments:
Similar questions